Solution to Homework. Substitution and Nonexact Differential Equation Made Exact) [0] Solve dy dx = ey + 3e x+y, y0) = 0. Let u := e x, v = e y, and hence dy = v + 3uv) dx, du = u)dx, dv = v)dy = u)dv = v v + 3uv) du = v v + 3uv) du + u)dv Let Mu, v) := v v + 3uv), Nu, v) := u. Then, M v = v + 3uv + v3u ) = 4v + 6uv, N u = = = M v N u = 4 4v + 6uv 0, M = only depends on v v Hence, we can solve the following to find a function µv) such that µmdu + µndv is an exact differential: dµ dv = M µ = µ = ln µ = ln v. v Note that v = e y > 0, and hence we can pick µ =, and get an exact equation v ) ) u v + 3u du + dv = 0. v To solve this exact equation, we find ) F u, v) = v + 3u du = ) v u + 3 u + gv). To determine gv), take the partial derivative w.r.t. v: ) F v = u + g v) = u = g v) = 0 = gv) = constant. v v Hence, we have ) u + 3 v u = c. Plug in the initial condition u = e 0 =, v = e 0 =, we get c = 3, and v ) u + 3 u = 3 = v = 3 4 u 3 4 u + = e y = + 3 e x e x) 4 + 3 e x e x)) = ln 3 ) 4 sinh x. = y = ln
Bonus. Solve dy dx = ey + 3e x+y, y0) = 0. [0] Let u := e x, v = e y, and hence dy = v + 3uv) dx, du = u)dx, dv = v)dy = u)dv = v v + 3uv) du = dv du = v v + 3uv) u = u v + 3 ) v u Above is a Bernoulli s equation, and can be easily solved by substituting w := v : dv du = u v + 3 ) v = dw u w du = u w + 3 ) u w = dw du = ) u w + u 3 To solve the above linear first-order DE, we first find an integrating factor by solving the following: dµ du = u µ = dµ µ = du = ln µ = ln u. u We pick µ = u, and we get w = u u u 3 ) du = u u u 3 + c ). Plug in the initial condition w = v = e 0 =, u = e 0 =, and we get c =. Therefore, w = u + u, and hence e y = e x + e x = y = ln e x + e x).
. Method of Substitution) [0] Solve a) [0] dy dx = x + 3 ) y + xy. x b) [0] dy dx = ex + x + 3)y + e x y, y0) =. Hint: Choose appropriate fx) and use the substitution u = fx)y to convert the equation to the form u = P u), where P u) is a polynomial of u. a) We manipulate the original equation as follows: dy dx = x + 3 ) y + xy = x dy x dx = + 3x ) y + x y = y + x dy dx = + 3xy + x y = dxy) dx = + 3xy + x y Hence, use the substitution u = xy, we get du dx = + 3u + u = u + )u + ) = du u + ) = dx u + = ln u + ln u + = x + c = u + u + = u + = Cex, C 0 = u = xy = Ce = y = x x Cxe x x, C 0. b) We manipulate the original equation as follows: dy dx = ex + x + 3)y + e x y dy x = e dx = + xe x y + 3e x y + e x y = e dx xe x y = + 3e x y + e x y ) d e x y = = + 3e x y + e x y dx x dy Hence, use the substitution u = e x y, we get du dx = + 3u + u = u + )u + ) = du u + ) = dx u + 3
= ln u + ln u + = x + c Plug in the initial condition x = 0, y =, u =, we get c = ln/3). Hence, u + u + = u + = 3 ex = u = e x y = 3 ex = y = 3ex 3 e x ex, x, ln3/)). 4
3. General Solution of Homogenous Linear Differential Equations) [0] Find the general solutions of the following: a) [5] y 4) 6y + 5y y + 0y = 0. b) [5] x ) y + x )y + 4y = 0. a) The corresponding polynomial is D 4 6D 3 + 5D D + 0 = D D + ) D 4D + 5 ), and it has four complex roots: ± i, ± i. Hence, the general solution is y = c e x cos x + c e x sin x + c 3 e x cos x + c 4 e x sin x, c, c, c 3, c 4 R. b) First let x >. With the substation x = e t, we convert the original DE into D t D t ) + D t + 4) {y = Dt + 4 ) {y = 0. The polynomial Dt + 4 has two roots ±i. Hence, the general solution is y = c cos t + c sin t = c cos lnx )) + c sin lnx )), c, c R, x >. If we let x <, then use the substation x = e t, we convert the original DE into D t D t ) + D t + 4) {y = Dt + 4 ) {y = 0, the same as above. Hence, the general solution is y = c cos t + c sin t = c cos ln x)) + c sin ln x)), c, c R, x <. 5
4. An IVP of Homogeneous Linear DE with Constant Coefficients) [5] Consider the following IVP: Solve y 4) + 4y = 0 subject to yx 0 ) =, y x 0 ) = r, y x 0 ) = r, y x 0 ) = r 3 a) Find the 4 complex roots for the polynomial D 4 + 4: m, m, m 3, m 4, where m = m, m 4 = m 3. [5] b) From the lecture we know that {e m x, e m x, e m 3x, e m 4x is a fundamental set of solutions in the complex domain C. Hence the general solution in the complex domain can be represented as y = C e m x + C e m x + C 3 e m 3x + C 4 e m 4x, C i C, i =,, 3, 4. ) Please give the necessary and sufficient condition for y being a real-valued function, in terms of the relationships among {C, C, C 3, C 4. [5] c) Use the form in ) to find out the unique solution of the IVP. [5] Hint: Use Cramer s Rule to solve {C, C, C 3, C 4, and use the following fact: a a a n a a a n = a j a i ).... i<j n a n a n a n a) D 4 + 4 = D 4 + 4D + 4 4D = D + ) D) = D + D + ) D D + ), and hence the four roots are: n m = + i, m = m = i, m 3 = + i, m 4 = m 3 = i. b) Note that since x R, e mx = e m x = e mx ) and e m4x = e m 3 x = e m3x ). Therefore, y = C e mx + C e mx ) + C 3 e m3x + C 4 e m3x ), y = Ce mx + C e mx ) + C4e m3x + C3 e m3x ). With the above observation, we have y R y y = 0 C C) e mx + C C) e mx ) + C 3 C4) e m3x + C 4 C3) e m3x ) = C C) e mx + C C) e mx + C 3 C4) e m3x + C 4 C3) e m4x = 0 C = C, C 3 = C4 since {e mx, e mx, e m3x, e m4x are linearly independent. 6
c) Plug in the initial condition, we have the following system of linear equations: C e m x 0 + C e m x 0 + C 3 e m 3x 0 + C 4 e m 4x 0 = C m e m x 0 + C m e m x 0 + C 3 m 3 e m 3x 0 + C 4 m 4 e m 4x 0 = r C m e m x 0 + C m e m x 0 + C 3 m 3e m 3x 0 + C 4 m 4e m 4x 0 = r C m 3 e m x 0 + C m 3 e m x 0 + C 3 m 3 3e m 3x 0 + C 4 m 3 4e m 4x 0 = r 3 = C j = j, j =,, 3, 4, where e m x 0 e m x 0 e m 3x 0 e m 4x 0 = m e m x 0 m e m x 0 m 3 e m 3x 0 m 4 e m 4x 0 m e m x 0 m e m x 0 m 3e m 3x 0 m 4e m 4x 0 = e 4 i= m i)x 0 m m m 3 m 4 m m 3 e m x 0 m 3 e m x 0 m 3 3e m 3x 0 m 3 4e m m m 3 m 4 4x 0 m 3 m 3 m 3 3 m 3 4 = e 4 i= m i)x 0 m m )m 3 m )m 4 m )m 3 m )m 4 m )m 4 m 3 ) e m x 0 e m 3x 0 e m 4x 0 = r m e m x 0 m 3 e m 3x 0 m 4 e m 4x 0 r m e m x 0 m 3e m 3x 0 m 4e m 4x 0 = e 4 i= m i)x 0 r m m 3 m 4 r m r 3 m 3 e m x 0 m 3 3e m 3x 0 m 3 4e m m 3 m 4 4x 0 r 3 m 3 m 3 3 m 3 4 = e 4 i= m i)x 0 m r)m 3 r)m 4 r)m 3 m )m 4 m )m 4 m 3 ) e m x 0 e m x 0 e m 4x 0 3 = m e m x 0 m e m x 0 r m 4 e m 4x 0 m e m x 0 m e m x 0 r m 4e m 4x 0 = e m +m +m 4 )x 0 m m r m 4 m m 3 e m x 0 m 3 e m x 0 r 3 m 3 4e m m r m 4 4x 0 m 3 m 3 r 3 m 3 4 = e m +m +m 4 )x 0 m m )r m )m 4 m )r m )m 4 m )m 4 r) Hence, C = C, C 4 = C 3, and C = = e m x 0 m r)m 3 r)m 4 r) m m )m 3 m )m 4 m ) = e i)x 0 r 4 + 4) m r)i)) i) = e i)x 0 r 4 + 4) + i r) + i) C 3 = 3 = e m 3x 0 r m )r m )m 4 r) m 3 m )m 3 m )m 4 m 3 ) = e i)x 0 r 4 + 4) m 3 r)) + i) i) = e i)x 0 r 4 + 4) + i r) i) From here it is then easy to find the real-valued solution of the original IVP, for a given x 0 and r. Below is how to do it, but if you do not manage to work it out since we do not provide explicit x 0 and r here, it is fine. 7
Let C = α + iβ, C = α iβ, C 3 = α + iβ, C 4 = α iβ. Then, Hence, where C e m x + C e m x = Re {C e m x = Re { α + iβ )e x cos x + i sin x) = e x α cos x β sin x) C 3 e m 3x + C 4 e m 4x = Re {C 3 e m 3x = Re {α + iβ )e x cos x + i sin x) α = Re = e x α cos x β sin x) y = e x α cos x β sin x) + e x α cos x β sin x), { e i)x r 4 + 4) 0 + i r) + i) e x r + ) cos x 0 0 + r sin x 0 r + 4r + 4 { β = Im e i)x r 4 + 4) 0 + i r) + i) e x r cos x 0 0 + r + ) sin x 0 r + 4r + 4 { α = Re e i)x r 4 + 4) 0 + i r) i) e x r ) cos x 0 0 r sin x 0 r 4r + 4 { β = Im e i)x r 4 + 4) 0 + i r) i) e x r cos x 0 0 r ) sin x 0 r 4r + 4 e x 0 Re e x 0 Im e x 0 Re e x 0 Im { cos x0 i sin x 0 r + ) ir { cos x0 i sin x 0 r + ) ir { cos x0 i sin x 0 r ) ir { cos x0 i sin x 0 r ) ir
9467_0_ch0_p0-034.qxd /0/ :53 PM Page 5 Solution to Homework Differential Equations I-Hsiang Wang 5. Method of Undetermined Coefficients) [0] Et).3 DIFFERENTIAL EQUATI where the minus sign indicates that V i the possibility of friction at the hole th there. Now if the tank is such that the Vt) A w h, where A w in ft ) is the co see Figure.3.3), then dv dt A w dh gives us the desired differential equatio a) LRC-series a) circuit dh Consider the above LRC series circuit. Recall from Chapter that the voltage drop dt across the three elements are L di, Inductor IR, and q dq respectively. Using the fact that I = dt C dt and Kirchhoff s Law, we have inductance L: henries h) It is interesting to note that 0) remain voltage drop across: L di case we must express the upper surface dt Lq + Rq + q/c = Et). A w Ah). See Problem 4 in Exercise Suppose L = 0.5, R =, C = 0., i Et) = e t sin 0t + e t cos t, q0) Series = q 0, I0) Circuits = 0. Consider the s Find the current It). L ure.3.4a), containing an inductor, re after a switch is closed is denoted by i Resistor noted by qt). The letters L, R, and C ar The second order differential equation resistance is shown R: ohms below: Ω) itance, respectively, and are generally voltage drop across: ir second law, the impressed voltage Et q + 4q + 5q = 4e t sin 0t + e t cos t. voltage drops in the loop. Figure.3.4b respective voltage drops across an indu First we solve the complementary solution q c t). Since the polynomial L := D i R it) is related + 4D + 5 to charge qt) on the capa has two complex roots ± i, we know that the complementary solution q c t) = C e +i)t + Ce i)t = Re { C e +i)t. Capacitor Next we find the particular solution, capacitance using the C: farads annihilator f) voltage drop across: approach and the superposition principle of nonhomogeneous equations. q C Note that 4e t sin 0t + e t cos t = 4g t) + g t), where inductor L di dt L d q dt, and equating the sum to the impresse equation Let q p, be a particular solution of q + 4q + b) 5q = e +0i)t, and q p, be a particular L C g t) = e t sin 0t = Im { e i +0i)t, g t) = e t cos t = Re { e +i)t. C L d q dt R solution of q + 4q + 5q = e FIGURE +i)t, then a particular solution q.3.4 Symbols, units, and p of the original DE is We will examine a differential e voltages. Current it) and charge qt) are q Section 5.. p t) = 4Im {q p, t) + Re {q p, t). measured in amperes A) and coulombs Solve q C), respectively p, t): q + 4q + 5q = e +0i)t, and hence q p, = B e +0i)t. Falling We findbodies that To construct a m moving in a force field, one often start B = English mathematician Isaac Newton + 0i) + 4 + 0i) + 5 v = 0 99 0i 4 + 40i + 5 = 9 + 0i. that Newton s first law of motion state Solve q continue to move with a constant velo p, t): q + 4q + 5q = e +i)t, and hence q p, = B te +i)t. We find that rock each case this is equivalent to saying t that is, the net or resultant force acti B = + i) + 4 = i. a of the body is zero. Newton s secon s 0 force acting on a body is not zero, then 9 st) tion a or, more precisely, F ma, whe Now suppose a rock is tossed upw in Figure.3.5. What is the position s building The acceleration of the rock is the seco R ir
The general solution of the original DE can then be represented as follows: qt) = 4Im { B e +0i)t + Re { B te +i)t + Re { C e +i)t, where B = 9+0i, B = i, and C will be determined by the initial conditions. With the initial condition we have q 0 = 4Im {B + Re {C = 0 50 + a 0 = 4Im {B + 0i) + Re {B + Re {C + i) = 960 a + b), 50 where a = Re {C, b = Im {C. Solve the above we get Finally, a = q 0 + 0 50, b = q 0 500 50. It) = q t) = 4Im { B + 0i)e +0i)t + Re { B + i)t + ) e +i)t + Re { C + i)e +i)t { + 0i = 4e t Im cos 0t + i sin 0t) 9 + 0i + e t Re {a + ib) + i) cos t + i sin t) = 9 50 e t sin 0t 960 960 50 e t cos t = 9 50 e t sin 0t 960 50 e t cos 0t + { + i)t + + e t Re cos t + i sin t) i 50 e t cos 0t + 4te t cos t t 4)e t sin t 5q 0 + 00 ) e t sin t 50 4t + 960 ) e t cos t t + 5q 0 794 ) e t sin t. 50 50 0
6. Variation of Parameters) [0] Find the general solution of the following DE: y + y y = xe x. First we solve the complementary solution y c. Since the polynomial L := D + D = D + )D ) has two roots {,, we have y c x) = c e x + c e x, where f x) := e x and f x) := e x are two linearly independent solutions of the linear homogeneous equation. To find a particular solution y p, let y p := u f + u f. u = W, and u W = W, where W W = f f f f = e x )) = 3e x W = 0 f xe x f = +x xex W = f 0 = x xex Hence, du dx = x = u = 3 3 ex +x f xe x xe x e x dx = 6 e x d e x) = { e x +x 6 e x+) dx = +x 6 ex + F x + ) 3e = +x 6 ex + 3e du dx = x x 3 ex = u = xe x e x dx = e x d e x) = { e x x + 3 6 6 = x 6 ex + e x ) dx = x 6e 4 6 ex + F 6e 4 x e x x dx ) e x +x dx where F t) := e t dt. We obtain a particular solution y p = u f + u f = 6 ex + 3 e x F x + ) + 6 ex + 6 ex 4 F x ) = 3 e x F x + ) + 6 ex 4 F x ), and therefore yx) = c e x + c e x + 3 e x F x + ) + 6 ex 4 F x ).
Bonus. Reduction of Order Two Times) [0] Consider a homogeneous linear third-order differential equation x 3 + 3x 3x + )y 3x + x )y + 6x + )y 6y = 0. a) Verify that f x) = x + and f x) = x + are both solutions to the above DE. b) Use the substitution y = f x)u x) to convert the original DE into a second-order DE of v := u. Write down this DE, and verify that f f x)) is a solution to it. c) Use reduction of order to find another linearly independent solution to the derived second-order DE. d) From c) derive a third solution f 3 x) of the original third-order DE so that {f, f, f are linearly independent. a) f =, f = 0 = x 3 + 3x 3x + )f 3x + x )f + 6x + )f 6f = 6x + ) 6x + ) = 0 f = x, f =, f = 0 = x 3 + 3x 3x + )f 3x + x )f + 6x + )f 6f = 6x + x ) + xx + ) 6x + ) = 0. b) Set y = u x + ), then y = u x + ) + u, y = u x + ) + u, y = u x + ) + 3u. Hence, the original DE becomes x 4 + 4x 3 x + ) u + 6 x)u + u = 0. With v = u, the above DE is x 4 + 4x 3 x + ) v + 6 x)v + v = 0. ) Plug in v = f x) f x) =, we get v x+) = 4, v x+) 3 = x 4 + 4x 3 x + ) v + 6 x)v + v, and x+) 4 = x4 + 4x 3 x + x + ) 4 + 4 x x + ) 3 + 4 x + ) = 0. c) Set v = u ), then v x+) = v = x+) ) u + 4 x+) 3 u, x+) ) u + x+) 3 u x+) 4 u, and the above DE becomes x + ) x + x ) x 4 + 4x 3 x + ) u x 4 x 3 3x x ) u = 0.
With v = u, the above DE becomes x + ) x + x ) x 4 + 4x 3 x + ) v x 4 x 3 3x x ) v = 0. Hence { v = exp and a second solution is ) { exp x + ) x 4 x 3 3x x ) x + ) x + x ) x 4 + 4x 3 x + ) dx, x 4 x 3 3x x ) x + ) x + x ) x 4 + 4x 3 x + ) dx dx. d) To find f 3, we multiply the integral of the solution found above with f and get { ) { x 4 x 3 3x x ) x+) x + ) exp x + ) x + x ) x 4 + 4x 3 x + ) dx dx dx. 3