lacunary - Mathnotes

Taylor Polynomial Approximations of IVPs

The foruma for the Taylor polynomial of degree n centered at x0, approximating a function f(x) possessing n derivatives at x0 is given by:

pn(x)=f(x0)+f(x0)(xx0)+f(x0)2!(xx0)2+f(x0)3!(xx0)3++f(n)(x0)n!(xx0)n=j=0nf(j)(x0)j!(xx0)j.(1)

Note that the terms in the series involve derivatives of f, and if x0=0, they involve intial values of derivatives of f.

Now, given a differential equation and some initial values, we can exploit this to find a Taylor polynomial approximating the solution of the IVP.

Example:

Find the first few Taylor polynomials approximating the solution around x0=0 of the initial value problem

y=3y+x2y;y(0)=10,y(0)=5

In order to construct

pn(x)=y(0)+y(0)x+y(0)2!x2+y(0)3!x3++y(n)(0)n!xn,(2)

we need the values of y(0), y(0), y(0), y(0), etc. The first two are given in the initial conditions, and we can deduce more by using the diffrential equation and the provided initial conditions:

y(0)=3y(0)+02y(0)=35+010=15.

We know that y''= 3y' = x^2y for some interval around x0=0 (why?), and can differentiate both sides to derive:

y=3y+2xy+x2y,

y(4)=3y+2y+4xy+x2y,

and so on as long as we wish to and as long as additional derivatives of y exist.

Now, we can substitute in initial values of lower derivatives and x=0 to find additional initial values:

y(0)=315+2010+025=45,

y(4)(0)=345+210+405+02+15=155,

and so on.

Substituting these initial conditions into (2) and dropping higher order terms we get:

p4(x)=10+5x+152!x2+453!x3+1554!x4,

which is the Taylor polynomial of degree 4 approximating the solution to our IVP at x0=0.

Note that this can be applied around places other than x0=0 by translating coordinates, but I don't cover that here.

In general this process is very tedious and can be difficult to do by hand without making errors. I have written a sage script that finds the Taylor polynomial approximation for IVPs, which makes this process quick and accurate.