Lecture 9: Solving Linear Nonhomogeneous DEs The Method of Undetermined Coefficients, Part I Winfried Just Department of Mathematics, Ohio University February 10, 2017 Winfried Just, Ohio University MATH3400, Lecture 9: Undetermined Coefficients I A motivating example Consider the DE y 00 + y = 1 y1 (x) = sin x + 1 is a solution. y2 (x) = cos x + 1 is another solution. But the linear combination y (x) = y1 (x) + y2 (x) = sin x + cos x + 2 is not a solution. y (x) = 2y1 (x) = 2 sin x + 2 also is not a solution. Linear combinations of solutions of nonhomogeneous linear DEs usually are not solutions of the DE. Ohio University – Since 1804 Winfried Just, Ohio University Department of Mathematics MATH3400, Lecture 9: Undetermined Coefficients I Superposition Principle for Nonhomogeneous Linear DEs Consider a nonhomogeneous nth -order DE an (x)y (n) + an−1 (x)y (n−1) + · · · + a1 (x)y 0 + a0 (x)y = g (x) The associated linear homogeneous DE aka complementary DE is an (x)y (n) + an−1 (x)y (n−1) + · · · + a1 (x)y 0 + a0 (x)y = 0 Let yc (x) be the the general solution of the complementary DE on an interval I , aka complementary solution, and let yp (x) be any particular solution of the nonhomogeneous DE on the same interval I . Then the general solution of the nonhomogeneous DE on I is given by y (x) = yc (x) + yp (x). Ohio University – Since 1804 Winfried Just, Ohio University Department of Mathematics MATH3400, Lecture 9: Undetermined Coefficients I Our motivating example revisited Consider the DE y 00 + y = 1. yp (x) = sin x + 1 is a particular solution on (−∞, ∞). The complementary linear homogeneous DE is y 00 + y = 0. Its general solution on (−∞, ∞) is yc (x) = c1 sin(x) + c2 cos x. The general solution of y 00 + y = 1 on (−∞, ∞) is y (x) = yc (x) + yp (x) = c1 sin x + c2 cos x + sin x + 1 = c1 sin x + c2 cos x + 1. Ohio University – Since 1804 Winfried Just, Ohio University Department of Mathematics MATH3400, Lecture 9: Undetermined Coefficients I Solving nonhomogeneous Linear DEs step-by-step an (x)y (n) + an−1 (x)y (n−1) + · · · + a1 (x)y 0 + a0 (x)y = g (x) 1 Form the associated (complementary) linear homogeneous DE: an (x)y (n) + an−1 (x)y (n−1) + · · · + a1 (x)y 0 + a0 (x)y = 0 2 Find the general solution yc (x) of the complementary DE an (x)y (n) + an−1 (x)y (n−1) + · · · + a1 (x)y 0 + a0 (x)y = 0 3 Find one particular solution yp (x) of the nonhomogeneous DE an (x)y (n) + an−1 (x)y (n−1) + · · · + a1 (x)y 0 + a0 (x)y = g (x) 4 Write the general solution y (x) of the nonhomogeneous DE an (x)y (n) + an−1 (x)y (n−1) + · · · + a1 (x)y 0 + a0 (x)y = g (x) as y(x) = yc (x) + yp (x). Ohio University – Since 1804 Winfried Just, Ohio University Department of Mathematics MATH3400, Lecture 9: Undetermined Coefficients I The method of undetermined coefficients Step 3 on the previous slide requires us to find one particular solution yp (x) of an y (n) + an−1 y (n−1) + · · · + a1 y 0 + a0 y = g (x). This method of undetermined coefficients allows us to do this when all an , an−1 , . . . , a0 are constant and g (x) is of a nice form. 1 Solve the associated homogeneous DE. 2 Express yp (x) in the same general form as g (x) using coefficients A, B, C , . . . to be determined later. 3 Differentiate yp (x) in its symbolic form n times. 4 Substitute in the DE and match coefficients. 5 Solve for the yet undetermined coefficients. Ohio University – Since 1804 Winfried Just, Ohio University Department of Mathematics MATH3400, Lecture 9: Undetermined Coefficients I Case 0: g (x) is a constant The method relies on our ability to identify the form of g (x). If g (x) = b0 , then write yp (x) = A. Example 0: For y 00 + 4y = 1 we have g (x) = 1. The complementary solution is yc (x) = c1 sin 2x + c2 cos 2x. The general solution is y (x) = c1 sin 2x + c2 cos 2x + A. Differentiate yp (x) = A twice: yp0 (x) = 0, yp00 (x) = 0. Substitute in the DE: y 00 + 4y = 0 + 4A = 1. Solve for the coefficient A: We get A = 14 . The general solution is y (x) = c1 sin 2x + c2 cos 2x + 14 . Ohio University – Since 1804 Winfried Just, Ohio University Department of Mathematics MATH3400, Lecture 9: Undetermined Coefficients I Case 1: g (x) is a polynomial function If g (x) = b` x ` + b`−1 x `−1 + · · · + b1 x + b0 , then write yp (x) = A` x ` + A`−1 x `−1 + · · · + A1 x + A0 . Example 1: For y 00 − y = 2x 2 − x + 7 we have g (x) = 2x 2 − x + 7. The complementary solution is yc (x) = c1 e x + c2 e −x . Write yp (x) = Ax 2 + Bx + C with coefficients A, B, C . Differentiate yp (x) twice: yp0 (x) = 2Ax + B, yp00 (x) = 2A. Substitute in the DE: y 00 − y = 2A −Ax 2 −Bx − C = 2x 2 −x + 7. Match coefficients: −A = 2, −B = −1, 2A − C = 7. Solve for the coefficients: A = −2, B = 1, C = −11. The general solution is y (x) = c1 e x + c2 e −x − 2x 2 + x − 11. Ohio University – Since 1804 Winfried Just, Ohio University Department of Mathematics MATH3400, Lecture 9: Undetermined Coefficients I Case 1: g (x) is a polynomial function If g (x) = b` x ` + b`−1 x `−1 + · · · + b1 x + b0 , then write yp (x) = A` x ` + A`−1 x `−1 + · · · + A1 x + A0 . Example 2: For y 000 + 3y 00 + 3y 0 + y = x 3 we have g (x) = x 3 . The complementary solution is yc (x) = c1 e −x + c2 xe −x + c3 x 2 e −x . Write yp (x) = Ax 3 + Bx 2 + Cx + D with coefficients A, B, C , D. Differentiate yp (x): yp0 (x) = 3Ax 2 + 2Bx + C , yp00 (x) = 6Ax + 2B, y 000 = 6A. Substitute in the DE: y 000 + 3y 00 + 3y 0 + y = 6A +18Ax + 6B + 9Ax 2 + 6Bx + 3C + Ax3 + Bx 2 + Cx + D = x3 . Match coefficients: A = 1, 9A + B = 0, 18A + 6B + C = 0, 6A + 6B + 3C + D = 0. Homework 16: Complete the example by solving for A, B, C , D and writing the general solution. Convince yourself that setting yp = Ax 3 would not work here. Just, Ohio University Ohio University – Since Winfried 1804 MATH3400, Lecture 9: Undetermined Coefficients I Department of Mathematics Case 2: g (x) is an exponential function If g (x) = e rx , then write yp (x) = Ae rx . Example 3: For y 00 − 4y = 1 ex we have g (x) = e −x . The complementary solution is yc (x) = c1 e 2x + c2 e −2x . Write yp (x) = Ae −x with coefficient A. Differentiate yp (x) twice: yp0 (x) = −Ae −x , yp00 (x) = Ae −x . Substitute in the DE: y 00 − 4y = Ae −x − 4Ae −x = e −x . Match coefficients: −3A = 1. Solve for the coefficient: A = − 31 . The general solution is y (x) = c1 e 2x + c2 e −2x − 31 e −x . Ohio University – Since 1804 Winfried Just, Ohio University Department of Mathematics MATH3400, Lecture 9: Undetermined Coefficients I Case 2: g (x) is an exponential function If g (x) = e rx , then write yp (x) = Ae rx . Example 4: For y 00 − 4y = 3x we have g (x) = 3x . The complementary solution is yc (x) = c1 e 2x + c2 e −2x . Write yp (x) = A3x = Ae (ln 3)x with coefficient A. Homework 17: Complete Example 4 by finding the general solution. Ohio University – Since 1804 Winfried Just, Ohio University Department of Mathematics MATH3400, Lecture 9: Undetermined Coefficients I Case 3: g (x) is a product of a polynomial and an exponential function If g (x) = (b` x ` + b`−1 x `−1 + · · · + b1 x + b0 )e rx , then write yp (x) = (A` x k + A`−1 x `−1 + · · · + A1 x + A0 )e rx . Example 5: For y 00 − 4y = x 2 −x ex we have g (x) = x 2 e −x − xe −x . We write yp (x) = (Ax 2 + Bx + C )e −x = Ax 2 e −x + Bxe −x + Ce −x . Homework 18: Complete Example 5 by finding the general solution. Example 6: For y 00 − 4y = x3x we have g (x) = x3x . We write yp (x) = (Ax + B)3x = Ax3x + B3x . Homework 19: Complete Example 6 by finding the general solution. Ohio University – Since 1804 Winfried Just, Ohio University Department of Mathematics MATH3400, Lecture 9: Undetermined Coefficients I Case 4: g (x) is linear combination of sine and cosine functions If g (x) = b sin αx + c cos αx, write yp (x) = A sin αx + B cos αx. Example 7: Consider the DE y 00 − y 0 = sin 3x − cos 3x. The complementary solution is yc (x) = c1 + c2 e x . Write yp (x) = A sin 3x + B cos 3x. Differentiate yp (x) twice: yp0 (x) = 3A cos 3x − 3B sin 3x, yp00 (x) = −9A sin 3x − 9B cos 3x. Substitute in the DE: y 00 − y 0 = −9A sin 3x − 9B cos 3x − 3A cos 3x + 3B sin 3x = sin 3x − cos 3x. Match coefficients: −9A + 3B = 1, −9B − 3A = −1. 1 Solve for A and B: A = − 15 , B= 2 15 . The general solution is y (x) = c1 + c2 e x − Ohio University – Since 1804 Winfried Just, Ohio University 1 15 sin 3x + 2 15 cos 3x. Department of Mathematics MATH3400, Lecture 9: Undetermined Coefficients I Case 4: g (x) is linear combination of sine and cosine functions If g (x) = b sin αx + c cos αx, write yp (x) = A sin αx + B cos αx. Example 8: For y 00 − y 0 = sin x we have g (x) = sin x. Although a term c cos x does not appear in g (x), we still need to include a term B cos x when we set up the form of the particular solution: yp (x) = A sin x + B cos x. Homework 20: Complete Example 8 by finding the general solution and convince yourself that setting yp (x) = A sin x would not work. Ohio University – Since 1804 Winfried Just, Ohio University Department of Mathematics MATH3400, Lecture 9: Undetermined Coefficients I Case 4: g (x) is product of an exponential and a sine or cosine function If g (x) = be rx sin βx or g (x) = be rx cos βx, then write yp (x) = Ae rx sin βx + Be rx cos βx. Example 9: For y 00 + y = e2x sin 3x + 4e2x cos 3x write yp (x) = Ae 2x sin 3x + Be 2x cos 3x. Homework 21: Complete Example 9 by finding the general solution. Example 10: Consider the DE y 00 + y 0 = cos x ex . We need to write yp (x) = Ae −x sin x + Be −x cos x. Homework 22: Complete Example 10 by finding the general solution. Ohio University – Since 1804 Winfried Just, Ohio University Department of Mathematics MATH3400, Lecture 9: Undetermined Coefficients I Case 5: g (x) contains functions of several forms If g (x) is a linear combination of functions of several of the above forms, then add the respective expressions, using a new symbol for the undetermined coefficient every time. Example 11: Consider the DE y 00 − 2y 0 + y = cos 2x + xe5x . Write yp (x) = A sin 2x + B cos 2x + Cxe 5x + De 5x . Example 12: For the DE y 00 − y 0 = e 2x sin 3x + 4 cos 3x − sin x Set up yp (x) in the following form: Ae 2x sin 3x + Be 2x cos 3x + C sin 3x + D cos 3x + E sin x + F cos x. Homework 23: For each of the following DEs, find and appropriate form of yp (x). (a) y 000 − y 0 = 6x + x e 4x − 5x . (b) y 000 − y 0 = 3x 2 cos 2x + 2xe 3x − e x sin 4x. Ohio University – Since 1804 Winfried Just, Ohio University Department of Mathematics MATH3400, Lecture 9: Undetermined Coefficients I
© Copyright 2026 Paperzz