# Thread: Truncation and Taylor series

1. ## Truncation and Taylor series

Hi all,

If I expand the function

$y(t_{n+1})$ about $y(t_n)$and get

$y(t_{n+1}) = y(t_n) + h y'(t_n) + h^2/2 y''(t_n) + ....$

what do I get if I expand the function

$y(t_{n+2}) =$ ?

2. Originally Posted by davefulton
Hi all,

If I expand the function

$y(t_{n+1})$ about $y(t_n)$and get

$y(t_{n+1}) = y(t_n) + h y'(t_n) + h^2/2 y''(t_n) + ....$

what do I get if I expand the function

$y(t_{n+2}) =$ ?
I think you ought to tell us what the actual question is.

CB

3. My question is this;

Calculate the truncation error for the following scheme

$y_{n+2} - y_{n+1} = \frac{h}{2} (3f_{n+2}-f_{n})$

So I get

$y_{n+2}-y_{n+1}-\frac{h}{2}(3f_{n+2}-f_{n})=0$

I then assume $y_{n}=y(t_{n})$

I also know that $f(y_{n},t_{n})=y'$

This gives me

$y(t_{n+2})-y(t_{n+1})-\frac{h}{2}(3y'(t_{n+2})-y'(t_{n})\approx0$

Using a taylor series expansion about $t_{n}$

This is where I get confused.

I have to get the equation all in terms of $t_{n}$

I know that $y(t_{n+1})$

is

$y(t_{n+1}) = y(t_{n}) + hy'(t_{n+1} + ...$

and that

$y(t_{n+2}) = y(t_{n}) + 2hy'(t_{n+1}) + ...$

since

$y(t_{n+2}) - y(t_{n}) = 2h$

but how do I expand the

$y'(t_{n+2})$

as a Taylor series or am I doing something wrong