9.4 Section 2 Background .1 Cosmology .11 Math Section 9.6

Book 9 Computational Mathematics Chapter 9 Ordinary Differential Equation Initial Value Problems

Section 5 Galerkin's Method

Consider next two analytical methods which allow to find approximate analytical solutions of linear boundary value problems, namely the methods of Galerkin and collocation. Given the boundary value problem (1.3) and (1.4), introduce the notation


Let there be given on an interval [a,b] the system of base functions


which are:

1. Orthogonal, i.e.,

( 5.3)

2. Complete, i.e,. there exists no other non-zero function which is orthogonal to all the functions.

3. The system has been chosen in such a manner that u0 satisfies the non-homogeneous boundary condition


and ui(x), i =1, 2, . . , n, satisfy the homogeneous boundary conditions


The solution of Problem (1.3) and (1.4) will be sought in the form


By (5.4) and (5.5), this function satisfies the boundary conditions (1.4).

Consider the so called residual:


Choose the coefficients ci so that the square of the residual.


will have a minimum value.

It can be shown ( [2], [13], [18]) that this occurs only if R is orthogonal to all the base functions ui.

Orthogonality occurs if

i.e., when

This is a system of linear algebraic equations for the ci.

Note that for the choice of the basic functions orthogonality is not obligatory, if the coefficients are chosen starting from the extreme value condition of the integral (5.8). For instance, taking as base of the complete system functions, which are orthogonal on the interval [a, b], one may use as base functions linear combinations of functions of this system. It is only necessary and sufficient that the chosen functions be linearly independent on that interval.

Example l: Use Galerkin's method to solve the boundary value problem


Solution: Select as system of base functions the trigonometric functions


They are linearly independent on the interval [-p, p], the function u0 satisfies the boundary condition (5.11), and the remaining functions satisfy zero boundary conditions. Seek the solution in the form


Introduce for the coefficients of (5.9) the notation

and take into consideration the orthogonality of the system of trigonometric functions 1, sin x, cos x, sin 2x, cos 2x,.. .




The next table presents values of the approximate solution and the exact solution y = esin x + 1.

Example 2: Apply Galerkin's method to obtain the approximate solution of the boundary value problem

Solution: Use the base functions

They are linearly independent and satisfy the zero boundary conditions. Seek the approximate solution in the form

Substitution on the left hand side of (5.13) yields the residual

Taking into account the orthogonality of R with respect to u1(x) and u2(x), one arrives at the system

Substitution of R into this system and evaluation of the integrals yields the linear algebraic equations

with the solution


The next table presents the values of this approximation and the exact solution y = (sin x)/(sin 1) - x

Note: These two examples show that an adequate choice of the base functions allows to analytically approximate the solutions of boundary value problems in an analytic form.

If the functions p(x), q(x) and f(x) in (1.3) are complicated, then the computation of the coefficients of (5.9) becomes cumbersome. ln such cases it is advisable to use either difference methods or the collocation method, treated in the next Section.


Apply Galerkin's method to the solution of the boundary value problems: