Show that the method is of order 3 if a =-5 and of order 2 if a is not equal to -5

79 Views Asked by At

I am studying ODEs and came across this exam question:

enter image description here

I have the solution here also:

enter image description here

I have been working on this exam question all day and have been stuck for hours. What I don't understand is how the expansion has come about and why (i.e. hxT and also (xn+h)). Please could someone explain this to me as this would really really help!

Thank You

1

There are 1 best solutions below

0
On BEST ANSWER

Ok, let me try to explain and guess what was really meant.

If you have an ODE $$ y\prime = f(x, y)$$

and want to solve it numerically, you must have a way to approximate derivatives numerically (by finite amount of data) and the interval of interest for a solution of ODE. This interval is represented by some grid; solution is known only at vertices of grid. Usually grid consists of equally spaced points. That's there $x_{n+1} = x_n + h$ and $x_{n-1} = x_n - h$ formulas came from.

So, it seems that ODE is approximated with this difference scheme:

$$ \frac{y_{n+1}-(1+\alpha)y_n + \alpha y_{n-1}}{h} =\frac{1}{2} \Bigl ((3-\alpha)f_n -(1+\alpha)f_{n-1} \Bigr ) $$

or, as it was written in your task

$$ y_{n+1}-(1+\alpha)y_n + \alpha y_{n-1} =\frac{h}{2} \left ((3-\alpha)f_n -(1+\alpha)f_{n-1} \right ). $$

So, we approximate the derivative at point $x_n$ with a $\frac{y_{n+1}-(1+\alpha)y_n + \alpha y_{n-1}}{h}$, using the information at $x_n$ and neighbour point $x_{n-1}$ and $x_{n+1}$. R.H.S. represents the value of $f(x_n, y_n)$.

For me, it seems that $T$ is an error that we get when we plug exact solution into difference operator. So, $h\cdot T$ appeared just for the sake of simplicity.

Basically all these methods assume that you have a smooth enough RHS of ODE. So, if it is smooth enough, you can use Taylor expansion of this function until this already mentioned "enough" terms. And that's the method: you plug exact solution into numerical method (symbolically, of course) and see how numerical result differs from exact value. Hope this explains, why expansion came.