0
$\begingroup$

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: \begin{equation} u_{t} +cu_x = 0 \end{equation} \begin{equation} u_{tt}=c^2u_{xx} \end{equation} Taylor expansion in time including 2nd derivative: \begin{equation} u_i^{n+1}=u_i^n+\Delta tu_t+\frac{1}{2}\Delta t^2u_{tt}+O(\Delta t^3) \end{equation} \begin{equation} u_i^{n+1}=u_i^n-c\Delta tu_x+\frac{1}{2}c\Delta t^2u_{xx}+O(\Delta t^3) \end{equation} Finite differences for the 1st and 2nd spatial derivatives: \begin{equation} 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) \end{equation} \begin{equation} 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) \end{equation}

Central difference approximation gives an expression for the first derivative: \begin{equation} u_x=\frac{u_{i+1}^n-u_{i-1}^n}{2\Delta x}+O(\Delta x^2) \end{equation} Summation of the two finite differences gives an approximate expression for the second derivative: \begin{equation} u_{xx}=\frac{u_{i+1}^n-2u_i^n+u_{i-1}^n}{\Delta x^2}+O(\Delta x^2) \end{equation} Substituting the spatial finite differences into the temporal expansion gives the Lax-Wendroff method: \begin{equation} 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) \end{equation} 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.

$\endgroup$

1 Answer 1

1
$\begingroup$

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).

It's funny, I was just having a conversation about this, hopefully this is sufficient for you. Also, sorry if this is a badly formatted response, it's my first post here.

$\endgroup$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .