Page 61 -
P. 61

2. Two-Point Boundary Value Problems
        48
                                                             T
        Grouping the unknowns in the vector v =(v 1 ,v 2 ,... ,v n ) , the system
        (2.13) can be rewritten as a system of equations in the standard form
                                     Av = b.
                                                                    (2.15)
        Below we will show that the matrix A is nonsingular, implying that the
                                                        4
        system (2.15) has a unique solution. We will also discuss how systems of
        this form can be solved numerically. However, for the time being, we find
        it more interesting to turn to an example showing how the approximation
        (2.13) actually works for a particular case.
        Example 2.5 Let us consider the following two-point boundary value prob-
        lem:
                                   x
                 −u (x)=(3x + x )e ,   x ∈ (0, 1),  u(0) = u(1)=0,

                                 2
        where the exact solution is given by
                                               x
                                 u(x)= x(1 − x)e .
        For this problem, we let
                      b j = h (3x j + x j )e x j  for  j =1,... ,n,
                                     2
                            2
        and solve the system of equations defined by (2.15) for different grid sizes,
        i.e. for some values of n. In Fig. 2.2 we have plotted the exact solution (solid
        line) and numerical solution (dashed line). For the numerical solution we
        used n = 5. We notice that, even for this very coarse grid, the finite dif-
        ference approximation captures the form of the exact solution remarkably
        well. In the next figure, the grid is refined using n = 15, and we notice
        that, within the current scaling, the numerical and analytical solutions are
        almost identical.
          How good is the approximation actually? What is the rate of conver-
        gence? Since the exact solution is available for this problem, the rate of
        convergence can be estimated simply by running some experiments. We
        define the error to be
                             E h =  max    |u(x j ) − v j |         (2.16)
                                  j=0,... ,n+1
        and compute this value for some grid sizes. The results are given in Table
        2.1. We have also estimated the rate of convergence by comparing the
        results of subsequent grid sizes. Exactly how this computation is done is
        discussed in Project 1.1. From the table, we observe that the error seems
        to satisfy a bound of the form

                                   E h = O(h ).
                                            2
           4 The basic concepts of linear algebra are reviewed in Project 1.2.
   56   57   58   59   60   61   62   63   64   65   66