MathGroup Archive 1993

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

Search the Archive

Taylor expansion


Hello mathgroup.

I want the coefficients list of the 3rd order Taylor expansion of Cos[x]:

   N[CoefficientList[ Normal[Series[ Cos[x],{x,0,3}]],x]]

This gives me 
  
   {1., 0, -0.5}

Note that the coefficient of the 3rd order term, being zero, is missing.

   N[CoefficientList[ Normal[Series[ Cos[x],{x,0,4}]],x]]

gives:

   {1., 0, -0.5, 0, 0.0416667}

What should I do against missing zeroes at the and of the List?

Please reply to janita at cv.ruu.nl

Thank you!





  • Prev by Date: mathHDF & NeXT
  • Next by Date: random number seeds
  • Previous by thread: random number seeds
  • Next by thread: Re: Taylor expansion