Module

for

The Finite Difference Method for Boundary Value Problems

Background

Theorem  (Boundary Value Problem).
Assume that    is continuous on the region    and  that    and    are continuous on  .  If there exists a constant    for which    satisfy

and

,

then the boundary value problem

with

has a unique solution   .

The notation    has been used to distinguish the third variable of the function    .   Finally, the special case of linear differential equations is worthy of mention.

Corollary (Linear Boundary Value Problem).  Assume that    in the theorem has the form    and that  f  and its partial derivatives    and   are continuous on  .  If there exists a constant    for which  p(t)  and   q(t)  satisfy

and

,

then the linear boundary value problem

with

has a unique solution   .

Finite-Difference Method

Methods involving difference quotient approximations for derivatives can be used for solving certain second-order boundary value problems.  Consider the linear equation

(1)

over  [a,b]  with  .  Form a partition of [a, b] using the points  ,  where    and   for  .  The central-difference formulas discussed in Chapter 6 are used to approximate the derivatives

(2)

and

(3)

Use the notation for the terms on the right side of (2) and (3) and drop the two terms .  Also, use the notations  ,    ,  and   this produces the difference equation

which is used to compute numerical approximations to the differential equation (1).  This is carried out by multiplying each side  by and then collecting terms involving    and arranging them in a system of linear equations:

for   , where and   . This system has the familiar tridiagonal form.

Footnote. The significance of the theory.

We are all familiar with the differential equation
and its general solution  . The boundary conditions with    can only be solved if  .  Unfortunately, because of this counter example, the "theory" which "guarantees" a solution must be phrased with "."  A careful reading of the "theory" reveals that this is a sufficient condition and not a necessary condition.  Indeed there are many problems that can be solved with the "shooting method" , all we ask is to be cautious with its implementation and take note that it might not apply sometimes.

Computer Programs  Finite Difference Method for ODE's  Finite Difference Method for ODE's

Program (Finite-Difference Method).  To approximate the solution of the boundary value problem    with    and    over the interval    by using the finite difference method of order  . The mesh we use is    and the solution points are.
Procedures.
(i)   Construct the tri-diagonal matrix and vector.
(ii)
Solve the system in (i).
(iii)
Join the mesh points and vector from (ii) to form the solution points.

``````

``````

Example 1.  Solve    over    with    and  .
Use the finite difference method with 25 subintervals (total of 26 points).
Solution 1.

Example 2.  Solve    over    with    and  .
Use the finite difference method with 25 subintervals (total of 26 points).
Just use the subroutine and skip all the details.
Solution 2.

Example 3.  Solve    over    with    and  .
Use the finite difference method with 50 subintervals (total of 51 points).
Just use the subroutine and skip all the details.
Solution 3.

Example 4.  Determine how much the solutions in Example 2 and 3 differ.
Solution 4.

Example 5.  Use Richardson's extrapolation and the results of Example 2 and 3 to construct a more accurate solution for 25 subintervals.
Solution 5.

Example 6.  How good did it get?
Solution 6.

Research Experience for Undergraduates

Finite Difference Method for O.D.E.'s  Finite Difference Method for O.D.E.'s  Internet hyperlinks to web sites and a bibliography of articles.

Download this Mathematica Notebook The Finite Difference Method for Boundary Value Problems

Return to Numerical Methods - Numerical Analysis

(c) John H. Mathews 2004