I am trying to prove that when solving numerically diff. eq.: $$ y'(t)=f(t,y(t)), \hspace{0.5cm} y(t_{0})=y_{0} $$ using trapezoidal rule, namely: $$ y_{n+1}=y_{n} + \frac{h}{2} \left( f(t_{n},y_{n}) + f(t_{n+1},y_{n+1}) \right) $$ we get LTE (local truncation error) proportional to $C h^{3}$, $C=const$.

Let's denote LTE in $n+1$-th step as: $$ e_{n+1}= \phi(t_{n+1}) - y_{n+1} $$ where $\phi(t_{n})$ represents the actual solution of our problem at $t=t_{n}$ and we assume that at the $n$-th step our approximating solution is exact with the real one ($\phi(t_{n}) = y_{n}$).

I know that the most common method starts at representing $\phi(t)$ as the Taylor series about $t_{n+1}=t_{n}+h$ and using the fact that $\phi'(t_{n}) = f(t_{n},\phi(t_{n}))$. In this particular example I used two Taylor representations: $\phi(t_{n+1})=\phi(t_{n}+h)$ and $\phi(t_{n+1}-h)=\phi(t_{n})$. Combining them resulted in the formula: $$ \phi(t_{n+1})=\phi(t_{n}) + \frac{h}{2}(\phi'(t_{n})+\phi'(t_{n+1})) + \frac{h^{2}}{4}(\phi''(t_{n})-\phi''(t_{n+1})) + \frac{h^{3}}{12}(\phi'''(\xi_{n})+\phi'''(\eta_{n+1})) $$ where: $$ t_{n}<\xi_{n}<t_{n}+h $$ $$ t_{n}<\eta_{n+1}<t_{n}+h $$ So plugging this obtained formula for $\phi(t_{n+1})$ into the equation $$ e_{n+1} = \phi(t_{n+1}) - y_{n+1} = \phi(t_{n+1}) -y_{n} - \frac{h}{2} \left( f(t_{n},y_{n}) + f(t_{n+1},y_{n+1}) \right) $$ and assuming that $\phi(t_{n})=y_{n}$ resulted in: $$ e_{n+1} = \frac{h^{2}}{4}(\phi''(t_{n})-\phi''(t_{n+1})) + \frac{h^{3}}{12}(\phi'''(\xi_{n})+\phi'''(\eta_{n+1})) $$ So it would be $e_{n+1}=O(h^{2})$, not $O(h^{3})$ (and we know that it is $O(h^{3})$). I saw in the literature that assuming correctness of approximation at $t_{n}$ means that trapezoidal rule can be represented as: $$ y_{n+1} = y_{n} + \frac{h}{2} \left( f(t_{n},\phi(t_{n})) + f(t_{n+1},\phi(t_{n+1})) \right) $$ but it doesn't make sense to me because of the correctness of the term $\phi(t_{n+1})$.

I hope that I presented my problem clearly, thanks in advance for any help with solving it!


you are almost there: The term $\phi''(t_{n})-\phi''(t_{n+1})$ is $ h * \phi'''(\eta)$ for some $t_n \le \eta \le t_{n+1}$

The trapzoidal is symmtery at $t_n + \frac{1}{2}h$. The elegant way to do it is to expand $\phi(t_n) $ and $\phi(t_{n+1})$ at $t_n + \frac{1}{2}h$.

  • $\begingroup$ You're right, of course. But then I would get $ e_{n+1}= -\frac{h^{3}}{4} * \phi'''(\eta) + \frac{h^3}{12}\phi'''(\xi) = -\frac{h^3}{6}\phi'''(\mu) $ for some $t_{n}<\mu<t_{n+1}$. This is of course $O(h^{3})$ but the theoretical error should be $\frac{h^3}{12}\phi'''(\mu)$, right? $\endgroup$ – Mat Dyl Feb 4 '16 at 23:17
  • $\begingroup$ Your Taylor expansion might be off somewhere. check your calculation. $\endgroup$ – runaround Feb 5 '16 at 0:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.