We consider an autonomous initial value ODE
-
![{\displaystyle y'(t)=f(y(t))\quad {\text{with}}\quad y(t_{0})=y_{0}\,.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/a9f4354d69ca9ba0ecff3a53f5604df36cafac02)
|
|
(ODE)
|
Applying the Tradezoidal rule
gives the implicit Runge-Kutta method
-
![{\displaystyle y_{n+1}=y_{n}+{\frac {h}{2}}\left(f(y_{n})+f(y_{n+1})\right)\,.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/5f071b3507e2a9412e28e45be6f4bf07cb8ce47b)
|
|
(method)
|
We will show that (method) is second order.
Expanding the true solution
about
using Taylor series, we have
![{\displaystyle y(t_{n}+h)=y(t_{n})+hy'(t_{n})+{\frac {h^{2}}{2}}y''(t_{n})+{\frac {h^{3}}{3!}}y'''(t_{n})+O(h^{4})\,.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/2da92b7b9b44e5f854d2aed728d05b055b4aa47f)
Since
satisfies (ODE), we can substitute
and obtain
-
![{\displaystyle y(t_{n}+h)=y(t_{n})+hf(y(t_{n}))+{\frac {h^{2}}{2}}f'(y(t_{n}))f(y(t_{n}))+{\frac {h^{3}}{3!}}\left[f''(y(t_{n}))(f(y(t_{n})))^{2}+(f'(y(t_{n})))^{2}f(y(t_{n}))\right]+O(h^{4})\,.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/33519fe1dd55869aa93e134791ff9cbc7b5c37fd)
|
|
(true)
|
In (method) we can assume
since that is the previous data.
Subtracting (method) from (true) gives us the local truncation error
-
![{\displaystyle y(t_{n}+h)-y_{n+1}={\frac {h}{2}}\left[f(y(t_{n}))-f(y_{n+1})\right]+{\frac {h^{2}}{2}}f'(y(t_{n}))f(y(t_{n}))+{\frac {h^{3}}{3!}}\left[f''(y(t_{n}))(f(y(t_{n})))^{2}+(f'(y(t_{n})))^{2}f(y(t_{n}))\right]+O(h^{4})\,.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/f0e9c493fc6a16fcb1fe8e02df82466ca183d6ed)
|
|
(error1)
|
In order to cancel more terms we need to expand
.
However,
so we cannot do a regular Taylor expansion.
Instead we can plug (method) back into
and then do a Taylor expansion to obtain
-
![{\displaystyle {\begin{aligned}f(y_{n+1})&=f\left(y(t_{n})+{\frac {h}{2}}\left(f(y(t_{n}))+f(y_{n+1})\right)\right)\\&=f(y(t_{n}))+{\frac {h}{2}}\left(f(y(t_{n}))+f(y_{n+1})\right)f'(y(t_{n}))+{\frac {h^{2}}{8}}\left(f(y(t_{n}))+f(y_{n+1})\right)^{2}f''(y(t_{n}))+O(h^{3})\,.\end{aligned}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/d5ea47a835c8dc28982eb3921f8e61981a2b3904)
|
|
(implicit)
|
Substituting (implicit) into (error1) yields
-
![{\displaystyle {\frac {h^{2}}{4}}f'(y(t_{n}))\left[f(y(t_{n}))-f(y_{n+1})\right]+{\frac {-h^{3}}{16}}\left(f(y(t_{n}))+f(y_{n+1})\right)^{2}f''(y(t_{n}))+{\frac {h^{3}}{3!}}\left[f''(y(t_{n}))(f(y(t_{n})))^{2}+(f'(y(t_{n})))^{2}f(y(t_{n}))\right]+O(h^{4})\,.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/735b116cfb64fb948c90d28ae837a58fdcf83b3e)
|
|
(error2)
|
This substitution was productive since the
terms canceled.
We can do this trick again, but this time only need (implicit) up to
since everything will be multiplied by at least
and this can go into the
.
Substituting (implicit) in for the first occurance of
in (error2) yields
-
![{\displaystyle {\frac {h^{3}}{2}}\left\{f''(y(t_{n}))\left[{\frac {1}{3}}(f(y(t_{n})))^{2}+{\frac {-1}{8}}\left(f(y(t_{n}))+f(y_{n+1})\right)^{2}\right]+(f'(y(t_{n})))^{2}\left[{\frac {1}{3}}f(y(t_{n}))+{\frac {-1}{4}}\left(f(y(t_{n}))+f(y_{n+1})\right)\right]\right\}+O(h^{4})\,.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/8cf72614bbaded1ef6cec2fa33bf48f6b7e068bc)
|
|
(error3)
|
This substitution was productive since the
terms canceled. We can do this again, now truncating (implicit) at
.
Substituting (implicit) into (error3) yields
![{\displaystyle {\frac {-h^{3}}{12}}\left\{f''(y(t_{n}))(f(y(t_{n})))^{2}+(f'(y(t_{n})))^{2}f(y(t_{n}))\right\}+O(h^{4})\,.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/4ffe15cf8cbfbdb632c23cbea101c389caa5e00e)
Since the
term does not cancel, we have shown that the local truncation error is
and thus the method is order 2.