MathGroup Archive 2007

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

Search the Archive

Re: SeriesCoefficient: needs work!

  • To: mathgroup at
  • Subject: [mg83490] Re: SeriesCoefficient: needs work!
  • From: Peter Pein <petsie at>
  • Date: Wed, 21 Nov 2007 03:01:57 -0500 (EST)
  • References: <fhrr3r$53r$>

jackgold at schrieb:
> Hi Everyone,
> I have been experimenting with the new (ver 6) command, 
> SeriesCoefficient in the form,
> SeriesCoefficient[fnt,{x,x0,n}].
> Here fnt is a function of x and n is symbolic.  This command is 
> supposed to return the nth coefficient in the series expansion of fnt 
> about x0.
> I have found the following results on a MacBook Pro running Tiger.
> 1) SeriesCoefficient[Cos[x] Exp[x], {x, 0, n}] returns itself, unevaluated.
> 2) SeriesCoefficient[Cos[x] Exp[x]/(1-x), {x, 0, n}] returns an 
> expression involving incomplete Gamma functions with an imaginary 
> argument.  Odd that 1) does not compute but 2) does! Not that the 
> result is terribly revealing, by the way.
> 3) SeriesCoefficient[Sin[x] Exp[x], {x, 0, n}] so preposterously 
> complicated that most of us would have preferred no result!  (Just 
> joking.  The result is far to complicated to publish here.)
> My opinion is that this use of SeriesCoefficient should not be offered 
> to the public until some of these obvious glitches are cleaned up.  
> Incidentally, since the nth terms of the individual functions Sin[x], 
> Cos[x], Exp[x] and 1/(1-x) can be found using SeriesCoefficient and 
> surely Mathematica knows how to find the nth coefficient of a product of power 
> series, I suspect the problem lies in the finite summation which 
> results from the use of the Cauchy product formula.
In Version 5.2 the good old SeriesTerm[] in the package DiscreteMath got its
difficulties in case 2:

<< "DiscreteMath`"
SeriesTerm[Cos[x]*E^x, {x, 0, n}]
(1 - I)^n/(2*n!) + (1 + I)^n/(2*n!)
SeriesTerm[(Cos[x]*E^x)/(1 - x),
  {x, 0, n}]
Piecewise[{{ComplexInfinity, n >= 1}},
  (I^n*KroneckerDelta[Mod[n, 2]])/
   Gamma[1 + n]]
SeriesTerm[Sin[x]*E^x, {x, 0, n}]
-((1/Pi)*(2^(1 + n/2)*
    (Cos[(n*Pi)/4] + Cos[(3*n*Pi)/4])*

And the package SpecialFunctions by Prof. Wolfram Koepf ( ) has got problems
with case 2 too:

<< "SpecialFunctions`"
>From In[1]:=
"SpecialFunctions, (C) Wolfram Koepf, version 2.01, 2006"
>From In[1]:=
"Fast Zeilberger, (C) Peter Paule and Markus Schorn (V 2.2) loaded"
PS[Cos[x]*Exp[x], x, 0]
sum[(2^(k/2)*x^k*Cos[(k*Pi)/4])/k!, {k, 0, Infinity}]
PS[Cos[x]*(Exp[x]/(1 - x)), x, 0]
PS[Sin[x]*Exp[x], x, 0]
sum[(2^(k/2)*x^k*Sin[(k*Pi)/4])/k!, {k, 0, Infinity}]

Shouldn't the V6-function SeriesCoefficient be at least as smart as the
V5.2-package is? But maybe the new version gets some series representations
where the old one fails.


  • Prev by Date: Re: addons in Mathematica 6???
  • Next by Date: Re: Fast way of checking for perfect squares?
  • Previous by thread: SeriesCoefficient: needs work!
  • Next by thread: Re: Re: SeriesCoefficient: needs work!