Accuracy and stability of an ode method

271 Views Asked by At

enter image description here

Attempt

I perhaps want to expand in taylor series about $x_n$.

$$ y_{n+1} = y_n + h y'_n + h^2/2 y''_n $$

$$ y_{n-1} = y_n - h y'_n + h^2/2 y''_n $$

$$ f(y_{n+1} ) = y'_{n+1} = y'_n + h y_n'' + ... $$

$$ f(y_{n-1} ) = y'_{n-1} = y'_n - h y_n'' + ... $$

So we ahve

$$ T_k = 2h y'_n - h/3 ( 6 y'_n + O(h^2) ) = O(h^3) $$

So it is ${\bf third}$ order accurate. Is this correct?

2

There are 2 best solutions below

1
On BEST ANSWER

It's probably easier to just derive the order of local error of Simpson's rule for integration. We can derive it by applying this rule to polynomial base functions $$ f_{m}(x) \in \left\lbrace 1, x - x_{n - 1}, (x - x_{n-1})^{2}, ..., (x - x_{n-1})^{m}, ... \right\rbrace $$ and we see that for $f_{4}(x) = (x - x_{n-1})^{4}$ this integration rule is no longer accurate $$ \frac{(2h)^{5}}{5} = \frac{h}{3} \left(0 + 4h^{4} + (2h)^{4} \right) + C \cdot f^{(4)}(\xi) $$ so we can calculate the constant in the local error \begin{align*} 4! \cdot C &= \frac{32 h^{5}}{5} - \frac{20 h^{5}}{3} \\ C &= - \frac{h^{5}}{90}. \end{align*}

Then we can derive this method for solving ordinary differential equations in the following way. Given equation $$ y' = f(x, y) $$ integrate it $$ \int_{x_{n-1}}^{x_{n+1}} y'(x)dx = \int_{x_{n-1}}^{x_{n+1}} f(x, y(x))dx \\ $$ and apply Simpson's rule on the right hand side $$ y(x_{n+1}) - y(x_{n-1}) = \frac{h}{3} \left( f(x_{n-1}, y_{n-1}) + 4 f(x_{n}, y_{n}) + f(x_{n+1}, y_{n+1})\right) - \frac{1}{90} h^{5} f^{(4)}(\xi) $$ disregard the error term and replace the exact values with approximations $y_{n+1} \approx y(x_{n+1})$ and $y_{n-1} \approx y(x_{n-1})$. Note that we have obtained the method and so the order of local error equals 5.

0
On

$y(x+h)-y(x-h)$ is twice the odd part of (the Taylor expansion of) $y(x+h)$. The same way, $y'(x+h)+y'(x-h)$ is twice the even part of (the Taylor expansion of) $y'(x+h)$. Thus \begin{alignat}1 y(x+h)-y(x-h)&=2\sum_j\frac{y^{(2j+1)}(x)h^{2j+1}}{(2j+1)!}&=2y'(x)h+2\frac{y'''(x)h^3}{3!}+2\frac{y^{(5)}(x)h^{5}}{5!}+...\\ \frac{h}3(y'(x+h)+4y'(x)+y'(x-h))&=\frac{2h}3\left(2y'(x)+\sum_j\frac{y^{(2j+1)}(x)h^{2j}}{(2j)!}\right)&=2y'(x)h+\frac23\frac{y'''(x)h^3}{2!}+\frac23\frac{y^{(5)}(x)h^{5}}{4!}+... \\[1.5em]\hline \text{in the difference }y(x+h)-y(x-h)&-\frac{h}3(y'(x+h)+4y'(x)+y'(x-h))&=-\frac43\frac{y^{(5)}(x)h^{5}}{5!}+... \end{alignat} so that in general, the truncation error is $O(h^5)$.