LINEAR CASE
(Equally spaced grid case)
![]() |
Approximate
by
Generate an
matrix problem for the unknowns
The boundary data is at
, at which point
, and at
, at which point
.
Example
In this instance we'll use
low order center-differenced approximations to the derivatives.
Assume that
. To get the finite difference
expressions to the
derivatives, expand
Add
and
expressions and get
So
.
This is a ``centered-difference'' aproximation to
and is an
Exercise Show that
is
approximation to
at
.
The truncation error is
So, now we project the equation onto our grid, with
, we get
So (81) has the form of the linear system
Theorem
Suppose
,
,
are continuous on
. If
on
(82) has a unique solution provided
where
.
Proof (exercise). Look at conditions for the solution of the
associated problem (82).
Remark: How could we get higher than
truncation error? Could use higher order approximation to derivatives,
but this leads to more computing (nothing to be scared about these
days). However, the more important problem is that it leads
to a mathematical issue to resolve:
Suppose you use
approximation to the derivatives:
we'll require knowledge of field at
. In the interior this is not a problem...our matrix
will
simply have a larger bandwidth. However, at the end-points we have some
figuring out to do: at
, we would need
. The node
is given by boundary conditions,
and
are interior points, so these are ok, but we don't have an equation or
condition to determine
. At
, we have the same sort of problem
but there the undertermined node is at
. As you might guess,
using even a higher order scheme will generate even more undetermined
boundary points. So, how do we deal with this problem? If we want to get
high order accuracy we need to determine these unknowns.
Strategies:
Unequal Spacing: One other possibility for dealing with the above
problem is to use variable-sized meshes. This is not only used to get
around the problem of undetermined quantities but is also generally
applicable to boundary value problems in which multiple scales in the
approximate solution are expected to arise.
This is typically used to solve problems which have localized
values of
for which a lot of changes in the dependent variables
are seen, but not much is happening in other areas. This is a topic of
current research and is beyond the scope of presentation: in general,
one hope to obtain higher resolution in certain
places where
varies a lot and go with low resolution in places where
does not change all that much. The overall aim is to reduce the
computational expense of the method, as compared to over-resolving the
whole domain, but this must be done with care. Perhaps the most research
in this area is done by the finite element methods community and if you
are interested, you could start by just finding out what finite element
methods are. Then look into adaptive mesh refinement schemes and domain
decomposition methods.
NONLINEAR CASE:
Take
The easy ones are those with a unique solution, i.e. when
Recipe:
Using
discretization for
, its derivatives, and the
equation coefficients, just as in linear case.
, known.
The superscript
then
assume
small, then the approximation
Implementation comments: don't forget to put a ``max iterations
exceeded'' condition in your code. Also, since scheme is
,
use
stopping criteria
for the Newton
iteration. You can use fixed
point method in the iteration, but convergence is linear and has
restrictions on the type of problem for which it is
applicable (see Fixed Point
iteration.
Since a good intial guess is required, make it go through
and
and in addition, satisfy appropriate
conditions as per (83) on previous page.
Want to use a higher order truncation scheme? Don't neglect considering a low-order method, coupled with Richardson extrapolation, before getting into something more involved. Otherwise, use a higher-order scheme, but make sure that you don't leave any boundary points undertermined.