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

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

(5.1)

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

(5.2)

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 *u*_{0 }satisfies the non-homogeneous boundary
condition

(5.4)

and *u*_{i}(*x*), *i* =1, 2, . . , *n*, satisfy the homogeneous
boundary conditions

(5.5)

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

(5.6)

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

Consider the so called **residual**:

(5.7)

Choose the coefficients *c*_{i} so that the square of the residual.

(5.8)

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** *u*_{i}.

Orthogonality occurs if

i.e., when

This is a system of linear algebraic equations for the *c*_{i}.

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

(5.10)

(5.11)

**Solution****:** Select as system of **base
functions the trigonometric functions**

(5.12)

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

Hence

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 2*x*, cos 2*x,*.. .

i.e.

whence

Thus

The next table presents values of the approximate solution and the exact solution *y = e*^{sin 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 u_{1}(*x*) and *u*_{2}(*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

Thus,

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.

**Exercises**

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