Next: Variational Formulation
Up: BOUNDARY VALUE PROBLEMS (BVP)
Previous: Collocation Method:
  Contents
Choose
, the basis of the trial space.
If we used a different basis we have Petrov-Galerkin. So
ie we require that
be orthogonal to
.
Example:
Again the nodes are
,
and
.
and
by boundary conditions.
So we only have to work out things for node 2:
or
However we can rewrite using integration by parts
but
at
and
so the last term is zero.
Another Comparative Example
Solve the
The exact solution is clearly
.
First, let's solve this problem using:
A) Collocation Technique
seek a function
that satisfies BVP at a
discrete set of mesh points in interval. We choose
as a simple
polynomial, capable of satisfying the boundary conditions and with
the regularity suggested by the BVP.
For illustration
only 1 point
and
, at
.
So for
we require that
at 3 points requires 3 equations:
|
(86) |
 |
|
(87) |
 |
equations (86) and (87) lead to
and for some
For us
Thus
|
(88) |
 |
So solving (86), (87), (88) get
,
,
thus the approximate solution is
. A comparison to the exact solution appears in Figure
(15)
Figure 15:
Comparison of exact and approximate solution via collocation
|
|
B) FEM/Galerkin Method:
Same BVP and use same 3 mesh points,
which now become ``knots'' in the piecewise polynomial
approximation. Take ``hat'' basis or elements, which are shown in
Figure (16).
Figure 16:
Hat functions, on the unit interval.
|
|
So
.
Applying the boundary conditions,
Galerkin condition applied at
residual must be
orthogonal to space spanned by the basis functions and hence to each
basis individually
integrate by parts:
|
|
|
|
 |
|
|
|
|
since term
drops out, thus |
|
|
|
|
 |
where
.
Substituting
and
gives
in ($). We
conclude that the approximation is
A comparison of the exact and approximated solution appears in Figure
(17).
Figure 17:
Comparison of exact and FEM approximate solution
|
|
Remark:
One particularly nice feature of Galerkin/FEM and collocation methods is
that the approximation
of the solution
is defined over all
of the range of
prescribed in the problem statement. This is not
true for the finite difference solution, which only gives you an
approximation
of
, at specified locations
defined by the
grid.
We'll consider more BVP issues in the context of PDE's, which is in the
next part of the courseII.
Next: Variational Formulation
Up: BOUNDARY VALUE PROBLEMS (BVP)
Previous: Collocation Method:
  Contents
Juan Restrepo
2003-05-02