Page 22 -
P. 22

1. Setting the Scene
        8
        timelevels
                                          m =0, 1,... ,
                            t m = m∆t,
        where ∆t> 0 is given. Let v m , m =0, 1,... denote approximations of
        u(t m ). Obviously we put v 0 = u 0 , which is the given initial condition. Next
        we assume that v m is computed for some m ≥ 0 and we want to compute
        v m+1 . Since, by (1.12) and (1.14),
                        u(t m+1 ) − u(t m )


                             ∆t        ≈ u (t m )= f u(t m )        (1.15)
        for small ∆t, we define v m+1 by requiring that
                               v m+1 − v m
                                          = f(v m ).                (1.16)
                                   ∆t
        Hence, we have the scheme
                      v m+1 = v m +∆tf(v m ),  m =0, 1,... .        (1.17)
        This scheme is usually called the forward Euler method. We note that it is
        a very simple method to implement on a computer for any function f.
          Let us consider the accuracy of the numerical approximations computed
        by this scheme for the following problem:
                                   u (t)= u(t),

                                                                    (1.18)
                                   u(0)=1.
                                               t
        The exact solution of this problem is u(t)= e , so we do not really need any
        approximate solutions. But for the purpose of illustrating properties of the
        scheme, it is worthwhile addressing simple problems with known solutions.
        In this problem we have f(u)= u, and then (1.17) reads
                        v m+1 = (1+∆t)v m ,   m =0, 1,... .         (1.19)
        By induction we have

                                              m
                                 v m = (1+∆t) .
        In Fig. 1.3 we have plotted this solution for 0 ≤ t m ≤ 1 using ∆t =1/3,
        1/6, 1/12, 1/24. We see from the plots that v m approaches u(t m )as∆t is
        decreased.
          Let us study the error of this scheme in a little more detail. Suppose we
        are interested in the numerical solution at t = 1 computed by a time step
        ∆t given by

                                    ∆t =1/M,
   17   18   19   20   21   22   23   24   25   26   27