# Numerical Analysis/Order of RK methods/Implicit RK2 on an Autonomous ODE

We consider an autonomous initial value ODE

$y'(t)=f(y(t))\quad {\text{with}}\quad y(t_{0})=y_{0}\,.$ (ODE)

Applying the Tradezoidal rule gives the implicit Runge-Kutta method

$y_{n+1}=y_{n}+{\frac {h}{2}}\left(f(y_{n})+f(y_{n+1})\right)\,.$ (method)

We will show that (method ) is second order.

Expanding the true solution $y(t_{n}+h)$ about $t_{n}$ using Taylor series, we have

$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})\,.$ Since $y(t)$ satisfies (ODE ), we can substitute $y'(t)=f(y(t))$ and obtain

$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})\,.$ (true)

In (method ) we can assume $y_{n}=y(t_{n})$ since that is the previous data. Subtracting (method ) from (true ) gives us the local truncation error

$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})\,.$ (error1)

In order to cancel more terms we need to expand $f(y_{n+1})$ . However, $y_{n+1}\not =y(t_{n}+h)$ so we cannot do a regular Taylor expansion. Instead we can plug (method ) back into $f$ and then do a Taylor expansion to obtain

{\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}} (implicit)

Substituting (implicit ) into (error1 ) yields

${\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})\,.$ (error2)

This substitution was productive since the $h$ terms canceled. We can do this trick again, but this time only need (implicit ) up to $O(h^{2})$ since everything will be multiplied by at least $h^{2}$ and this can go into the $O(h^{4})$ . Substituting (implicit ) in for the first occurance of $f(y_{n+1})$ in (error2 ) yields

${\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})\,.$ (error3)

This substitution was productive since the $h^{2}$ terms canceled. We can do this again, now truncating (implicit ) at $O(h)$ . Substituting (implicit ) into (error3 ) yields

${\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})\,.$ Since the $h^{3}$ term does not cancel, we have shown that the local truncation error is $O(h^{3})$ and thus the method is order 2.