LECTURE 10: HOMOGENEOUS SECOND ORDER LINEAR ODES WITH CONSTANT COEFFICIENTS MINGFENG ZHAO September 30, 2015 Theorem 1. Let p(x) and q(x) be continuous functions, y1 and y2 are two linearly independent solutions to a homogeneous equation y 00 + p(x)y 0 + q(x)y = 0. Then the general solution to y 00 + p(x)y 0 + q(x)y = 0 is: y = C1 y1 (x) + C2 y2 (x). Definition 1. Any two linearly independent solutions y1 and y2 to a homogeneous equation y 00 + p(x)y 0 + q(x)y = 0 is called a fundamental set of solutions to this homogeneous equation y 00 + p(x)y 0 + q(x)y = 0. Homogeneous second order linear ODEs with constant coefficients Question 1. Let a, b and c be three constants, how can we solve the differential equation ay 00 + by 0 + cy = 0? Let’s try y(x) = erx to be a solution, then y 0 = rerx and y 00 = r2 erx . So we get ay 00 + by 0 + cy = ar2 erx + brerx + cerx = erx [ar2 + br + c]. So y(x) = erx is a solution to ay 00 + by 0 + cy = 0 if and only if r is a zero of ar2 + br + c = 0. Definition 2. Let a, b and c be three constants, the characteristic equation of the differential equation ay 00 +by 0 +cy = 0 is: ar2 + br + c = 0. Theorem 2. Let a, b and c be three constants, the roots of ar2 + br + c = 0 are: √ √ −b + b2 − 4ac −b − b2 − 4ac , and r2 = . r1 = 2a 2a Then 1 2 MINGFENG ZHAO 1) If b2 − 4ac > 0, then r1 and r2 are two different real numbers, and √ √ −b b2 − 4ac b2 − 4ac −b r1 = + , and r2 = − . 2a 2a 2a 2a The general solution to ay 00 + by 0 + cy = 0 is: y = C1 er1 x + C2 er2 x . 2) If b2 − 4ac = 0, then r1 = r2 = − b is a real number. The general solution to ay 00 + by 0 + cy = 0 is: 2a −b −b y = C1 e 2a ·x + C2 xe 2a ·x . 3) If b2 − 4ac < 0, then r1 and r2 are two different complex numbers, and √ √ 4ac − b2 4ac − b2 b b , and r2 = − − i r1 = − + i 2a 2a 2a 2a The general solution to ay 00 + by 0 + cy = 0 is: ! √ b b 4ac − b2 − 2a ·x y = C1 e cos · x + C2 e− 2a ·x sin 2a √ ! 4ac − b2 ·x . 2a Proof. If b2 − 4ac 6= 0, let r be a solution to the characteristic equation ar2 + br + c = 0 and y = erx , then y 0 = rerx and y 00 = r2 erx . So we get ay 00 + by 0 + cy = ar2 erx + brerx + cerx = erx ar2 + br + c = 0, Since ar2 + br + c = 0. So y = erx is a solution to ay 00 + by 0 + cy = 0. 1) If b2 − 4ac > 0, the we have two different real zeros to ar2 + br + c = 0 are: √ √ −b − b2 − 4ac −b + b2 − 4ac , and r2 = . r1 = 2a 2a So we know that y = er1 x and y = er2 x are two linearly independent solutions to ay 00 + by 0 + cy = 0, which implies that the general solution to ay 00 + by 0 + cy = 0 is: √ y = C1 e −b+ b2 −4ac x 2a √ + C2 e −b− b2 −4ac x 2a . b . We have known that y = erx is a solution to 2a ay 00 + by 0 + cy = 0, now let’s look for another linearly independent solution y2 . Let y = xerx , then 2) If b2 − 4ac = 0, then the only solution to ar2 + br + c = 0 is r = − y 0 = erx + rxerx , and y 00 = rerx + rerx + r2 xerx = 2rerx + r2 xerx . LECTURE 10: HOMOGENEOUS SECOND ORDER LINEAR ODES WITH CONSTANT COEFFICIENTS 3 So we get ay 00 + by 0 + cy = a[2rerx + r2 xerx ] + b[erx + rxerx ] + cxerx = erx 2ar + ar2 x + b + brx + cx = erx (2ar + b) + x(ar2 + br + c) = erx (2ar + b) = 0 Since ar2 + br + c = 0 Since r = − b . 2a So y = xerx is also a solution to ay 00 + by 0 + cy = 0. Hence the general solution to ay 00 + by 0 + cy = 0 is: −b −b y = C1 e 2a ·x + C2 xe 2a ·x . 3) If b2 − 4ac < 0, the we have two different complex zeros to ar2 + br + c = 0 are: √ √ √ −b + b2 − 4ac b 4ac − b2 b 4ac − b2 r1 = =− +i , and r2 = − − i . 2a 2a 2a 2a 2a So we know that y = er1 x and y = er2 x are two linearly independent solutions to ay 00 + by 0 + cy = 0. Since r1 and r2 are complex numbers, then y = er1 x and y = er2 x are two complex functions. Notice that e r1 x = e √ b +i − 2a √ = b e− 2a x ei " 4ac−b2 2a 4ac−b2 2a x x √ ! !# √ 4ac − b2 4ac − b2 cos x + i sin x By Euler’s identity = e 2a 2a ! ! √ √ b b 4ac − b2 4ac − b2 − 2a x x − 2a = e cos sin x + ie x 2a 2a b x − 2a e r2 x = e √ b − 2a −i 4ac−b2 2a √ b = e− 2a x e−i " 4ac−b2 2a x x √ ! !# √ 4ac − b2 4ac − b2 = e cos x − i sin x By Euler’s identity 2a 2a ! ! √ √ 2 2 b b 4ac − b 4ac − b = e− 2a x cos x − ie− 2a x sin x . 2a 2a b − 2a x So we get e r1 x + e r2 x 2 √ = e b − 2a x cos 4ac − b2 x 2a ! 4 MINGFENG ZHAO e r1 x − e r2 x 2i √ = e b x − 2a sin ! 4ac − b2 x . 2a √ ! ! √ 2 b 4ac − b2 4ac − b cos x and y = e− 2a x sin x are two linearly independent Hence we know that y = e 2a 2a solutions to ay 00 + by 0 + cy = 0. Hence we know that the general solution to ay 00 + by 0 + cy = 0 is: ! ! √ √ b b 4ac − b2 4ac − b2 ·x ·x − 2a − 2a cos sin y = C1 e · x + C2 e ·x . 2a 2a b x − 2a Remark 1. Let i be a number which is called the imaginary unit, that is, i2 = −1. A complex number is the form of: a + ib, for some real numbers a and b. The arithmetic laws of complex numbers: Let a, b, c and d be four real numbers, then • Addition: (a + bi) + (c + di) = (a + c) + i(b + d). • Subtraction: (a + bi) − (c + di) = (a − c) + i(b − d). • Multiplication: (a + bi)(c + di) = ac + adi + bci + bdi2 = (ac − bd) + i(ad + bc). • Division: (a + bi)(c − di) ac − adi + bci − bdi2 (ac + bd) − i(ad + bc) a + bi = = = . c + di (c + di)(c − di) c2 + d2 c2 + d2 • Conjugation: a + bi = a − bi. • Euler’s indentity: ea+ib = ea · eib = ea [cos(b) + i sin(b)] = ea cos(b) + iea sin(b). Example 1. Solve y 00 − y 0 − y = 0. Let y = erx be a solution to y 00 − y 0 − y = 0, then y 0 = rerx , and y 00 = r2 erx . LECTURE 10: HOMOGENEOUS SECOND ORDER LINEAR ODES WITH CONSTANT COEFFICIENTS 5 So we get 0 = y 00 − y 0 − y = r2 erx − rerx − erx = erx [r2 − r − 1]. So we get r2 − r − 1 = 0, which implies that √ 1+ 5 r1 = , 2 √ 1− 5 and r2 = . 2 So the general solution to y 00 − y 0 − y = 0 is: y(x) = C1 e √ 1+ 5 ·x 2 + C2 e √ 1− 5 ·x 2 . Example 2. Let a be a real constant, solve y 00 − 4y 0 − 5y = 0, y(0) = 6 and y 0 (0) = 6a. Then find the value of a such that the solution approaches 0 as x → ∞. Let y = erx be a solution to y 00 − 4y 0 − 5y = 0, then y0 = rerx y 00 = r2 erx 0 = y 00 − 4y 0 − 5y = r2 erx − 4rerx − 5erx = erx (r2 − 4r − 5). So r2 − 4r − 5 = 0, that is, r1 = −1, and r2 = 5. So the general solution to y 00 − 4y 0 − 5y = 0 is: y(x) = C1 e−x + C2 e5x . Then y 0 (x) = −C1 e−x + 5C2 e5x . Since y(0) = 6 and y 0 (0) = 6a, then C1 + C2 = 6, and − C1 + 5C2 = 6a. 6 MINGFENG ZHAO Solve the above system, we get C1 = 5 − a, and C2 = 1 + a. So we know that the solution to y 00 − 4y 0 − 5y = 0, y(0) = 6 and y 0 (0) = 6a is: y(x) = (5 − a)e−x + (1 + a)e5x . Moreover, if we assume y(x) → 0 as x → ∞, then we must have 1 + a = 0, that is, a = −1 . Example 3. Solve y 00 − 8y 0 + 16y = 0, y(0) = 1 and y 0 (0) = 6. Let y = erx be a solution to y 00 − 8y 0 + 16y = 0, then y 0 = rerx and y 00 = r2 erx . So we have 0 = y 00 − 8y 0 + 16y = r2 erx − 8rerx + 16erx = erx (r2 − 8r + 16). So r2 − 8r + 16 = 0, that is, r1 = r2 = 4. So the general solution to y 00 − 8y 0 + 16y = 0 is: y(x) = C1 e4x + C2 xe4x . Since y(0) = 1, then C1 = 1 and y(x) = e4x + C2 xe4x . So y 0 (x) = 4e4x + C2 e4x + 4C2 xe4x . Since y 0 (0) = 6, then 6 = 4 + C2 , that is, C2 = 2. So the solution to y 00 − 8y 0 + 16y = 0, y(0) = 1 and y 0 (0) = 6 is: y(x) = e4x + 2xe4x . Example 4. Find the solution of y 00 − 6y 0 + 13y = 0, y(0) = 0 and y 0 (0) = 10. Let y = erx be a solution to y 00 − 6y 0 + 13y = 0, then y0 = rerx y 00 = r2 erx 0 = y 00 − 6y 0 + 13y LECTURE 10: HOMOGENEOUS SECOND ORDER LINEAR ODES WITH CONSTANT COEFFICIENTS 7 = r2 erx − 6rerx + 13erx = erx (r2 − 6r + 13). So r2 − 6r + 13 = 0, that is, r1 = 6+ √ √ 36 − 4 · 13 6 + −13 = = 3 + 2i, 2 2 and r2 = 3 − 2i. Notice that e r1 x = e(3+2i)x = e3x+2ix = e3x · ei(2x) = e3x [cos(2x) + i sin(2x)] = e3x cos(2x) + ie3x sin(2x). By Euler’s identity So the general solution to y 00 − 6y 0 + 13y = 0 is: y(x) = C1 e3x cos(2x) + C2 e3x sin(2x). Since y(0) = 0, then C1 = 0, that is, y(x) = C2 e3x sin(2x). So we get y 0 (x) = 3C2 e3x sin(2x) + 2C2 e3x cos(2x). Since y 0 (0) = 10, then 10 = y 0 (0) = 2C2 that is, C2 = 5. Therefore, the solution of y 00 − 6y 0 + 13y = 0, y(0) = 0 and y 0 (0) = 10 is y(x) = 5e3x sin(2x) . Problems you can do: Lebl’s Book [2]: All exercises on Page 55 and Page 56. Braun’s Book [1]: All Exercises on Page 140, Page 144, Page 145, Page 149 and Page 150. Read all materials in Section 2.2. References [1] Martin Braun. Differential Equations and Their Applications: An Introduction to Applied Mathematics. Springer, 1992. [2] Jiri Lebl. Notes on Diffy Qs: Differential Equations for Engineers. Createspace, 2014. Department of Mathematics, The University of British Columbia, Room 121, 1984 Mathematics Road, Vancouver, B.C. Canada V6T 1Z2 E-mail address: mingfeng@math.ubc.ca