LECTURE 10: CONSTANT COEFFICIENT SECOND ORDER LINEAR ODES MINGFENG ZHAO September 24, 2014 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). In this case, {y1 (x), y2 (x)} is called a fundamental set of solutions to y 00 + p(x)y 0 + q(x)y = 0. To find the general solution to a constant coefficient second order liner differential equation ay 00 + by 0 + cy = 0: 1) Write the characteristic equation of ay 00 + by 0 + cy = 0: ar2 + br + c = 0. 2) Find the solutions to the characteristic equation ar2 + br + c = 0. – Compute b2 − 4ac. – Solve ar2 + br + c = 0: ∗ If ∆ = b2 − 4ac > 0, then r1 , r2 are two different real numbers, and √ √ −b b2 − 4ac b2 − 4ac −b + , and r2 = − . r1 = 2a 2a 2a 2a ∗ If b2 − 4ac = 0, then we have the same real root, and r1 = r2 = − b . 2a ∗ If b2 − 4ac < 0, then r1 and r2 are two different complex numbers, and √ √ b b 4ac − b2 4ac − b2 r1 = − + i , and r2 = − − i 2a 2a 2a 2a 3) Write the general solution to ay 00 + by 0 + cy = 0: – If b2 − 4ac > 0, then y = C1 er1 x + C2 er2 x . 1 2 MINGFENG ZHAO – If b2 − 4ac = 0, then −b −b y = C1 e 2a ·x + C2 xe 2a ·x . – If b2 − 4ac < 0, then √ y = C1 e b ·x − 2a cos 4ac − b2 x 2a √ ! b ·x − 2a + C2 e sin ! 4ac − b2 x . 2a Complex roots Recall the quadratic formula: the solution to ar2 + br + c = 0 is: √ −b ± b2 − 4ac . r1,2 = 2a Question 1. How about b2 − 4ac < 0? 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. Theorem 2 (Euler’s identity). Let a and b be two real numbers, then ea+ib = ea cos(b) + iea sin(b). LECTURE 10: CONSTANT COEFFICIENT SECOND ORDER LINEAR ODES 3 Consider the equation ar2 + br + c = 0, if b2 − 4ac < 0, then the roots are: √ √ b 4ac − b2 4ac − b2 b r1 = − + i , and r2 = − − i . 2a 2a 2a 2a So √ e r1 x e r2 x = e b − 2a ·x cos √ = b − 2a ·x e cos 4ac − b2 ·x 2a ! 4ac − b2 ·x 2a ! √ + ie b − 2a ·x sin √ − ie b − 2a ·x sin 4ac − b2 ·x 2a ! ! 4ac − b2 ·x . 2a Therefore, we have √ e b − 2a ·x cos √ e b − 2a ·x sin 4ac − b2 ·x 2a ! 4ac − b2 ·x 2a ! = er1 x + er2 x 2 = er1 x − er2 x . 2i Example 1. Solve y 00 − y 0 − y = 0. The characteristic equation of y 00 − y 0 − y = 0 is: r2 − r − 1 = 0. Solve r2 − r − 1 = 0, we get √ 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 → ∞. The characteristic equation of y 00 − 4y 0 − 5y = 0 is: r2 − 4r − 5 = 0. Solve r2 − 4r − 5 = 0, we have r = −1, and r = 5. So the general solution to y 00 − 4y 0 − 5y = 0 is: y(x) = C1 e−x + C2 e5x . 4 MINGFENG ZHAO 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. 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. Find the general solution to 16y 00 + 24y 0 + 9y = 0. The characteristic equation of 16y 00 + 24y 0 + 9y = 0 is: 16r2 + 24r + 9 = 0. Solve 16r2 + 24r + 9 = 0,then 3 r=− . 4 So the general solution to 16y 00 + 24y 0 + 9y = 0 is: 3 3 y(x) = C1 e− 4 x + C2 xe− 4 x . Example 4. Solve y 00 − 8y 0 + 16y = 0, y(0) = 1 and y 0 (0) = 6. The characteristic equation of y 00 − 8y 0 + 16y = 0 is: r2 − 8r + 16 = 0. Solve r2 − 8r + 16 = 0, we have r1 = r2 = 4. So the general solution to y 00 − 8y 0 + 16y = 0 is: y(x) = C1 e4x + C2 xe4x . LECTURE 10: CONSTANT COEFFICIENT SECOND ORDER LINEAR ODES 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 5. Find the general solution to y 00 + k 2 y = 0, where k > 0. The characteristic equation of y 00 + k 2 y = 0 is: r2 + k 2 = 0. Solve r2 + k 2 = 0, then r1 = ki, and r2 = −ki. Then the general solution to y 00 + k 2 y = 0 is: y = C1 cos(kx) + C2 sin(kx) . Example 6. Solve y 00 + 2y 0 + 5y = 0, y(0) = 3, y 0 (0) = 1. The characteristic equation of y 00 + 2y 0 + 5y = 0 is: r2 + 2r + 5 = 0. Solve r2 + 2r + 5 = 0, we get r1 = −2 + √ −2 + −16 4−4·5 = = −1 + 2i, 2 2 √ and r2 = −1 − 2i. So the general solution to y 00 + 2y 0 + 5y = 0 is: y(x) = C1 e−x cos(2x) + C2 e−x sin(2x). Since y(0) = 3, then C1 = 3 and y(x) = 3e−1 cos(2x) + C2 e−x sin(2x). So y 0 (x) = −3e−x cos(2x) − 6e−x sin(2x) + C2 e−x sin(2x) + 2C2 e−x cos(2x). 5 6 MINGFENG ZHAO Since y 0 (0) = 1, −3 + 2C2 = 1, then C2 = 2. So the solution to y 00 + 2y 0 + 5y = 0, y(0) = 3, y 0 (0) = 1 is: y(x) = 3e−x cos(2x) + 2e−x sin(2x) . Example 7. Find the solution of y 00 − 6y 0 + 13y = 0, y(0) = 0 and y 0 (0) = 10. The characteristic equation of y 00 − 6y 0 + 13y = 0 is: r2 − 6r + 13 = 0. Solve r2 − 6r + 13 = 0, we get r1 = 6+ √ √ 36 − 4 · 12 6 + −16 = = 3 + 2i, 2 2 and r2 = 3 − 2i. 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) . 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