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: [mg100947] Re: How to define the coefficients of a polynomial to be real?
  • From: Peter Breitfeld <phbrf at t-online.de>
  • Date: Thu, 18 Jun 2009 20:45:06 -0400 (EDT)
  • Organization: SFZ Bad Saulgau
  • References: <h1cvbi$ji2$1@smc.vnet.net>

BHUPALA wrote:

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

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


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