Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to define the coefficients of a polynomial to be real?

3 views
Skip to first unread message

BHUPALA

unread,
Jun 18, 2009, 4:54:10 AM6/18/09
to
I have a 10th order polynomial (a0+a1 z+a2 z^2 + ... + an z^10). I
want to define all the coefficients to be real. I want to substitute z
= 1+i and extract only real part of it.

I have done this by defining

Element[a0,Reals];
Element[a1,Reals];
.
.
.
Element[a10,Reals];

Ply = a0+a1z+a2 z^2 + ... + an z^10;
Ply/. z-> 1+I

I am getting

-2 Im[a2]+Re[a0+(1+i) a1-(2-2i)a3- 4a4]

which I should not have got as I have defined already defined the
coeffs to be real.

Any help please!

bhupala

Jens-Peer Kuska

unread,
Jun 18, 2009, 6:18:07 AM6/18/09
to
Hi,

$Assumptions = {Element[a0, Reals]}

and

Simplify[Re[a0]]

will work.

Regards
Jens

Peter Breitfeld

unread,
Jun 18, 2009, 8:43:42 PM6/18/09
to
BHUPALA wrote:

pol = a0 + a1 z + a2 z^2 + ...
dom = Element[#,Reals]& /@ CoefficientList[pol,z]
Simplify[Re[pol/.z->1+I],dom]

should do it
--
_________________________________________________________________
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de

David Park

unread,
Jun 18, 2009, 8:45:19 PM6/18/09
to
The command you want is ComplexExpand, which is often overlooked by new
users. ComplexExpand assumes all symbols are real, except those you specify
to be complex.

poly[z_] = a0 + a1 z + a2 z^2 + a3 z^3;

poly[1 + I]
ComplexExpand[Re[%]]
a0 + (1 + I) a1 + 2 I a2 - (2 - 2 I) a3
a0 + a1 - 2 a3


David Park
djm...@comcast.net
http://home.comcast.net/~djmpark/

0 new messages