MATHEMATICS FOR ENGINEERS & SCIENTISTS 3.5. Second order linear O.D.E.s: non-homogeneous case.. We ll now consider non-homogeneous second order linear O.D.E.s. These are of the form a + by + c rx) for some function rx) which is not zero. Notice now that the Principle of Superposition doesn t work since if y 1 x) and y x) are solutions, then y 1 + y satisfies a + by + c a 1 + ) + by 1 + y ) + cy 1 + y ) = rx). However, something similar does help: let y c x) be the general solution of the corresponding homogeneous equation a + by + c 0. We call y c x) the of the O.D.E., which we can find using the methods of the previous sections. Proposition.11. Suppose y p x) is any solution of a + by + c rx). Then yx) = y c x) + y p x) is the general solution of a + b, y + c rx). Proof. We have a + by + c a c + p ) + by c + y p) + cy c + y p ) = a c + by c + cy c ) + a p + by p + c, y p ) = 0 + rx) Also, this solution y c + y p will have two arbitrary coefficients coming from the complementary function y c x). Thus to solve the non-homogeneous O.D.E., we now just need to find a particular solution y p x). When rx) is of a familiar form, one way to do this is the Method of Undetermined Coefficients. This involves looking at rx) and making an educated guess as to the shape of y p x), knowing that the derivatives of y p x) have to somehow add up to give rx). For instance, consider the following table. rx) ke ωx k 0 + k 1 x + + k n x n k cos ωx k sin ωx y p x) Ce ωx C 0 + C 1 x + + C n x n C cos ωx + D sin ωx C cos ωx + D sin ωx Basic Rule: If rx) is one of the functions in the first column of the table, choose the corresponding function y p x) in the second column and find the undetermined coefficients by substituting y p x) and its derivatives into the non-homogeneous O.D.E. Sum Rule: If rx) is a sum of functions in the first column of the table, then choose for y p x) the sum of the corresponding functions in the second column. Modification Rule: If rx) is a solution of the corresponding homogeneous equation a +by +c 0 then multiply your choice of y p x) by x or by x if this solution corresponds to a double root of the auxiliary equation). We ll now demonstrate with a series of examples. Example.1. Solve the equation + 3 y + 4x + 1. We first find the y c x), i.e. the general solution of the corresponding homogeneous O.D.E. + 3 y + 0.
4 MATHEMATICS FOR ENGINEERS & SCIENTISTS This has auxiliary equation λ + 3λ + = 0, i.e. λ + )λ + 1) = 0, so the is y c = Ae x + Be x. We now look for a particular solution; the table suggests trying y p = c x + c 1 x + c 0 for some constants c 0, c 1 and c to be determined. Now so y p = c x + c 1 and p = c p + 3y p + y p = c + 3 c 1 + c x) + c 0 + c 1 x + c x ) = c x + 6c + c 1 )x + c + 3c 1 + c 0 ) = 4x + 1. This is an identity between polynomials so we can compare the coefficients: coefficients of x : c = 4 so c = coefficients of x: 6c + c 1 = 0 so c 1 = 6 constant coefficients: c + 3c 1 + c 0 = 1 so c 0 = 15/ Hence the general solution of the O.D.E is y c + y p, i.e. Ae x + Be {{ x + x 6x + 15 {{ particular solution Note that there are two arbitrary constants, as expected. Example.13. Solve + y + 3 6 cos 3x given that y0) = 1, y 0) = 1. The corresponding homogeneous O.D.E. + y + 3 0 has auxiliary equation λ + λ + 3 = 0 which has roots ± 4 1 = 1 ± i so the is y c = e x A cos x + B sin ) x. The method says that we should try for a particular solution of the form Then y p = C cos 3x + D sin 3x. y p = 3C sin 3x + 3D cos 3x and p = 9C cos 3x 9D sin 3x. Substituting into the O.D.E. gives p + y p + 3y p = 9C cos 3x 9D sin 3x + 3C sin 3x + 3D cos 3x) + 3C cos 3x + D sin 3x) = 6D 3C) cos 3x + 6D 6C) sin 3x = 6 cos 3x. We can now compare the coefficients of cos 3x and sin 3x to get coeffs of cos 3x: 6C + 6D = 6 coeffs of sin 3x: 6C 6D = 0 So D = 1, C = 1 and the general solution y c + y p is e x A cos x + B sin ) x 1 {{ cos 3x + 1 sin 3x. {{ particular integral
MATHEMATICS FOR ENGINEERS & SCIENTISTS 5 In this example, we also have some initial conditions; we use these to find A and B. Now Also, y = e x A cos x + B sin ) x y0) = A 1 = 1 so A = 1. + e x A sin x + B cos ) x and + 3 sin 3x + 3 cos 3x y 0) = A + B + 3 = 1 so B = 1. The required solution is thus e x cos x sin ) x 1 cos 3x + 1 sin 3x. Remark.14. When there are initial conditions as in this last example, it is important to get the steps in the right order. To solve a + by + c rx) the general procedure is 1) Find the y c x) i.e. the general solution of corresponding homogeneous linear O.D.E. this involves constants A, B). ) Find a particular solution y p x) this has no arbitrary constants). 3) Find the general solution by adding y c x) to y p x). 4) Find A and B using the initial conditions if required). Do not do step 4) straight after step 1). The initial conditions apply to the inhomogeneous equation, not the corresponding homogeneous one. Example.15. Solve 3 y e x given that y0) = 0, y 0) = 1. The corresponding homogeneous equation 3 y 0 has auxiliary equation 3λ λ 1 = 0 i.e. 3λ + 1)λ 1) = 0 which has roots λ = 1 3, 1. Hence the is yx) = Ae x/3 + Be x. Normally we should look for a particular solution the form y p x) = ce x but here e x is already a solution of the homogeneous equation it is y c x) with A = 0, B = 1). Thus we use the modification rule and try y p x) = cxe x instead. In that case, y p = ce x + cxe x and p = ce x + cxe x so substituting into the O.D.E. gives Hence c = 1 4 3 p y p y p = 3ce x + cxe x ) ce x + cxe x ) cxe x = 4ce x = e x. Ae x/3 + Be {{ x 1 + 4 xex. {{ particular integral Now we use the initial conditions to find A and B. Firstly, y0) = A + B = 0.
6 MATHEMATICS FOR ENGINEERS & SCIENTISTS Also, so y = A 3 e x/3 + Be x + 1 4 ex + 1 4 xex y 0) = A 3 + B + 1 4 = 1. Solving these two equations gives A = 9 16, B = 9 16 and the required solution is 9 16 e x/3 + 9 16 ex + 1 4 xex. Example.16. Solve + y + e x. The corresponding homogeneous equation + y + 0 has auxiliary equation λ + λ + 1 = 0 i.e. λ + 1) = 0 which has equal roots λ = 1, 1. The is thus y c x) = A + Bx)e x. Normally we should look for a particular solution of the form y p x) = ce x but here e x is a solution of the homogeneous equation it s y c x) with A = 1, B = 0), and so is xe x it s y c x) with A = 0, B = 1). So the modification rule says we should look for a particular solution of the form Then y p x) = cx e x. y p = cxe x cx e x and p = ce x cxe x cxe x + cx e x Substituting into the O.D.E. gives So c = 1 = ce x 4cxe x + cx e x p + y p + y p = ce x 4cxe x + cx e x ) + cxe x cx e x) + cx e x = ce x = e x A + Bx)e x 1 + {{ x e x. {{ particular integral Everything we have done applies similarly to linear constant coefficient O.D.E.s of higher order, as we ll now demonstrate. Example.17. Solve subject to the initial conditions y 4) x y0) = 3, y 0) = 1, 0) = 1, 0) = 4. [Notice this 4 th order equation has 4 initial conditions.] The auxiliary equation of the corresponding homogeneous O.D.E. is λ 4 1 = 0. This has roots ±1, ±i so the is Now look for a particular solution of the form y c x) = Ae x + Be x + C cos x + D sin x. y p x) = k 0 + k 1 x. Substituting gives y p y p = k 0 k 1 x = x and so k 0 = 0, k 1 = 1. Thus the general solution is yx) = Ae x + Be x + C cos x + D sin x x.
MATHEMATICS FOR ENGINEERS & SCIENTISTS 7 We also have y x) = Ae x Be x C sin x + D cos x 1 x) = Ae x + Be x C cos x D sin x x) = Ae x Be x + C sin x D cos x and so the applying the initial conditions leads to simultaneous equations A + B + C = 3 A B + D = A + B C = 1 A B D = 4 In the next chapter we will see a methodical way of solving sets of equations like these. however, we ll just use ad hoc reasoning: Adding the first and third equations and dividing by gives A + B = 1. Adding the second and fourth equations and dividing by gives A B = 3. Hence A =, B = 1 and we also find C =, D = 1. For now, Thus the required solution is yx) = e x e x + cos x sin x x. Example.18. Solve d 4 y dx 4 d y dx + e3x. The auxiliary equation of the corresponding homogeneous O.D.E. is λ 4 λ + 1 = 0 λ 1 ) = 0 λ 1) λ + 1) = 0 The roots of this are 1, 1, 1, 1, both being repeated roots. So the is y c x) = A + Bx)e x + C + Dx)e x. Now look for a PI of the form y p x) = ke 3x. Then p p + y p = 81ke 3x 18ke 3x + ke 3x = 64ke 3x = e 3x Thus k = 1 64 yx) = A + Bx)e x + C + Dx)e x + 1 64 e3x.