Re: SeriesCoefficient: needs work!
- To: mathgroup at smc.vnet.net
- Subject: [mg83490] Re: SeriesCoefficient: needs work!
- From: Peter Pein <petsie at dordos.net>
- Date: Wed, 21 Nov 2007 03:01:57 -0500 (EST)
- References: <fhrr3r$53r$1@smc.vnet.net>
jackgold at umich.edu 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. > > Strange. In Version 5.2 the good old SeriesTerm[] in the package DiscreteMath got its difficulties in case 2: In[1]:= << "DiscreteMath`" In[2]:= SeriesTerm[Cos[x]*E^x, {x, 0, n}] Out[2]= (1 - I)^n/(2*n!) + (1 + I)^n/(2*n!) In[3]:= SeriesTerm[(Cos[x]*E^x)/(1 - x), {x, 0, n}] Out[3]= Piecewise[{{ComplexInfinity, n >= 1}}, (I^n*KroneckerDelta[Mod[n, 2]])/ Gamma[1 + n]] In[4]:= SeriesTerm[Sin[x]*E^x, {x, 0, n}] Out[4]= -((1/Pi)*(2^(1 + n/2)* (Cos[(n*Pi)/4] + Cos[(3*n*Pi)/4])* Gamma[-n]*Sin[(n*Pi)/4]^2)) And the package SpecialFunctions by Prof. Wolfram Koepf ( http://www.mathematik.uni-kassel.de/~koepf/CA/index.html ) has got problems with case 2 too: In[1]:= << "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" In[3]:= PS[Cos[x]*Exp[x], x, 0] Out[3]= sum[(2^(k/2)*x^k*Cos[(k*Pi)/4])/k!, {k, 0, Infinity}] In[4]:= PS[Cos[x]*(Exp[x]/(1 - x)), x, 0] Out[4]= SpecialFunctions`Private`df[3] In[5]:= PS[Sin[x]*Exp[x], x, 0] Out[5]= 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. Peter
- Follow-Ups:
- Re: Re: SeriesCoefficient: needs work!
- From: Devendra Kapadia <dkapadia@wolfram.com>
- Re: Re: SeriesCoefficient: needs work!