MathGroup Archive 2005

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

Search the Archive

Re: Re: power series in more than one variables

  • To: mathgroup at smc.vnet.net
  • Subject: [mg55716] Re: Re: [mg55679] power series in more than one variables
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Mon, 4 Apr 2005 00:59:22 -0400 (EDT)
  • Reply-to: hanlonr at cox.net
  • Sender: owner-wri-mathgroup at wolfram.com

This will default the variable list to a list of all non-numeric symbols present 
in the function

Clear[mySeries];

mySeries[func_, n_Integer]:=Module[
      {var=Union[Cases[func,_Symbol?(!NumericQ[#]&),Infinity]]},
      Plus@@(Cases[Expand@Normal@
                  Series[func/.Thread[var->h*var],
                    Sequence@@Thread[{var,0,n}]],_*h^n]/.h->1)];

mySeries[func_, var:{__Symbol},n_Integer]:=
    Plus@@(Cases[Expand@Normal@
                Series[func/.Thread[var->h*var],
                  Sequence@@Thread[{var,0,n}]],_*h^n]/.h->1);

Clear[f,x,y,z];

mySeries[f[x,y,z],2]

(1/2)*Derivative[2, 0, 0][f][0, 0, 0]*x^2 + z*Derivative[1, 0, 1][f][0, 0, 0]*x + 
y*Derivative[1, 1, 0][f][0, 0, 0]*x + 
  (1/2)*z^2*Derivative[0, 0, 2][f][0, 0, 0] + y*z*Derivative[0, 1, 1][f][0, 0, 0] + 
  (1/2)*y^2*Derivative[0, 2, 0][f][0, 0, 0]

And@@Table[mySeries[f[x,y,z],n]==mySeries[f[x,y,z],{x,y,z},n],{n,5}]

True


Bob Hanlon

> 
> From: Bob Hanlon <hanlonr at cox.net>
To: mathgroup at smc.vnet.net
> Date: 2005/04/03 Sun PM 12:20:21 EDT
> To: "Christoph Lhotka" <lhotka at astro.univie.ac.at>, 
<mathgroup at smc.vnet.net>
> Subject: [mg55716] Re: [mg55679] power series in more than one variables
> 
> Clear[mySeries];
> mySeries[func_, var:{__Symbol},n_Integer]:=
>     Plus@@(Cases[Expand@Normal@
>                 Series[func/.Thread[var->h*var],
>                   Sequence@@Thread[{var,0,n}]],_*h^n]/.h->1);
> 
> mySeries[f[x,y,z],{x,y,z},2]
> 
> (1/2)*Derivative[2, 0, 0][f][0, 0, 0]*x^2 + z*Derivative[1, 0, 1][f][0, 0, 0]*x + 
> y*Derivative[1, 1, 0][f][0, 0, 0]*x + 
>   (1/2)*z^2*Derivative[0, 0, 2][f][0, 0, 0] + y*z*Derivative[0, 1, 1][f][0, 0, 0] 
+ 
>   (1/2)*y^2*Derivative[0, 2, 0][f][0, 0, 0]
> 
> 
> Bob Hanlon
> 
> > 
> > From: "Christoph Lhotka" <lhotka at astro.univie.ac.at>
To: mathgroup at smc.vnet.net
> > Date: 2005/04/03 Sun AM 05:50:48 EDT
> > To: mathgroup at smc.vnet.net
> > Subject: [mg55716] [mg55679] power series in more than one variables
> > 
> > Hello !
> > 
> > How can I define a power series in Mathematica with more than more 
> variables
> > (x,y,z,...), where only terms x^k*y^l*z^m*..., where k+l+m+...=N should 
> be
> > considered? I havwe tried Series[exp,{x,..},{y,...},...] but this only returns
> > nested taylor series. My usual approach is to define an artificial
> > perturbation parameter, say lambda^k+l+m, holding terms of equal 
> powers
> > together, but this is not satisfying when only dealing with numerical 
series,
> > where the coefficients should only be numeric not mixed symbolic 
(defining 
> it
> > this way will give you as third argument to SeriesData non numerical 
> entries.
> > 
> > Does anyone have some sugestions?
> >  
> > -- Christoph Lhotka --
> > University of Vienna
> > Institute for Astronomy
> > Tuerkenschanzstr. 17 
> > 1180 Vienna, Austria
> > mail. lhotka at astro.univie.ac.at
> > 
> > 
> 


  • Prev by Date: Re: power series in more than one variables
  • Next by Date: Re: Much faster ConvexHull implementation
  • Previous by thread: Re: power series in more than one variables
  • Next by thread: Mathematica bug in handling trigonometric functions? (and more)