Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg100955] Re: [mg100925] How to define the coefficients of a polynomial to be real?
  • From: "David Park" <djmpark at comcast.net>
  • Date: Thu, 18 Jun 2009 20:46:33 -0400 (EDT)
  • References: <18883255.1245315881604.JavaMail.root@n11>

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
djmpark at comcast.net
http://home.comcast.net/~djmpark/  


From: BHUPALA [mailto:bhupala at gmail.com] 

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];



  • Prev by Date: Re: How can I parse arguments of an expression unevaluated?
  • Next by Date: Re: PDF import problem
  • Previous by thread: Re: How to define the coefficients of a polynomial to be real?
  • Next by thread: Re: How to define the coefficients of a polynomial to be real?