# Local truncation error of given implicit 1-step scheme

I'm given the 1-step implicit scheme $$y_{n+1} = y_n + \frac{h}{6}[4f(t_n, y_n) + 2f(t_{n+1}, y_{n+1}) + hf'(t_n, y_n)],$$ where $$y'(t) = f(t, y)$$, and I'm seeking the scheme's local truncation error. I've been able to use a Taylor series to get that $$e_n(h) = hy'(t_{n+1}) - \frac{h^2}{2}y''(t_{n+1}) + O(h^3) - \frac{2h}{3}f(t_n, y(t_n)) + \frac{h}{3}f(t_{n+1}, y(t_{n+1})) + \frac{h^2}{6}f'(t_n, y(t_n))$$, but I'm having trouble understanding what the $$f(t_n, y(t_n))$$ terms even represent. If $$f(t, y) = y'(t),$$ how can the expression $$f(t_n, y(t_n))$$ make much sense?

You insert the exact solution on both sides so that $$y'(t_{n+1})=f(t_{n+1},y(t_{n+1}))$$ and $$y''(t_{n})=f'(t_{n},y(t_{n}))$$. Thus \begin{align} O(h^{p+1})=g(h)&=-y(t+h)+y(t)+\frac{h}{6}[4y'(t)+2y'(t+h)+hy''(t)]\\ &=\left[y(t)+\frac{2h}3y'(t)\right]-\left[y(t+h)-\frac{h}3y'(t+h)\right]+\frac{h^2}6y''(t) \end{align} Then compute derivatives until the last is generally not zero for $$h=0$$. \begin{align} g'(h)&=\left[\frac{2}3y'(t)\right]-\left[\frac23y'(t+h)-\frac{h}3y''(t+h)\right]+\frac{h}3y''(t)\\ g''(h)&=-\left[\frac13y''(t+h)-\frac{h}3y'''(t+h)\right]+\frac{1}3y''(t)\\ g'''(h)&=-\left[-\frac{h}3y^{(4)}(t+h)\right]\\ \end{align} Thus $$g(h)=O(h^4)$$ and $$p=3$$ as order of the method.