1.1.5.4. Second Order Formulas

1.1.5.4.1. Question

How to define a second order finite difference formula for three upwind points?

1.1.5.4.2. Selection of the Mesh Points

Choose: \((i-2)\), \((i-1)\) and \(i\)

1.1.5.4.3. Finite Difference Formula with Three Coefficients

(1)\[(u_x)_i = {{a u_i + b u_{i-1} + c u_{i-2}} \over {\Delta x}} + O(\Delta x^2)\]

1.1.5.4.4. Taylor Expansion for i-2 and i-1

(2)\[u_{i-1} = u_i - \Delta x(u_x)_i + {{(\Delta x)^2} \over 2}(u_{xx})_i - {{(\Delta x)^3} \over 6}(u_{xxx})_i + O(\Delta x^4)\]
(3)\[u_{i-2} = u_i - 2 \Delta x(u_x)_i + {{(2 \Delta x)^2} \over 2}(u_{xx})_i - {{(2 \Delta x)^3} \over 6}(u_{xxx})_i + O(\Delta x^4)\]

1.1.5.4.5. Substitute (2) and (3) into (1)

(4)\[(u_x)_i = {{a u_i + b u_{i-1} + c u_{i-2}} \over {\Delta x}} = {{(a+b+c) u_i - \Delta x(b+2c)(u_x)_i + {{\Delta x^2} \over 2} (b+4c)(u_{xx})_i} \over {\Delta x}}\]

1.1.5.4.6. Compare the Coefficients

\[a + b + c = 0 \quad \Rightarrow \quad a = 1.5\]
\[b + 2c = -1 \quad \Rightarrow \quad -4c + 2c = -1 \quad \Rightarrow \quad c=0.5\]
\[b + 4c = 0 \quad \Rightarrow \quad b = -4c \quad \Rightarrow \quad b = -2\]

1.1.5.4.7. Update Formula for \(u_{x}\)

\[(u_{x})_i = {{3 u_i -4 u_{i-1} + u_{i-2}} \over {2 \Delta x}}\]

Notice that the Formula \(a+b+c=0\) applies for all finite difference formulas