The finite difference method is widely used for solving differential equations by approximating derivatives at discrete grid points. However, several alternative methods, such as the collocation method, the Galerkin method and the Rayleigh-Ritz method, offer practitioners of the finite difference method new perspectives on computing solutions for differential equations.
At the the core of these alternative approaches lies the idea of approximating the solution of a differential equation using a finite linear combination of known functions, called basis functions. These basis functions are typically simple, such as polynomials, trigonometric functions, or, spline functions.
We illustrate these methods by solving the following linear two-point boundary-value problem
Here, the interval is taken to be for simplicity, and the boundary conditions are zero (see A boundary-Value Problem Transformed).
Suppose we approximate by a finite sum
where the basis functions satisfy the boundary conditions:
Given a set of basis functions, each method uses a different criterion for determining the coefficients in the finite sum.
The collocation method requires that the approximation satisfy the differential equation at discrete points (which are not necessarily equally spaced) within the interval :
It follows that
This is a system of linear equations of the form
where is the matrix with entries and Solving this system provides the coefficients
Fig. 1 solved by the collocation method
Exercise-1 Solve by the collocation method. (Hint: Fig. 1)