Page 462 - Applied Numerical Methods Using MATLAB
P. 462

PROBLEMS   451
                                                                         2
                   (iv) If you increase N to 200, what is the value of r = A t/( x) ?Find
                       the maximum absolute errors of the numerical solutions obtained
                       by the three methods as in (iii). Which method yields the small-
                       est error?
                    2
                   ∂ u(x, t)  ∂u(x, t)
               (d)         =             for 0 ≤ x ≤ 1, 0 ≤ t ≤ 0.1     (P9.4.8)
                     ∂x 2       ∂t
                   with the initial/boundary conditions

                     u(x, 0) = sin(πx) + sin(3πx),  u(0,t) = 0,  u(1,t) = 0 (P9.4.9)


                    (i) By substituting

                                                               2
                                               2
                             u(x, t) = sin(πx)e −π t  + sin(3πx)e −(3π) t  (P9.4.10)
                       into Eq. (P9.4.5), verify that this is a solution to the PDE.
                   (ii) With the solution region divided into M × N = 25 × 80 sections,
                       does the explicit forward Euler method converge? What is the value
                                      2
                       of r = A t/( x) ?
                   (iii) If you increase N (the number of subintervals along the t axis) to
                       100 for improving the numerical stability, does the explicit forward
                                                                         2
                       Euler method converge? What is the value of r = A t/( x) ?Find
                       the maximum absolute errors of the numerical solutions obtained by
                       the three methods as in (c)(iii).
                                                                         2
                   (iv) If you increase N to 200, what is the value of r = A t/( x) ?Find
                       the maximum absolute errors of the numerical solutions obtained by
                       the three methods as in (c)(iii). Which one gained the accuracy the
                       most of the three methods through increasing N?
            9.5 Parabolic PDEs with Neumann Boundary Conditions

               Let us modify the routines “heat_exp()”, “heat_imp()”, and “heat_cn()”
               (in Section 9.2) so that they can accommodate the heat equation (9.2.1) with
               Neumann boundary conditions


                     ∂u(x, t)/∂x    = b x 0 (t),  ∂u(x, t)/∂x    = b x f (t)  (P9.5.1)
                               x=x 0                    x=x f
               (a) Consider the explicit forward Euler algorithm described by Eq. (9.2.3)

                                u k+1  = r(u k  + u k  ) + (1 − 2r)u k
                                 i       i+1   i−1           i
                                                                t
                                for i = 1, 2,... ,M − 1 with r = A      (P9.5.2)
                                                               x 2
   457   458   459   460   461   462   463   464   465   466   467