Page 11 - DOC-20220324-WA0012.-488-500
P. 11

11.1 Methods for First-Order Systems  475

                                a 2. How would you solve this system of differential equations numerically?
                                                           ⎧
                                                                       t
                                                                   2
                                                           ⎪ x = x + e − t 2

                                                           ⎨ 1     1
                                                              x = x 2 − cos t

                                                              2
                                                           ⎪
                                                              x 1 (0) = 0  x 2 (1) = 0
                                                           ⎩
                                a
                                 3. How would you solve the initial-value problem
                                                         ⎧
                                                                      t
                                                         ⎪ x (t) = x 1 (t)e + sin t − t 2

                                                         ⎨ 1
                                                                           t
                                                                       2
                                                           x (t) = [x 2 (t)] − e + x 2 (t)

                                                            2
                                                         ⎪
                                                           x 1 (1) = 2  x 2 (1) = 4
                                                         ⎩
                                    if a computer program were available to solve an initial-value problem of the form

                                    x = f (t, x) involving a single unknown function x = x(t)?
                                a
                                 4. Write an equivalent system of first-order differential equations without t appearing on
                                    the right-hand side:
                                                      ⎧      2           2

                                                      ⎪ x = x + log(y) + t
                                                      ⎨
                                                             y
                                                        y = e − cos(x) + sin(tx) − (xy) 7

                                                      ⎪
                                                      ⎩
                                                        x(0) = 1  y(0) = 3
                  Computer Problems 11.1
                                a 1. Solve the system of differential equations (1) by using two different methods given in
                                    this section and compare the results with the analytic solution.
                                a 2. Solve the initial-value problem
                                                            ⎧          2
                                                            ⎪ x = t + x − y

                                                            ⎨
                                                                   2
                                                              y = t − x + y  2

                                                            ⎪
                                                              x(0) = 3  y(0) = 2
                                                            ⎩
                                    by means of the Taylor series method using h = 1/128 on the interval [0, 0.38]. Include
                                    terms involving three derivatives in x and y. How accurate are the computed function
                                    values?
                                 3. Write the Runge-Kutta procedure to solve
                                                           ⎧

                                                           ⎪ x =−3x 2
                                                           ⎨ 1
                                                                  1
                                                              x = x 1
                                                              2   3
                                                           ⎪
                                                              x 1 (0) = 0  x 2 (0) = 1
                                                           ⎩
                                    on the interval 0   t   4. Plot the solution.
                                a
                                 4. Write procedure RK4 System2 and a driver program for solving the ordinary differential
                                                                              −2
                                    equation system given by Equation (2). Use h =−10 , and print out the values of x 0 ,
                                    x 1 , and x 2 , together with the true solution on the interval [−1, 0]. Verify that the true
                                                                                       2
                                                                                   3
                                                                               t
                                                   t
                                                                2
                                                                    3
                                    solution is x(t) = e + 6 + 6t + 4t + t and y(t) = e − t + t + 2t + 2.
   6   7   8   9   10   11   12   13