Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: How to get the real and imaginary parts of a power series?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80007] Re: How to get the real and imaginary parts of a power series?
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Fri, 10 Aug 2007 06:37:53 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <f9gvbc$b90$1@smc.vnet.net>

Gordon Smith wrote:
> Suppose s = Series[Cosh[(x + I y)u, {u,0,2}]. How can I get the real part 1 + 1/2(x^2 - y^2) u^2 + O(u^3) and the imaginary part x y u^2 + O(u^3) ? I thought ComplexExpand[Re[s]] should give me the real part of s, but it just gives me s unchanged. (Mathematica newbie here!)

You are almost there: apply *Normal* to your series (a series data 
object, indeed) and then Re or Im followed by ComplexExpand.

In[1]:= s = Series[Cosh[(x + I y) u], {u, 0, 2}]

Out[1]=
                                  2
                         (x + I y)
SeriesData[u, 0, {1, 0, ----------}, 0, 3, 1]
                             2

In[2]:= ComplexExpand[Re[Normal@s]]

Out[2]=
      2  2    2  2
     u  x    u  y
1 + ----- - -----
       2       2

In[3]:= ComplexExpand[Im[Normal@s]]

Out[3]=
  2
u  x y

-- 
Jean-Marc


  • Prev by Date: Re: Simplifying the exponents
  • Next by Date: Re: Simplifying the exponents
  • Previous by thread: Re: How to get the real and imaginary parts of a power series?
  • Next by thread: Re: How to get the real and imaginary parts of a power series?