Solution (source code)

= Solution

Let $\delta_x^2u_m=u_{m-1}-2u_m+u_{m+1}$. For an exact smooth solution of the <diffusion equation>, the <second-order central difference> gives
$$
\delta_x^2u(x,t)=h^2u_{xx}(x,t)+\frac{h^4}{12}u_{xxxx}(x,t)+O(h^6).
$$
Since the <Courant number> $\mu=k/h^2$ is fixed, $h^2=O(k)$. Taylor expansion in time gives
$$
\begin{aligned}
u(t+k)-u(t)&=ku_t+\frac{k^2}{2}u_{tt}+O(k^3),\\
\frac32\mu\delta_x^2u(t)-\frac12\mu\delta_x^2u(t-k)
&=ku_{xx}+\frac{k^2}{2}u_{xxt}+O(kh^2)+O(k^3).
\end{aligned}
$$
Using $u_t=u_{xx}$ and $u_{tt}=u_{xxt}$ cancels the leading terms. Because $kh^2=O(k^2)$, the residual, and hence the <local truncation error> in the convention of the question, is
$$
\boxed{O(k^2).}
$$