A mimimum of theory for FD (finite difference) methods
1 The problem
We consider here a special type of a two point boundary value problem:
Find a function
of the real variable
which satisfies
the ordinary differential equation
|
and the boundary conditions
|
Here
are given functions of 3 respectively 4 variables.
The simplest model for the boundary conditions is clearly
which is also used in some of our examples.
For general cases of
there exist no existence results,
not to speak about uniqueness. Indeed in our examples there are two
quite harmless looking cases which have two solutions and cases of
nonsolvability can easily be constructed. Hence the situation here is
quite different from the case of initial value problems.
We assume in the following that a solution exists which is also sufficiently
often differentiable in the interior of
, typically we will need
four derivatives of
at least.
2 Solution by discretization
We now replace the continuous problem by one in finitely many unknowns
by a technique known as discretization by finite differences:
- Step 1:
-
We choose a grid of constant width
for
and
. We write now
|
with the simplifying notation
,
.
- Step 2:
-
We replace the derivatives of
at
by suitable derivatives of interpolation
polynomials of some neighboring points
.
For reasons concerning the properties of the resulting system of
equations the degree chosen usually is 1 or 2.
For example with
|
- Step 3:
-
Let
denote the approximation for
. We get, by neglecting
the
terms the following system defining it:
|
- Step 4:
- The treatment of the boundary conditions.
We first stick on the homogeneous conditions
resulting in
This leads to a system of
coupled equations for the unknown
approximations
for the values
.
This system will be nonlinear if the function
is nonlinear in
or
.
Example
, i.e.
:
|
By directly using the known values at the boundaries there
remains a system of equations for
.
As usual in finite difference methods, the truncation error of this method
is defined as the residual one obtains by inserting the true solution
of the boundary value problem into the discretized system, for example in the
case of discretizing
by the onesided difference quotient as
|
which is of order
in the middle part and
in the first and the
last component. In case of the simple Dirichlet boundary conditions
the first and the last component of this vector are zero of course.
For this special case considered here there exists an existence and uniqueness
theorem, which however requires strong (sufficient) conditions
Theorem 1
Assume
. Moreover assume that
there holds
|
for all
and that
for all
,
.
Then the boundary value problem with homogeneous Dirichlet boundary conditions
is uniquely solvable. The discretized system is also uniquely solvable if
|
If
is linear in
and
then
suffices for this.
The discretized solution
satisfies
|
for some constant
(i.e. the method has convergence order 2).
If in addition
, then
there holds more precisely with some smooth functions
:
|
The last assertion in this theorem says that the global error
behaves itself like a smooth function of
(
fixed). Now imagine
to compute such a discretized solution on grids with size
These grids are coherent and on the crudest grid you win several approximate
values of increasing precision. And obviously
|
and finally
|
Obviously this technique is the same as used in Romberg's method of quadrature
and can be continued to get even higher order of convergence.
This is a special case of Richardson's extrapolation to the limit.
We use it here for the two stages shown above.
Next we have to discuss the case of general boundary conditions.
The simplest idea is to discretize here the derivatives by the ordinary
difference quotient of first order, getting the two additional
equations necessary to fix (locally) the solution.
|
This destroys the convergence of second order, leaving a method of order one
only. Also, the error expansion in powers of
now contains odd powers,
requiring a different and less efficient Richardson extrapolation,
since
|
and similar at the right boundary.
There are some tricks to overcome this effect, but they require that
the differential equation maintains validity also a bit outside
.
That means that the solution can be continued over
for some
.
In this case one introduces for example fictitious nodes
and
and replaces
|
maintaining the development of the global error in even powers of
.
Since one has now two unknowns in addition, one uses the discretized differential
equation also for
and
in order to get two additonal equations for them.
3 Solution of the (non)linear system for
We consider the simple case
first. Of course in this case
too and it remains a system for the unknown values at the
interior nodes.
The Jacobian of this system then has the tridiagonal form
|
The conditions of the above theorem then result in the fact that this Jacobian
is always invertible and has a condition number of the order of magnitude of
. Since the influences of the rounding errors in the computed
will be in the order of machine precision times condition number
and the global discretization error is in the order
with
it makes little sense to reduce
below the fourth root of the machine precision.
Under the strong assumptions of the theorem the solution of the
discretized system is globally unique (Hadamards theorem applies) and
the damped Newton method will converge from every starting point, but
as usual the quadratic convergence will become apparent for good initial
guesses only. And one must be aware that the restrictive assumptions of the
theorem will usually not apply. At best they will be satisfied in a
strip around the true solution and anything will work if
the initial guess is in inside this strip.
If boundary conditions must also be discretized, then two rows and columns
will be added on top and bottom of this matrix. It will maintain the tridiagonal
structure if the first order approximation of the derivatives at the boundary
are used, otherwise a quindiagonal structure is added there. Anyway the solution
of the linearized system within Newton's method will be simple and efficient.
File translated from
TEX
by
TTM Unregistered,
version 4.03.
On 20 Jun 2016, 18:29.