# Why is the Lax-Wendroff Finite Difference scheme 2nd order in time and space?

I'm struggling to understand why the Lax-Wendroff scheme is second-order in time and space.

My derivation of the scheme for the linear wave equations is as follows: $$$$u_{t} +cu_x = 0$$$$ $$$$u_{tt}=c^2u_{xx}$$$$ Taylor expansion in time including 2nd derivative: $$$$u_i^{n+1}=u_i^n+\Delta tu_t+\frac{1}{2}\Delta t^2u_{tt}+O(\Delta t^3)$$$$ $$$$u_i^{n+1}=u_i^n-c\Delta tu_x+\frac{1}{2}c\Delta t^2u_{xx}+O(\Delta t^3)$$$$ Finite differences for the 1st and 2nd spatial derivatives: $$$$u_{i+1}^n=u_i^n+\Delta xu_x+\frac{1}{2}\Delta x^2u_{xx}+\frac{1}{6}\Delta x^3u_{xxx}+O(\Delta x^4)$$$$ $$$$u_{i-1}^n=u_i^n-\Delta xu_x+\frac{1}{2}\Delta x^2u_{xx}-\frac{1}{6}\Delta x^3u_{xxx}+O(\Delta x^4)$$$$

Central difference approximation gives an expression for the first derivative: $$$$u_x=\frac{u_{i+1}^n-u_{i-1}^n}{2\Delta x}+O(\Delta x^2)$$$$ Summation of the two finite differences gives an approximate expression for the second derivative: $$$$u_{xx}=\frac{u_{i+1}^n-2u_i^n+u_{i-1}^n}{\Delta x^2}+O(\Delta x^2)$$$$ Substituting the spatial finite differences into the temporal expansion gives the Lax-Wendroff method: $$$$u_i^{n+1}=u_i^n-\frac{c\Delta t}{2\Delta x}(u_{i+1}^n-u_{i-1}^n)+\frac{1}{2}(\frac{c\Delta}{\Delta x})^2(u_{i+1}^n-2u_i^n+u_{i-1}^n)+O(\Delta x^2,\Delta t^2)$$$$ I understand the derivation fine, but, I am unsure why the scheme is considered 2nd order accurate in time when it rejects terms of order 3. Is this purely because the spatial accuracy is 2nd order and therefore, the temporal accuracy is 2nd order?

I'm really sorry if this is a silly question; I could not find information about why this is!

Appreciate any help, thank you.

The idea is that when you rearrange your third line: $$\ u_i^{n+1}=u_i^n+Δtu_t+\frac 12 Δt^2u_{tt}+O(Δt^3)$$ to make the term$$\ u_t$$ be the subject, you divide through by$$\ Δt$$ and hence the order of error becomes$$\ O(Δt^2)$$. This is relevant because of course your original equation $$\ u_t+cu_x=0$$ directly requires$$\ u_t$$ and this is what order of accuracy refers to, not the level of taylor series expansion carried out (or, not directly, anyway).