Page 172 - Numerical Analysis Using MATLAB and Excel
P. 172

Using the Method of Undetermined Coefficients for the Forced Response

               Example 5.6

               Find the total solution of the ODE

                                                   2
                                                         dy
                                                  d y + 4------ +  3y =  0                             (5.31)
                                                   t d  2  dt
                                                                                    ⁄
               subject to the initial conditions y0() =  3  and y' 0() =  4  where y' =  dy dt
               Solution:

               This is a homogeneous ODE and its total solution is just the natural response found from the char-
                                   2
               acteristic equation s + 4s + 3 =  0  whose roots are s =  – 1  and s =  – 3 . The total response is:
                                                                              2
                                                                  1
                                                                 t –
                                             yt() =  y () =  k e +  k e – 3t                           (5.32)
                                                        t
                                                                     2
                                                              1
                                                      N
               The constants k 1  and k 2  are evaluated from the given initial conditions. For this example,
                                                                       0
                                                                 0
                                                  y0() =  3 =  k e +  k e
                                                               1
                                                                     2
               or
                                                      k +  k =  3                                      (5.33)
                                                       1
                                                           2
               Also,
                                                      dy             t –    – 3t
                                         y' 0() =  4 =  ------  =  –  k e – 3k e
                                                      dt           1      2    t =  0
                                                         t =  0
               or
                                                    –  k –  3k =  4                                    (5.34)
                                                             2
                                                       1
               Simultaneous solution of (5.33) and (5.34) yields k =  6.5  and k =  – 3.5 . By substitution into
                                                                  1
                                                                                2
               (5.32), we obtain
                                                                 t –
                                             yt() =  y () =  6.5e – 3.5e – 3t                          (5.35)
                                                       t
                                                     N
               Check with MATLAB:
               y=dsolve('D2y+4*Dy+3*y=0', 'y(0)=3', 'Dy(0)=4')

               y =
               (-7/2*exp(-3*t)*exp(t)+13/2)/exp(t)

               pretty(y)
                     - 7/2 exp(-3 t) exp(t) + 13/2
                     -----------------------------
                                exp(t)
               The function y =   f t() , of relation (5.35), shown in Figure 5.1, was plotted with the use of the
               MATLAB script


               Numerical Analysis Using MATLAB® and Excel®, Third Edition                              5−11

               Copyright © Orchard Publications
   167   168   169   170   171   172   173   174   175   176   177