LECTURE 14: NONHOMOGENEOUS EQUATIONS MINGFENG ZHAO October 14, 2015 Theorem 1. Let yc (x) be the general solution to the homogeneous equation y 00 + p(x)y 0 + q(x)y = 0 ( which is call the complementary solution), and yp (x) be any particular solution to the nonhomogeneous equation y 00 +p(x)y 0 +q(x)y = f (x), then the general solution to the nonhomogeneous equation y 00 + p(x)y 0 + q(x)y = f (x) is: y(x) = yp (x) + yc (x). Proof. Let y be any solution to the nonhomogeneous equation y 00 + p(x)y 0 + q(x)y = f (x), then y 00 + p(x)y 0 + q(x)y = f (x). Let yp (x) be any particular solution to the nonhomogeneous equation y 00 + p(x)y 0 + q(x)y = f (x), then yp00 + p(x)yp0 + q(x)yp = f (x). Let yc (x) = y(x) − yp (x), then we know that yc00 + p(x)yc0 + q(x)yc = 0, that is, yc is a solution to the homogeneous equation y 00 + p(x)y 0 + q(x)y = 0. Undetermined Coefficients: Let a, b and c be constants, consider the equation: ay 00 + by 0 + cy = f (x). Let pn (x) and p̃n (x) be polynomials with degree n, a particular solution yp (x) to ay 00 + by 0 + cy = f (x) can be taken as: f (x) yp (x) pn (x)emx cos(kx) + p̃n (x)emx sin(kx) xα [qn (x)emx cos(kx) + q̃n (x)emx sin(kx)] where 1 2 MINGFENG ZHAO • α is one of 0, 1 and 2 (α is the multiplicity of m+ki as the solutions to the characteristic equation ar2 +br +c = 0 of ay 00 + by 0 + cy = 0): – If m + ki is not a root of ar2 + br + c = 0, then α = 0. – If m + ki is a root of ar2 + br + c = 0 and ar2 + br + c = 0 has two different roots, then α = 1. – If m + ki is a root of ar2 + br + c = 0 and ar2 + br + c = 0 only has one root m + ki, then α = 2. • qn (x) and q̃n (x) are undetermined polynomials with degree n. Example 1. Find the general solution to y 00 + 5y 0 + 6y = 2x + 1. The characteristic equation to y 00 + 5y 0 + 6y = 0 is : r2 + 5r + 6 = 0. Solve r2 + 5r + 6 = 0, we get r1 = −2, and r2 = −3. So the general solution to the homogeneous equation y 00 + 5y 0 + 6y = 0 is: y(x) = C1 e−2x + C2 e−3x . Let yp (x) = Ax + B be a particular solution to y 00 + 5y 0 + 6y = 2x + 1, then yp00 + 5yp0 + 6yp = 0 + 5A + 6(Ax + B) = 2x + 1. That is, we have (6A − 2)x + 5A + 6B − 1 = 0. So 6A − 2 = 0, and 5A + 6B − 1 = 0. So A= 1 , 3 1 and B = − . 9 x 1 − is a particular solution to the nonhomogeneous equation y 00 + 5y 0 + 6y = 2x + 1. Therefore, he 3 9 general solution to the nonhomogeneous equation y 00 + 5y 0 + 6y = 2x + 1 is: Hence yp (x) = y(x) = x 1 − + C1 e−2x + C2 e−3x . 3 9 LECTURE 14: NONHOMOGENEOUS EQUATIONS 3 Example 2. Find a particular solution to y 00 + 2y 0 + 3y = e5x . The characteristic equation to y 00 + 2y 0 + 3y = 0 is : r2 + 2r + 3 = 0. Solve r2 + 5r + 6 = 0, we get √ r1 = −1 + i 2, √ and r2 = −1 − i 2. Let yp (x) = Ae5x be a particular solution to y 00 + 2y 0 + 3y = e5x , then So 38A = 1, that is, A = 1 38 . yp0 (x) = 5Ae5x yp00 (x) = 25Ae5x yp00 + 2yp0 + 3yp = 25Ae5x + 10Ae5x + 3Ae5x = 38Ae5x = e5x Hence a particular solution to y 00 + 2y 0 + 3y = e5x is yp (x) = 1 5x e . 38 Example 3. Find a particular solution to y 00 − 6y 0 + 9y = e3x . The characteristic equation of y 00 − 6y 0 + 9y = 0 is: r2 − 6r + 9 = 0. Solve r2 − 6r + 9 = 0, we get r1 = r2 = 3. Let yp (x) = Ax2 e3x be a particular solution to y 00 − 6y 0 + 9y = e3x , then yp0 (x) = 2Axe3x + 3Ax2 e3x yp00 (x) = 2Ae3x + 6Axe3x + 6Axe3x + 9Ax2 e3x = 2Ae3x + 12Axe3x + 9Ax2 e3x = 2Ae3x + 12Axe3x + 9Ax2 e3x − 6 2Axe3x + 3Ax2 e3x + 9Ax2 e3x = 2Ae3x = e3x . yp00 − 6yp0 + 9yp 4 MINGFENG ZHAO So we have 2A = 1. That is, A = 1 1 . So a particular solution to y 00 − 9y = e3x is yp (x) = x2 e3x . 2 2 Example 4. Find a particular solution to y 00 + y = cos(2x). The characteristic equation to y 00 + y = 0 is: r2 + 1 = 0. Solve r2 + 1 = 0, we have r1 = i, and r2 = −i Let yp (x) = A cos(2x) + B sin(2x) be a particular solution to y 00 + 2y 0 + 2y = cos(2x), then yp0 (x) = −2A sin(2x) + 2B cos(2x) yp00 (x) = −4A cos(2x) − 4B sin(2x) yp00 + yp = −4A cos(2x) − 4B sin(2x) + A cos(2x) + B sin(2x) = −3A cos(2x) − 3B sin(2x) = cos(2x). So −3A = 1, and − 3B = 0. So we have 1 A=− , 3 and B = 0. 1 So a particular solution to y 00 + y = cos(2x) is yp (x) = − cos(2x) . 3 Example 5. Find a particular solution to y 00 + y = cos(x). The characteristic equation to y 00 + y = 0 is: r2 + 1 = 0. Solve r2 + 1 = 0, we have r1 = i, and r2 = −i Let yp (x) = x[A cos(x) + B sin(x)] be a particular solution to y 00 + y = cos(x), then yp0 (x) = A cos(x) + B sin(x) + x[−A sin(x) + B cos(x)] yp00 (x) = −A sin(x) + B cos(x) − A sin(x) + B cos(x) + x[−A cos(x) − B sin(x)] LECTURE 14: NONHOMOGENEOUS EQUATIONS 5 = −2A sin(x) + 2B cos(x) − x[A cos(x) + B sin(x)] yp00 + yp = −2A sin(x) + 2B cos(x) − x[A cos(x) + B sin(x)] + x[A cos(x) + B sin(x)] = −2A sin(x) + 2B cos(x) = cos(x). So −2A = 0, and 2B = 1. So we have A = 0, So a particular solution to y 00 + y = cos(x) is yp (x) = and B = 1 . 2 x sin(x) . 2 Problems you can do: Lebl’s Book [2]: Exercise 2.5.2, 2.5.3, 2.5.4, 2.5.7 b), 2.5.9, 2.5.101, 2.5.102, 2.5.103 and 2.5.105 on Page 75 and Page 76. Braun’s Book [1]: All exercises on Page 164. Read all materials in Section 2.5. 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