Numerical Methods

Finite Difference Method

Finite Difference method :The finite difference techniques are based upon the approximations that permit replacing differential equations by finite difference equations. These finite difference approximations are algebraic in form, and the solutions are related to grid points.

Thus, a finite difference solution basically involves three steps:

1. Dividing the solution into grids of nodes.

2. Approximating the given differential equation by finite difference equivalence that relates the solutions to grid points.

3. Solving the difference equations subject to the prescribed boundary conditions and/or initial conditions.

Finite difference method Subdivide the interval [a, b] into n equal sub-intervals. The length of the sub-interval is called the step length. We denote the step length by Δx or h. Therefore

The points a = x0, x1 = x0 h, x2 = x0 2h, ....., xi = x0 ih, ....., xn = x0 nh = b, are called the nodes or nodal points or lattice points in figure.

figure Nodes

We denote the numerical solution at any point xi by yi and the exact solution by y(xi). The approximations to the derivatives. Approximation to y′(xi) at the point      x = xi

(i) Forward difference approximation of first order or O(h) approximation:

...................1.1

(ii) Backward difference approximation of first order or O(h) approximation:

.....................1.2

(iii) Central difference approximation of second order or O(h2) approximation:

................1.3

Central difference approximation of second order or O(h2) approximation:

or,

................1.4

Applying the differential equation (5.3) at the nodal point x = xi, we obtain

..............1.5

Since y(a) = y(x0) = A and y(b) = y(xn) = B are prescribed, we need to determine the numerical solutions at the n – 1 nodal points x1, x2, ..., xi, ...., xn–1.
Now, y′(xi) is approximated by one of the approximations given in Eqs. (1.1), (1.2), (1.3) and y″(xi) is approximated by the approximation given in Eq.(1.4). Since the approximations (1.3) and (1.4) are both of second order, the approximation to the differential equation is of second order. However, if y′(xi) is approximated by (1.1) or (1.2), which are of first order, then the approximation to the differential equation is only of first order. But, in many practical problems, particularly in Fluid Mechanics, approximations (1.3), (1.4) give better results (nonoscillatory solutions) than the central difference approximation (1.3).