Wednesday, December 24, 2014

Finite Difference: Central Difference

The equation for Central Difference can be found by subtracting the equations for the Forward and Backward differencing schemes.

Forward Difference:
\begin{equation}
u(x_0+\Delta x,y_0) = u(x_0, y_0) + \Delta x \frac{\partial u}{\partial x} + \frac{\Delta x^2}{2!} \frac{\partial^2 u}{\partial x^2} + \frac{\Delta x^3}{3!} \frac{\partial^3 u}{\partial x^3} + O(\Delta x^4)
\end{equation}

Backward Difference:
\begin{equation}
u(x_0-\Delta x,y_0) = u(x_0, y_0) - \Delta x \frac{\partial u}{\partial x} + \frac{\Delta x^2}{2!} \frac{\partial^2 u}{\partial x^2} - \frac{\Delta x^3}{3!} \frac{\partial^3 u}{\partial x^3} + O(\Delta x^4)
\end{equation}

Subtracting these two equations $u(x_0+\Delta x,y_0) - u(x_0-\Delta x,y_0)$
\begin{align}
u(x_0+\Delta x,y_0) - u(x_0-\Delta x,y_0) = 0 + 2\Delta x \frac{\partial u}{\partial x} + 0 + O(\Delta x^3)\\
\frac{u(x_0+\Delta x,y_0) - u(x_0-\Delta x,y_0)}{2 \Delta x} = \frac{\partial u}{\partial x} + O(\Delta x^2)
\end{align}

No comments:

Post a Comment