<s>[INST] Truncation error I wonder if the truncation error that I derived in the following approximation really has order 2? If so I also wonder what happens to the $u_{xxxx}$ term since it does not cancel out?
$$u^n_{j+2}-4u^n_{j+1}+6u^n_j-4u^n_{j-1}+u^n_{j-2}$$
$$=\frac{1}{\Delta x^4}(u+2\Delta x u_x+\frac{4}{2}\Delta x^2 u_{xx}+\frac{8}{3!}\Delta x^3u_{xxx}+\frac{16}{4!}\Delta x^4 u_{xxxx}+\frac{32}{5!}\Delta x^5 u_{xxxxx}+\frac{64}{6!}\Delta x^6 u_{xxxxxx}$$
$$
-4(u+\Delta x u_x+\frac{1}{2}\Delta x^2 u_{xx}+\frac{1}{3!}\Delta x^3 u_{xxx}+\frac{1}{4!} \Delta x^4 u_{xxxx}+\frac{1}{5!}\Delta x^5 u_{xxxxx}+\frac{1}{6!}\Delta x^6 u_{xxxxxx})$$
$$
+6u-4(u-\Delta x u_x + \frac{1}{2} \Delta x^2 u_{xx} - \frac{1}{3!} \Delta x^3 u_{xxx}+ \frac{1}{4!}\Delta x^4 u_{xxxx}-\frac{1}{5!}\Delta x^5 u_{xxxxx}+\frac{1}{6!}\Delta x^6 u_{xxxxxx})$$
$$+u-2\Delta x u_x + \frac{4}{2}\Delta x^2 u_{xx}-\frac{8}{3!} \Delta x^3 u_{xxx}+ \frac{16}{4!} \Delta x^4 u_{xxxx}-\frac{32}{5!}\Delta x^5 u_{xxxxx}+\frac{64}{6!}\Delta x^6 u_{xxxxxx}+O(\Delta x^7))$$
$$=O(\Delta x^2)$$
 [/INST] By taylor series expansions (setting $\Delta x=h$)
\begin{align}u^n_{j+2}&=u+2h u_x+4h^2u_{xx}+8h^3u_{xxx}+16h^4 u_{xxxx}+32h^5u_{xxxxx}+64h^6u_{xxxxxx}\\&+O(h^7),\\
-4u^n_{j+1}&=-4u-4h u_x-4h^2u_{xx}-4h^3u_{xxx}-4h^4 u_{xxxx}-4h^5u_{xxxxx}-4h^6u_{xxxxxx}\\&+O(h^7),\\
6u^n_{j}&=6u,\\
-4u^n_{j-1}&=-4u+4h u_x-4h^2u_{xx}+4h^3u_{xxx}-4h^4 u_{xxxx}+4h^5u_{xxxxx}-4h^6u_{xxxxxx}\\&+O(h^7),\\
u^n_{j-2}&=u-2h u_x+4h^2u_{xx}-8h^3u_{xxx}+16h^4 u_{xxxx}-32h^5u_{xxxxx}+64h^6u_{xxxxxx}\\&+O(h^7),
\end{align}
we see that everything cancels up to the $u_{xxxx}$ terms as
$$16h^4-4h^4-4h^4+16h^4 \ne 0.$$
The $u_{xxxxxx}$ terms also don't cancel because
$$64h^6-4h^6-4h^6+64h^6 \neq 0,$$
so if we make the above cancellations then
\begin{align}\frac {1}{h^4}\left(u^n_{j+2}-4u^n_{j+1}+6u^n_j-4u^n_{j-1}+u^n_{j-2}\right)&=24u_{xxxx}+120h^2u_{xxxxxx}\\&=
24u_{xxxx}+O(h^2).
\end{align}
</s>