Re: Multi-Variate Taylor Series Expansions

• To: mathgroup at smc.vnet.net
• Subject: [mg14732] Re: [mg14718] Multi-Variate Taylor Series Expansions
• From: Carl Woll <carlw at u.washington.edu>
• Date: Wed, 11 Nov 1998 17:53:37 -0500
• Organization: Physics Department, U of Washington
• References: <199811100621.BAA15036@smc.vnet.net.>
• Sender: owner-wri-mathgroup at wolfram.com

```Hi Tom,

The Series function of Mathematica is intended to do multi-variate
Taylor expansions, but it doesn't work right. If you look at the web
page

http://www.wolfram.com/support/Kernel/Symbols/System/Series.html

you will find a way to augment the Series function to work better.

I don't like the method given above, since I like to create series by
adding O[x]^n to an expression, and the above method doesn't help here.
Instead, one could modify the SeriesData function as follows:

Unprotect[SeriesData];
SeriesData /:
HoldPattern[SeriesData[a_,b_,c_,d__]]+HoldPattern[z:SeriesData[e_,__]]
:=
SeriesData[a,b,c+z,d] /; a=!=e; Protect[SeriesData];

Then, in your example, I would do the following

(F[x+dx,t+dt] + O[dx]^3) + O[dt]^3

The parenthesis above are necessary. This method should also work for

Note that using either of the above approaches will drop terms that are
order O[dx]^3 or O[dt]^3, but not terms like dx^2 dt. Since your
example has these terms dropped, you may want to do something
different. Replace dx and dt by something like

dx -> a de
dt -> b de

and do a series expansion on de:

ser = (F[x+dx,t+dt]/.{dx->a de,dt->b de})+O[de]^3

and then fix things up by sending a and b back, as in

Expand[Normal[ser]/.{a->dx/de,b->dt/de}]

Good luck,

Carl Woll
Dept of Physics
U of Washington

Tom Bell wrote:

> Is there a function in Mathematica that will do multi-variate Taylor
> series
>
> expansions?  For example, suppose I have
>
> function = F(x + dx, t + dt)
>
> then the expansion to second order about (x,t) should look something
> like
>
> expansion = F(x,t) + dx D(F,x) + dt D(F,t) + (1/2) dx^2 D(F,{x,2}) +
>
>     dx dt D(F,{x,t}) + (1/2) dt^2 D(F,{t,2}) + O(dx^3) + O(dt^3)
>
> The situation gets a little more complicated: the function may look like
>
> F(x + G(x + dx, t + dt), t + dt) and so on, so that the expansion should
> be
>
> recursive.  After expanding F, the function should keep going back and
> expending G until no
>
> further expansions can be done.
>
> help.
>
> ----------------------------------------------------------------
> Thomas (Tom) Bell
> Gravity Probe-B, H.E.P.L. tombell at stanford.edu
> Stanford University 136D Escondido Village
> Stanford, CA
> 94305-4085 Stanford, CA 94305              650/725-6378 (o)
> 650/497-4230 (h)                650/725-8312 (fax)

```

• Prev by Date: Re: Is there a MultipleLogListPlot anywhere?
• Next by Date: Re: Simple MathLink question
• Previous by thread: Multi-Variate Taylor Series Expansions
• Next by thread: Re: Multi-Variate Taylor Series Expansions