MathGroup Archive 2006

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

Search the Archive

Re: Beginner--Error in Series expansion

  • To: mathgroup at smc.vnet.net
  • Subject: [mg68166] Re: Beginner--Error in Series expansion
  • From: Peter Pein <petsie at dordos.net>
  • Date: Thu, 27 Jul 2006 05:29:45 -0400 (EDT)
  • References: <ea72pl$k7e$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

abdou.oumaima at hotmail.com schrieb:
> Hello mathgroup,
> 
> When I'm trying to find a power series of this function, It doesn't yield the correct expression:
> 
> Z[L_] = Sum[(((-1)^Lp/(
>       L - Lp + 1))*(1/ksi^Lp)), {Lp, 0, L}] - (-1)^L Log[1 + ksi]/ksi^(L + 1)
> 
> devZ[L_] = Normal[Series[Z[L], {ksi, 0, 2}]]
> devZ[3]
> 
> I get: devZ[3]= 1/4 -1/ksi^3+1/2 ksi +(ksi-ksi^2/2)/ksi^4.
> This code must yield:
> devZ[3]= ksi/5 - ksi^2/6 +0(ksi^3)
> 

No, there must not be an O[ksi] because you've got a call to Normal[] in the definition of devZ.

> How to correct this error.
> 
> Any help will be very welcome.
> 
> Lian.
> 
> 
> 

Hi Lian,

  use SetDelayed (":=") for devZ:

devZ[L_] := Normal[Series[Z[L], {ksi, 0, 2}]]
devZ[3]
--> ksi/5 - ksi^2/6

Altenatively you can calculate the series to a higher degree and call devZ together with Apart:

dz[L_] = Normal[Series[Z[L], {ksi, 0, 6}]]
Apart[dz[3]]
-->
ksi^(-1 - L)*((-(-1)^L)*ksi + (1/2)*(-1)^L*ksi^2 - (1/3)*(-1)^L*ksi^3 + (1/4)*(-1)^L*ksi^4 -
     (1/5)*(-1)^L*ksi^5 + (1/6)*(-1)^L*ksi^6) + Sum[(-1)^Lp/(ksi^Lp*(1 + L - Lp)), {Lp, 0, L}]

ksi/5 - ksi^2/6


Peter


  • Prev by Date: Re: ImplicitPlot problem
  • Next by Date: Re: Graphics export quality-methods and defaults
  • Previous by thread: Re: Beginner--Error in Series expansion
  • Next by thread: Re: Beginner--Error in Series expansion