MAT2007 ODEs (2008/9) ES1 Solutions to revision exercises, week 1 The M-file exercise revision.m gives some Matlab commands. 1. All ODEs in this question are separable. Note that dfield gives a nice overview of the shape of the solutions. R R (a) Note that dx dx = t dt . Hence the solutions are dt = t can be rewritten as 2 x(t) = t2 + C , see Figure 1(a). R dx R (b) The ODE dx dt. This gives ln x = t + C , thus dt = x can be rewritten as x = t the solutions are x(t) = A e , see Figure 1(b). R R 3t2 +1 (c) The ODE dx can be rewritten as 2x dx = (3t2 + 1) dt . This gives dt = 2x √ x2 = t3 + t + C , thus the solutions are x(t) = ± t3 + t + C , see Figure 1(c). R R (d) The ODE sin t cos x = sin x cos t dx tan x dx = tan t dt. dt can be rewritten as This gives ln sec x = ln sec t + C , hence solutions are of the form sec x = A sec t or cos x = B cos t, see Figure 1(d). (a) Solutions of 1(a), note the similarity of the solutions (shift in x -direction). (b) Solutions of 1(b), note the similarity of the solutions (shift in t direction and reflection). (c) Solutions of 1(c), note the vertical derivative near x = 0 and the fact that the solutions can’t be continued here. (d) Solutions of 1(d), note the periodicity in both x and t . The solutions have vertical derivatives near x = kπ , k ∈ Z and can’t be continued at those points. Figure 1: Exercise 1, solutions with dfield. MAT2007 ODEs (2008/9) 2. ES2 Again, both ODEs are separable. Checks with Matlab are in the M -file. R dx R dt 2 can be written as (a) The ODE (2t + 1) dx = This gives dt = x 2t+1 . x2 − x1 = 12 ln(2t + 1) + C . Using the initial condition x(0) = 1, we get that C satisfies −1 = 21 ln(1) + C , hence C = −1. Thus the solution of the IVP is ¡ ¢−1 2 x(t) = 1 − 21 ln(2t + 1) . = 2−ln(2t+1) R −2x 2x can be rewritten as e dx = dt (b) The ODE t2 dx . This gives − 21 e−2x = dt = e t2 1 − t + C . Using the initial condition x(1) = 0, we get that C satisfies − 12 = 1 −2x(t) = 2 − 1 or x(t) = −1 + C t ¡ 2, hence ¢ C = 2 . Thus the solution of the IVP is e 1 − 2 ln t − 1 . 3. These ODEs are of first order and linear and can be solved with the integrating factor method. Again dfield gives nice pictures of the solutions. (a) The ODE can be written as dx dt + p(t) x = q(t) with p(t) = the integrating factor is µZ ¶ ¡ ¢ 2 IF = exp dt = exp ln t2 = t2 . t 2 t and q(t) = 3 t2 . Thus Multiplying the ODE with the integrating factor gives Z d ¡2 ¢ 3 C t x = 3, hence t2 x = 3 dt = 3t + C, thus x(t) = + 2 , dx t t see Figure 2(a). −t (b) The ODE can be written as dx dt + x = 2t e . Thus the integrating factor is µZ ¶ IF = exp dt = et . Multiplying the ODE with the integrating factor gives Z d ¡ t ¢ t e x = 2t, hence e x = 2t dt = t2 + C, dx thus x(t) = (t2 + C) e−t , see Figure 2(b) (c) The integrating factor for the ODE µZ ¶ IF = exp 2 dt = e2t . dx dt + 2x = et is Multiplying the ODE with the integrating factor gives d ¡ 2t ¢ e x = e3t , dx see Figure 2(c) hence e2t x = 1 3t e + C, 3 thus x(t) = 1 t e + Ce−2t , 3 MAT2007 ODEs (2008/9) ES3 (d) The integrating factor for the ODE µ Z ¶ 2 IF = exp −2 t dt = e−t . dx dt − 2xt = t is Multiplying the ODE with the integrating factor gives d ³ −t2 ´ 2 e x = te−t , dx 1 2 2 hence e−t x = − e−t + C, 2 1 2 thus x(t) = − + Cet , 2 see Figure 2(d) (a) Solutions of 3(a). (b) Solutions of 3(b). (c) Solutions of 3(c). (d) Solutions of 3(d). Figure 2: Exercise 3, solutions with dfield. 4. All ODEs are linear, second order ones. To solve them we use the methods of Linear Algebra, chapter 5. The plots are in figure 4, the Matlab code is in exercise revision.m . 2 2 (a) The auxiliary quadratic for the homogeneous ODE ddt2x + dx dt − 30x = 0 is m + m − 30 = 0, or (m − 5)(m + 6) = 0. Thus the general solution of this ODE is x(t) = A e5t + B e−6t , see Figure 3(a). MAT2007 ODEs (2008/9) ES4 2 2t is (b) The auxiliary quadratic for the inhomogeneous ODE 2 ddt2x + 3 dx dt + x = e 2m2 + 3m + 1 = 0 or (2m + 1)(m + 1) = 0 . Thus the complementary function (CF) is xC (t) = A e−t + B e−t/2 . For the particular integral (PI), we try xP (t) = C e2t . 1 Substitution into the ODE gives (8C + 6C + C)e2t = e2t . Hence C = 15 and the 1 2t −t −t/2 general solution for the ODE is x(t) = A e + B e + 15 e , see Figure 3(a). 2 (c) The auxiliary quadratic for the inhomogeneous ODE ddt2x + 2 dx dt + 5x = 5t − 3 is m2 + 2m + 5 = 0 or (m + 1)2 + 4 = 0 . Thus m = −1 ± 2i and the complementary function is xC (t) = e−t (A cos 2t + B sin 2t). For the particular integral, we try xP (t) = C t + D . Substitution into the ODE gives 0 + 2C + 5(Ct + D) = 5t − 3. Hence C = 1 and D = −1, thus the general solution for the ODE is x(t) = e−t (A cos 2t + B sin 2t) + t − 1, see Figure 3(a). (a) Solutions of 4(a). (b) Solutions of 4(b). (c) Solutions of 4(c). Figure 3: Exercise 4, solutions with dfield. 5. The ODEs are again second order linear ones and can solved in the same way as in the previous question. MAT2007 ODEs (2008/9) ES5 2 (a) The auxiliary quadratic for the inhomogeneous ODE ddt2x − 2 dx dt + 5x = 10 cos t is 2 2 m − 2m + 5 = 0 or (m − 1) + 4 = 0. Thus m = 1 ± 2i and the complementary function is xC (t) = et (A cos 2t + B sin 2t). For the particular integral, we try xP (t) = C cos t + D sin t. Substitution into the ODE gives (−C − 2D + 5C) cos t + (−D + 2C + 5D) sin t = 10 cos t. Hence C = 2 and D = −1, thus the general solution for the ODE is x(t) = et (A cos 2t+B sin 2t)+2 cos t−sin t. Using the initial condition x(0) = 2 , we get A + 2 = 2, thus A = 0 and x0 (0) = 1 gives 2B − 1 = 1, hence B = 1. Thus the solution of the IVP is x(t) = et sin 2t + 2 cos t − sin t. 2 2t 2 (b) The auxiliary quadratic for the inhomogeneous ODE 2 ddt2x +2 dx dt −x = 11e is 2m + √ ¡ ¢ 2 2m − 1 = 0 or 2 m + 21 − 32 = 0. Thus m = 12 (−1 ± 3) and the complementary √ √ function is xC (t) = A e(−1+ 3)t/2 +B e(−1− 3)t/2 . For the particular integral, we try xP (t) = C e2t . Substitution into the ODE gives (8C +4C√−C)e2t = 11e2t√, thus C = 1 and the general solution for the ODE is x(t) = A e(−1+ 3)t/2 + B e(−1− 3)t/2 + e2t . With the initial conditions x(0) = 1 and x0 (0) = 2, we get 1=A+B+1 2= √ −1+ 3 2 A+ √ −1− 3 2 B+2 Thus A = 0 = B and the solutions of the IVP is x(t) = e2t . 6. We start pplane by typing pplane7 into Matlab and introduce the ODE. In Figure 4(a), the input window from pplane is shown. By using the keyboard and/or clicking on points near (0, 0), (1, 0), (1, 1), (−1/2, 0) and (1/2, 0), the plot is Figure 4(b) is obtained. The solutions divide the plane in 3 regions, one with periodic solutions and two with unbounded solutions. (a) Input of pplane (b) Some typical solutions of the system Figure 4: Exercise 6, using pplane.
© Copyright 2025 Paperzz