Nonhomogeneous Linear Differential Equations with Constant Coefficients - (3.4) Method of Undetermined Coefficients Consider an nth-order nonhomogeneous linear differential equation with constant coefficients: L y g x where L y a n y n a n 1 y n 1... a 1 y a 0 y. We know the general solution of this differential equation is: where y y h y p y h C 1 y 1... C n y n is the general solution of L y 0 and y p is a particular solution of L y g x, respectively. We know how to find y h from Section 3.3. In this section, we will study a method called The Method of Undetermined Coefficients to find y p. Notice that if g x g 1 x g x and y p1 and y p are particular solutions of L y g 1 x and L y g x, respectively, then y p y p1 y p is a particular solution of L y g x. Soifg x is a sum of k functions g i x s, we may solve equations L y g i x for i 1,,k one by one. The Method of Undetermined Coefficients: Let y h C 1 y 1... C n y n be the general solution of the differential equation: L y 0. Find y p, a particular solution of the differential equation: L y g x. Observe that the following are possible types of functions for y i s : type of g x examples polynomial 1 x, x 1 x3 exponential function e x 1, 3 e x sine and cosine cos x, sin x combinations of above functions xe x, x sin 3x, x 1 e x cos x This method is designed to solve y p when g x is one of above functions. 1. The type of g x is different from any of y i s. The solution y p can be chosen as follows. type of g x choice of y p b k x k b k 1 x k 1... b 1 x b 0 A k x k A k 1 x k 1... A 1 x A 0 e ax cos x or sin x e x cos x or e x sin x b k x k b k 1 x k 1... b 1 x b 0 e x b k x k b k 1 x k 1... b 1 x b 0 sin x or b k x k b k 1 x k 1... b 1 x b 0 cos x Ae ax A cos x B sin x Ae x cos x Be x sin x A k x k A k 1 x k 1... A 1 x A 0 e x A k x k A k 1 x k 1... A 1 x A 0 sin x B k x k B k 1 x k 1... B 1 x B 0 cos x. The type of g x is the same as one of y i s. The solution y p x h y p where y p is chosen from above table and the positive integer h is chosen so that x h y p is different from any of y i s. 1
Constants A i s and B i s are determined so that y p is a particular solution. Example Let y h be the general solution of L y 0 where y h C 1 e x C xe x C 3 cos x C 4 sin x C 5 e x C 6 e x sin x C 7 e x cos x C 8. Give the form of a particular solution y p of the differential equation: L y x e 3x 4e x cos x x sin 4x e x cos x cos x. Consider g x g 1 x g x g 3 x g 4 x g 5 x g 6 x g 7 x. Choose y pi : i g i x y pi 1 x A x A 1 x A 0 x e 3x Be 3x 3 4e x Ce x x 4 cos x D 1 cos x D sin x 5 x sin 4x E 1 x E sin 4x E 3 x E 4 cos 4x 6 e x cos x F 1 e x cos x F e x sin x 7 cos x G 1 cos x G sin x x y p y p1... y P7 A x A 1 x A 0 x Be 3x Ce x x D 1 cos x D sin x E 1 x E sin 4x E 3 x E 4 cos 4x F 1 e x cos x F e x sin x G 1 cos x G sin x x Example Solve y y 3y 4x 5 6xe x. 1. Solve y h from the equation: y y 3y 0. P m m m 3 m 3 m 1 0, m 3, m 1 y h c 1 e 3x c e x. Solve y p1 from y y 3y 4x 5. Let y p1 Ax B. Then y p1 A, y p1 0. y y 3y 4x 5 0 A 3 Ax B 4x 5 3Ax A 3B 4x 5 coefficients of x : 3A 4, A 4 3 constants: A 3B 5, B 1 3 5 4 3 3 9, y p1 4 3 x 3 9 3. Solve y p from y y 3y 6xe x. Let y p Ax B e x. Then y p Ae x Ax B e x Ax A B e x, y p A e x Ax A B e x 4Ax 4A 4B e x y y 3y 6xe x 4Ax 4A 4B e x Ax A B e x 3 Ax B e x 6xe x Dropping e x from both sides of the equation, we have polynomials on both sides of the equation: 4A 4A 3A x 4A 4B A B 3B 6x 3Ax A B 6x
coefficients of x : 3A 6, A constants: A B 0, B A 4, y p x 4 e x x e x 4. the general solution of L y g x : y y h y p1 y p c 1 e 3x c e x 4 3 x 3 9 x ex Example Solve y 5y 4y 8e x 4x. 1. Solve y h from y 5y 4y 0. P m m 3 5m 4m m m 4 m 1 0, m 0, m 1, m 4. y h c 1 c e x c e 4x.. Solve y p1 from y 5y 4y 8e x. Let y p1 Ae x x Axe x. Then y A e x xe x A 1 x e x, y A e x 1 x e x A x e x y A e x x e x A 3 x e x y 5y 4y 8e x A 3 x e x 5A x e x 4A 1 x e x 8e x Drop the factor e x from both sides of the equation, we have polynomials in x on both sides of the equation: A 5A 4A x 3A 10A 4A 8 3A 8, A 8 3, y p 1 8 3 xex 3. Solve y p from y 5y 4y 4x Let y p Ax B x Ax Bx. Then y p Ax B, y p A, y p3 0. y 5y 4y 4x 0 5 A 4 Ax B 4x 8Ax 10A 4B 4x coefficients of x : 8A 4, A 1 constants: 10A 4B 0, B 10 4 A 5 4, y p 1 x 5 4 x 4. The general solution of L y g x : y y c y p1 y p c 1 c e x c e 4x 8 3 xex 1 x 5 4 x Example Solve y 9y cos x if 0 x 0 if x, y 0 0, y 0 0. 1. Solve y h from y 9y 0. P m m 9 0, m i3. y h c 1 cos 3x c sin 3x. Solve y p from y 9y cos x. Let y p A cos x B sin x. Then y p A sin x B cos x, y p 4A cos x 4B sin x 3 y 9y cos x 4A cos x 4B sin x 9 A cos x B sin x cos x
4A 9A cos x 4B 9B sin x cos x coefficients of cos x : 5A, A 5 coefficients of sin x : 5B 0, B 0, y p 5 cos x 3. The general solution of L y g x : y y h y p c 1 cos 3x c sin 3x 5 cos x 0 x c 3 cos 3x c 4 sin 3x x 4. Solve the initial value problem: For 0 x, y 3c1 sin 3x 3c cos 3x 4 5 sin x y 0 c 1 5 0, c 1 5 y 0 3c 0, c 0, y 5 cos 3x 5 cos x. For x, the initial conditions are: y 6 5 sin 3x 4 y 5 sin x, 5 y 6 5 Then y 3c 3 sin 3x 3c 4 cos 3x y 0 c 4 5, c 4 5 y 3c 3 6 5, c 3 5, y 5 cos 3x 5 sin 3x The solution of the initial value problem: y y h y p 5 cos 3x 5 cos x 0 x 5 cos 3x 5 sin 3x x 4
0.4 1 0. 0 0.5 1 1.5.5 3 x 0 4 6 8 10 x -1-0. -0.4 - y f x cos x if 0 x 0 ifx 5