The Finite Difference Method for Boundary Value Problems



Theorem  (Boundary Value Problem).
  Assume that  [Graphics:Images/FiniteDifferenceMod_gr_1.gif]  is continuous on the region  [Graphics:Images/FiniteDifferenceMod_gr_2.gif]  and  that  [Graphics:Images/FiniteDifferenceMod_gr_3.gif]  and  [Graphics:Images/FiniteDifferenceMod_gr_4.gif]  are continuous on  [Graphics:Images/FiniteDifferenceMod_gr_5.gif].  If there exists a constant  [Graphics:Images/FiniteDifferenceMod_gr_6.gif]  for which  [Graphics:Images/FiniteDifferenceMod_gr_7.gif]  satisfy


then the boundary value problem

[Graphics:Images/FiniteDifferenceMod_gr_10.gif]  with  [Graphics:Images/FiniteDifferenceMod_gr_11.gif]  

has a unique solution   [Graphics:Images/FiniteDifferenceMod_gr_12.gif].  

    The notation  [Graphics:Images/FiniteDifferenceMod_gr_13.gif]  has been used to distinguish the third variable of the function    [Graphics:Images/FiniteDifferenceMod_gr_14.gif].   Finally, the special case of linear differential equations is worthy of mention.


Corollary (Linear Boundary Value Problem).  Assume that  [Graphics:Images/FiniteDifferenceMod_gr_15.gif]  in the theorem has the form  [Graphics:Images/FiniteDifferenceMod_gr_16.gif]  and that  f  and its partial derivatives  [Graphics:Images/FiniteDifferenceMod_gr_17.gif]  and  [Graphics:Images/FiniteDifferenceMod_gr_18.gif] are continuous on  [Graphics:Images/FiniteDifferenceMod_gr_19.gif].  If there exists a constant  [Graphics:Images/FiniteDifferenceMod_gr_20.gif]  for which  p(t)  and   q(t)  satisfy


then the linear boundary value problem

[Graphics:Images/FiniteDifferenceMod_gr_23.gif]  with  [Graphics:Images/FiniteDifferenceMod_gr_24.gif]  

has a unique solution   [Graphics:Images/FiniteDifferenceMod_gr_25.gif].  


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

over  [a,b]  with  [Graphics:Images/FiniteDifferenceMod_gr_27.gif].  Form a partition of [a, b] using the points  [Graphics:Images/FiniteDifferenceMod_gr_28.gif],  where  [Graphics:Images/FiniteDifferenceMod_gr_29.gif]  and [Graphics:Images/FiniteDifferenceMod_gr_30.gif]  for  [Graphics:Images/FiniteDifferenceMod_gr_31.gif].  The central-difference formulas discussed in Chapter 6 are used to approximate the derivatives  




Use the notation [Graphics:Images/FiniteDifferenceMod_gr_34.gif] for the terms [Graphics:Images/FiniteDifferenceMod_gr_35.gif] on the right side of (2) and (3) and drop the two terms [Graphics:Images/FiniteDifferenceMod_gr_36.gif].  Also, use the notations  [Graphics:Images/FiniteDifferenceMod_gr_37.gif],    [Graphics:Images/FiniteDifferenceMod_gr_38.gif],  and  [Graphics:Images/FiniteDifferenceMod_gr_39.gif] 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 [Graphics:Images/FiniteDifferenceMod_gr_41.gif] and then collecting terms involving  [Graphics:Images/FiniteDifferenceMod_gr_42.gif]  and arranging them in a system of linear equations:


for  [Graphics:Images/FiniteDifferenceMod_gr_44.gif] , where [Graphics:Images/FiniteDifferenceMod_gr_45.gif] and  [Graphics:Images/FiniteDifferenceMod_gr_46.gif] . This system has the familiar tridiagonal form.

Proof  Finite Difference Method for ODE's  Finite Difference Method for ODE's  


Footnote. The significance of the theory.  

    We are all familiar with the differential equation  
[Graphics:Images/FiniteDifferenceMod_gr_47.gif] and its general solution  [Graphics:Images/FiniteDifferenceMod_gr_48.gif]. The boundary conditions with  [Graphics:Images/FiniteDifferenceMod_gr_49.gif]  can only be solved if  [Graphics:Images/FiniteDifferenceMod_gr_50.gif].  Unfortunately, because of this counter example, the "theory" which "guarantees" a solution must be phrased with "[Graphics:Images/FiniteDifferenceMod_gr_51.gif]."  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  [Graphics:Images/FiniteDifferenceMod_gr_52.gif]  with  [Graphics:Images/FiniteDifferenceMod_gr_53.gif]  and  [Graphics:Images/FiniteDifferenceMod_gr_54.gif]  over the interval  [Graphics:Images/FiniteDifferenceMod_gr_55.gif]  by using the finite difference method of order  [Graphics:Images/FiniteDifferenceMod_gr_56.gif]. The mesh we use is  [Graphics:Images/FiniteDifferenceMod_gr_57.gif]  and the solution points are[Graphics:Images/FiniteDifferenceMod_gr_58.gif].  
(i)   Construct the tri-diagonal matrix and vector.
Solve the system in (i).
Join the mesh points and vector from (ii) to form the solution points.




Example 1.  Solve  [Graphics:Images/FiniteDifferenceMod_gr_62.gif]  over  [Graphics:Images/FiniteDifferenceMod_gr_63.gif]  with  [Graphics:Images/FiniteDifferenceMod_gr_64.gif]  and  [Graphics:Images/FiniteDifferenceMod_gr_65.gif].
Use the finite difference method with 25 subintervals (total of 26 points).
Solution 1.


Example 2.  Solve  [Graphics:Images/FiniteDifferenceMod_gr_94.gif]  over  [Graphics:Images/FiniteDifferenceMod_gr_95.gif]  with  [Graphics:Images/FiniteDifferenceMod_gr_96.gif]  and  [Graphics:Images/FiniteDifferenceMod_gr_97.gif].
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  [Graphics:Images/FiniteDifferenceMod_gr_105.gif]  over  [Graphics:Images/FiniteDifferenceMod_gr_106.gif]  with  [Graphics:Images/FiniteDifferenceMod_gr_107.gif]  and  [Graphics:Images/FiniteDifferenceMod_gr_108.gif].
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