PART V : SECOND ORDER LINEAR ORDINARY DIFFERENTIAL EQUATIONS 5.1 INTRODUCTION Second order linear O D E ’s have the general form : d2 y dy a(x) 2 + b(x) + c(x) y = f (x) , dx dx where the coefficients a(x) , b(x) , c(x) and the inhomogeneous or ” forcing ” term f (x) 5.2 are all given functions of SPECIAL CASE : (53) x. c(x) = 0 d2 y dy ie a(x) 2 + b(x) = f (x) , (54) dx dx As this second order ODE does not contain y but only its derivatives , it is a first order equation in the function dy . dx dy = p(x) , say , then dx If we put d2 y dp = dx2 dx and (54) becomes : dp a(x) + b(x) p = f (x) , dx We can now solve (55) for p(x) , by using an integrating factor , and then integrate p(x) to obtain a solution of (54). Note that this is the general solution of it contains two arbitrary constants, from integrating (55) Example 34 Find the solution of which satisfies the conditions (i) x (ii) dy = 0 at x = 0 ; dx y=1 , (54) as and then integrating p(x) . dy d2 y + =x 2 dx dx y=1 , (55) dy = 0 at x = 1. dx 5.3 : EQUATIONS WITH CONSTANT COEFFICIENTS We here consider a d2 y dy +b + c y = f (x) , dx2 dx (56) where a , b , c are constants. We first take f (x) = 0 , so a dy d2 y +b + cy = 0 , 2 dx dx This equation is said to be homogeneous in λ is a constant , leaves Equation 5.31 : y d2 y dx2 ie replacing y by λy , where (57) unchanged. (56) is said to be inhomogeneous in y THE GENERAL SOLUTION OF (57) As the coefficients are constant , a solution of and (57) or just inhomogeneous. (57) must be such that all have the same dependence on x y(x) , dy dx . The only function whose derivative is proportional to itself is the exponential function . We therefore look for a solution of (57) in the form where A Hence , and λ y(x) = A eλ x , are constants to be determined . dy = A λ eλ x dx and d2 y = A λ 2 eλ x . dx2 Substitution in (57) gives : A eλ x ( a λ2 + b λ + c ) ≡ 0. so ∴ a λ2 + b λ + c = 0 . This is called the auxiliary equation of the O D E (57). (58) In general , this quadratic equation has two distinct roots , Note that λ 1 + λ2 = − b a It follows from (58) that both and e λ1 x λ 1 λ2 = and e λ2 x λ1 and λ2 say , where c . a are solutions of (57). What is the general solution of (I) repeated (I) REPEATED ROOTS OF THE AUXILIARY EQUATION Let 2 λ = or (II) (57) if the roots of the auxiliary equation are either λ = λ 1 = λ2 c . a complex ? be the repeated root of It follows that eλ x (58) . So, is a solution of 2λ = − b a and (57) but what is the other ? To find a second solution , we make use of the solution that we know : We look for a solution of (57) in the form : y(x) = eλ x u(x) where u(x) is to be determined . du dy = λ eλ x u + eλ x dx dx From (60) : du d2 u d2 y 2 = λ eλ x u + 2 λ eλ x + eλ x 2 . 2 dx dx dx and Substitution in ie (60) (57) gives : e λx On substituting for λ , d2 u du 2 a 2 + ( 2λa +b) + (aλ + bλ + c)u = 0 dx dx this reduces to d2 u = 0. dx2 y(x) = ( c1 + c2 x ) eλ x and so − the general solution of (57) when the roots of the auxiliary equation are repeated. Note that the second solution has the form Examples 36 : (i) (II) x ( First Solution ) . Find the general solution of y 00 + 2 y 0 + y = 0 , (ii) 9 y 00 − 12 y 0 + 4 y = 0. COMPLEX ROOTS OF THE AUXILIARY EQUATION λ1 = λ∗2 = α + i β , say , where Here The general solution of (57) is formally α = − ∴ where k1 and k2 and β = ( 4 a c − b2 )1/2 . 2a y(x) = c1 e( α + i β ) x + c2 e( α − i β ) x y(x) = eα x ( c1 e i β ie b 2a x + c2 e − i β x ) y(x) = eα x ( k1 cos βx + k2 sin βx ) (61) are real constants. NOTE : (i) In (61) , α = Re ( λ ) and β = Im ( λ ) , where λ is a complex root of (58). (ii) ie If we take k1 = A sin γ replace the constants k1 and and k2 oscillations with amplitude Examples 37 : 5.32 : Let Y (x) by the constants A and γ , y(x) = A eα x sin( βx + γ ) , (61) reduces to - k2 = A cos γ , A eα x , period 2π β and phase γ . Find the general solution of THE GENERAL SOLUTION OF denote any solution of (56). (56) ie a d2 Y dY +b + c Y = f (x) . 2 dx dx Such a solution is called a Particular Integral of (56) - it contains no arbitrary constants. y(x) = y(x) + Y (x) Now consider (i) (62) is a solution of is a solution of (ii) (56) as y(x) is a solution of (62) (57) and Y (x) (56) ; (62) contains two arbitrary constants , within y(x) , and so is the general solution of a second order O D E ; (iii) of (56) is a second order O D E so it follows that (56) . (62) is the general solution So, the general solution of (56) ie GS =CF + PI We can always find the general solution of equation (57) . How can we find a P I of (56) for a given f (x) ? ADDENDUM III To find the general solution of the differential equation : a d2 y dy +b + c y = a f (x) , dx2 dx where a , b , c are constants and f (x) is a given function of (1) x , we first consider the corresponding homogeneous equation : a dy d2 y +b + cy = 0 , 2 dx dx If the auxiliary equation of (2) has roots λ1 c = λ 1 λ2 a and λ2 (2) then b = − λ 1 − λ2 a and so (2) may be written as : d2 y dy − ( λ 1 + λ2 ) + λ 1 λ2 y = 0 , 2 dx dx Differentiation may be considered as an operation carried out on y(x) in dy . dx (3) which results We can therefore consider a differential equation as a differential operator acting on y(x). So , (3) may be written as d2 d − ( λ 1 + λ2 ) + λ 1 λ2 dx2 dx y=0 , and the differential operator may be factorised to give d − λ1 dx If we introduce a new function then (4) y=0 , z(x) such that d − λ2 dx (4) y = z. can be replaced by two first order O D E ’s : dz − λ1 z = 0 dx and We can find the general solution of (5i) (5i) and (5ii) by separation of variables. dy − λ 2 y = k 1 e λ1 x . dx (5ii) therefore becomes This equation has an integrating factor On integrating and dividing by and k3 dy − λ2 y = z . dx z(x) = k1 eλ1 x . We find that where k2 d − λ2 dx e − λ2 x e − λ2 x and so may be written as , we obtain the general solution of (3) : are arbitrary constants , provided that λ1 6= λ2 . SPECIAL CASE : λ1 = λ2 , = λ , say . Now, having applied the integrating factor to (5ii) , we find that is the general solution of (3) when the auxiliary equation has repeated roots. Note : When the roots of the auxiliary equation are repeated , the second solution has the form x ( First solution ). THE GENERAL SOLUTION OF THE INHOMOGENEOUS EQUATION With f (x) 6= 0 , (4) becomes d − λ1 dx dz − λ1 z = f (x) dx and d − λ2 dx y = f (x) , (6) and equations (5) become Using the integrating factor in Hence , dy − λ2 y = z . dx (7i) , we find that z(x) = e λ1 x Z f (x) e− λ1 x dx + k4 e λ1 x (7i) and (7ii) dy − λ2 y = e λ1 x F (x) + k4 e λ1 x . dx ∴ From (7ii) : Using an integrating factor again : provided λ1 6= λ2 d ( e− λ2 x y ) = e( λ1 −λ2 ) x F (x) + k4 e (λ1 −λ2 ) x dx . So, the general solution of the inhomogeneous equation (6) , for where the first term is a P I of (6) as it contains f (x) λ1 6= λ2 , is ( and no arbitrary constants ) and the last two terms , which contain two arbitrary constants , form the general solution of the corresponding homogeneous equation ie the C F of (6) . VERY SPECIAL CASE : λ1 = λ2 , = λ , say , and f (x) = eλx Integrating (7i) , we now get : and so z(x) = x e λ x + k6 e λ x ∴ Using the integrating factor in (7ii) , we find that : ie F (x) = x . ∴ The general solution of the equation : is ie y(x) = a P I of 1 2 λx 1 + k6 x eλ x + k7 eλ x = ( x2 + k6 x + k7 ) eλ x , x e 2 2 2 y 00 − 2 λ y 0 + λ y = eλx Note : it follows that , if λ , then a P I is f (x) = xn eλx is 1 2 λx x e . 2 and the auxiliary equation has repeated roots xn+2 eλx . (n + 1)(n + 2) How can we find P I ’s other than from the general expression given above ? We use 5.33 : THE METHOD OF UNDETERMINED COEFFICIENTS. This method involves guessing , from f (x) , the form of a particular integral , containing a number of unspecified constants ( undetermined coefficients ). This guess is then substituted in the O D E and the constants chosen to make it satisfy the equation ie to make it a Particular Integral . The method is applied as follows : (A) f (x) = a polynomial of degree n : We look for a P I in the form of a polynomial of degree n with unknown coefficients. Example 38 : Find the general solution of the differential equation f (x) = ( a polynomial of degree n ) eα x (B) We look for a P I in the form h(x) eα x , where : h (x) is a polynomial of degree n with unknown coefficients. Example 39 : (C) f (x) = a cos x + b sin x Example 40 : NOTE : is Find a P I of the equation : : we look for a P I in the form Find a P I of the equation : A P I of y 00 + y 0 − 2y = x2 ex . A cos x + B sin x. y 00 + y 0 − 2y = 3 cos x y 00 + y 0 − 2y = 1 + 2x + x2 + x2 ex + 3 cos x ( P I )38 + ( P I )40 + (P I )12 . 5.34 THE METHOD OF UNDETERMINED COEFFICIENTS : SPECIAL CASES : (D) If λ = α , ie eαx occurs in the C F , and αx (i) f (x) = a e , we look for a P I in the form (ii) f (x) = a x eαx , (iii) f (x) = a x2 eαx , we look for a P I in the form we look for a P I in the form A x eαx ; ( A1 x + A2 x2 ) eαx ; ( A1 x + A2 x2 + A3 x3 ) eαx ... (E) If λ = α is a repeated root , ie (i) f (x) = a eαx both eαx and x eαx B x2 eαx ; , we look for a P I in the form (ii) f (x) = a x eαx , we look for a P I in the form If λ = ± i β (F ) If B x3 eαx λ = α ± iβ , we look for a P I in the form (i) (iii) ... x ( A sin βx + B cos βx ). , ie eα x sin β x and eα x cos β x both occur in the C F , and f (x) = a eα x sin βx + b eα x cos βx , we look for a P I in the form Examples 41 : , , ie sin β x and cos β x both occur in the C F , and f (x) = a sin βx + b cos βx (G) occur in the C F , and x eα x ( A sin βx + B cos βx ). Find P I ’s for the following equations : y 00 − 3 y 0 + 2 y = 5 e2x , y 00 + 4 y = 5 sin 2 x + 3 cos 2x, (ii) (iv) y 00 + 2 y 0 + y = x2 e−x , y 00 + 4 y 0 + 5 y = e−2 x sin x .