# Local truncation error and convergence

I am trying to find the local truncation error and the order of convergence of the finite difference scheme $$\frac{3U^m_n -4U^{m-1}_n + U^{m-2}_n}{2 \Delta t} - \frac{a}{ h^2} \lbrace U^m_{n+1} -2 U^m_n + U^m_{n-1} \rbrace = f(x_n, t_{m})$$ Using Taylors expansion I found the truncation error to be $$\tau(x,t)= f_{t}(x,t) - \frac{\Delta t^2}{3}f_{ttt}(x,t) - \frac{a}{2} f_{xx}(x,t) - \frac{h^2}{24}f_{xxxx}(x,t) + O(\Delta t^3 + h^4)$$ My first question is: Is this the correct way to display the truncation error?

My second question is: Does the error converge with order 3 in time and 4 in space since I have $O(\Delta t^3 + h^4)$ ?

-

I assume that you study the equation $v_t-av_{xx}=f(t,x)$ (at least your scheme suggests it) with a solution $u(t,x)$
You define a discrete function $g(m,n) = u(m\Delta t,n\Delta x)$ and plug it into your scheme. After using Taylor expansion in a well-chosen point (hint: $(m\Delta t,n\Delta x)$), you obtain
$$u_t(m\Delta t,n\Delta x)+\mathcal O(\Delta t^2) - a(u_{xx}(m\Delta t,n\Delta x)+\mathcal O(\Delta x^2)).$$ By taking into account that the differential equation is satisfied, we arrive to a truncation error $$\mathcal O(\Delta t^2+\Delta x^2) .$$