TAYLOR SERIES
Consider the one dimensional initial value problem
y’ = f(x, y), y(x0) = y0where
f is a function of two variables x and y and (x0 , y0) is a known point on the solution curve.
If the existence of all higher order partial derivatives is assumed for y at x = x0, then by Taylor series the value of y at any neibhouring point x+h can be written as
y(x0+h) = y(x0) + h y'(x0) + h2 /2 y”(x0) + h3/3! y”'(x0) + . . . . . .
where ‘ represents the derivative with respect to x. Since at x0, y0 is known, y’ at x0 can be found by computing f(x0,y0). Similarly higher derivatives of y at x0 also can be computed by making use of the relation y’ = f(x,y)
y” = fx + fyy’
y”’ = fxx + 2fxyy’ + fyy y’2 + fyy”
and so on. Then
y(x0+h) = y(x0) + h f + h2 ( fx + fyy’ ) / 2! + h3 ( fxx + 2fxyy’ + fyy y’2 + fyy” ) / 3! + o(h4)
Hence the value of y at any neighboring point x0+ h can be obtained by summing the above infinite series. However, in any practical computation, the summation has to be terminated after some finite number of terms. If the series has been terminated after thepthderivative term then the approximated formula is called the Taylor series approximation to y of order p and the error is of order p+1. The same can be repeated to obtain y at other points of x in the interval [x0, xn] in a marching process.
ALGORITHMSpecify x0, xn, y0, h |
Error in the approximation : The Taylor series method of order p has the property that the final global error is of order o(hp+1); hence p can be chosen as large as necessary to make the error is as small as desired. If the order p is fixed, it is theoretically possible to a priority determine the size of h so that the final global error will be as small as desired. Since
Making use of finite differences, the p+1th derivative of y at x+q h can be approximated as
However, in practice one usually computes two sets of approximations using step sizes h and h/2 and compares the solutions
For p = 4, E4 = c * h4 and the same with step size h/2, E4 = c * (h/2)4, that is if the step size is halved the error is reduced by an order of 1/16.