ADVANCED HIGHER MATHEMATICS DIFFERENTIAL EQUATIONS A differential equation is an equation involving one or more derivatives. Examples (1) (2) ( x 2 1) dy 2 xy x is a first-order differential equation, as the equation dx contains a first derivative only. d2y dy 5 4 y 0 is a second-order differential equation, as the 2 dx dx equation contains a second derivative. VERIFICATION OF SOLUTIONS OF DIFFERENTIAL EQUATIONS Given a function y f (x) , you can verify that the function satisfies a particular differential equation. Worked Example Verify that the function y Ae 5 x Be 2 x , where A and B are constants, satisfies the differential equation d2y dy 3 10 y 0 . 2 dx dx Solution y Ae 5 x Be 2 x dy 5 Ae 5 x 2 Be 2 x dx d2y 25 Ae 5 x 4 Be 2 x 2 dx d2y dy 3 10 y 2 dx dx 5x 25 Ae 4 Be 2 x 3(5 Ae 5 x 2Be 2 x ) 10( Ae 5 x Be 2 x ) 25 Ae 5 x 4 Be 2 x 15 Ae 5 x 6 Be 2 x 10 Ae 5 x 10 Be 2 x 0 Hence y Ae 5x Be 2 x d2y dy 3 10 y 0 . satisfies the differential equation 2 dx dx YOU CAN NOW ATTEMPT THE WORKSHEET "VERIFICATION OF SOLUTIONS OF DIFFERENTIAL EQUATIONS." GENERAL SOLUTIONS OF DIFFERENTIAL EQUATIONS Given a function y f (x) , it is usually straightforward to verify that y satisfies a particular differential equation. For example, we have already verified that the function y Ae 5 x Be 2 x , where A and B are constants, satisfies the differential equation d2y dy 3 10 y 0 . 2 dx dx Given a differential equation on its own, however, it is not so straightforward to find the general form of the function y which satisfies the differential equation. For d2y dy 3 10 y 0 , how do we solve this example, given the differential equation 2 dx dx 5x 2 x differential equation to find that y Ae Be is the general solution of the differential equation. FIRST-ORDER DIFFERENTIAL EQUATIONS WITH VARIABLES SEPARABLE One approach which can sometimes be used to solve first-order differential equations is to separate the variables in the differential equation. If a first-order differential equation can be written in the form f ( y )dy g ( x)dx , where f ( y ) is a function of y only and g (x ) is a function of x only, we say that we have separated the variables x and y. The general solution of the differential equation is then found be integrating each sides with respect to the appropriate variable, i.e. f ( y)dy g ( x)dx . The following examples illustrate this. Worked Example 1 Find the general solution of the differential equation dy x 2 . dx y Solution dy x 2 dx y ydy x 2 dx The variables have been separated. ydy x 2 dx 1 2 1 3 y x C 2 3 2 3y 2x 3 C [ 6 ] NOTES (1) When solving differential equations, it is convenient for C to always denote the "total" constant so far in each line of working, although strictly speaking a different letter should be used for each new constant. (2) It is not always necessary, or convenient, to express the general solution for y explicitly in terms of x; that is, in the form y f (x) . Often it is more convenient, as in the above example, to express y implicitly in terms of x, for example in the form y 2 f ( x) or sin y f ( x) . Of course, the explicit solution must be given if requested. Worked Example 2 Find the general solution of the differential equation e4y dy x 2. dx e4y Solution e4y dy x2 dx dy x2 dx e 4 y dy ( x 2)dx The variables have been separated. e 4y dy ( x 2)dx 1 4y 1 2 e x 2x C 4 2 e 4 y 2 x 2 8x C [ 4 ] [If it is required to express y explicitly in terms of x, this can be done as follows: e 4 y 2 x 2 8 x C [ln] 4 y ln( 2 x 2 8x C ) 1 y ln( 2 x 2 8 x C ) ] 4 Worked Example 3 Find the general solution of the differential equation dy 2 . dx sin y Solution dy 2 dx sin y sin ydy 2dx The variables have been separated. sin ydy 2dx cos y 2 x C cos y 2 x C cos y C 2 x [ (1) ] Worked Example 4 Find the general solution of the differential equation dy 2x 9 y 2 . dx Solution dy 2x 9 y 2 dx dy 2 x 9 y 2 dx 1 9 y2 dy 2 xdx The variables have been separated. 1 9 y2 dy 2 xdx y sin 1 x 2 C 3 y sin( x 2 C ) 3 y 3 sin( x 2 C ) [sin] YOU CAN NOW ATTEMPT THE WORKSHEET "DIFFERENTIAL EQUATIONS 1." In some cases the properties listed below of the logarithmic and exponential functions can be used to simplify general solutions of differential equations. (1) e a b e a e b (2) ln a ln b ln( ab) (3) a ln a ln b ln b (4) n ln a ln( a n ) Worked Example 5 Find the general solution of the differential equation dy 4y . dx Solution dy 4y dx dy 4 ydx 1 dy 4dx y The variables have been separated. 1 y dy 4dx ln y 4 x C ye [e^] 4 x C y e 4x eC y Ae 4 x [where A e C ] Worked Example 6 Find the general solution of the differential equation dy y 2 . dx x 1 Solution dy y 2 dx x 1 ( x 1)dy ( y 2)dx 1 1 dy dx y2 x 1 The variables have been separated. 1 1 y 2 dy x 1 dx ln( y 2) ln( x 1) C y 2 ( x 1) e y 2 A( x 1) y A( x 1) 2 [e^] C [where A e C ] Worked Example 7 Find the general solution of the differential equation dy y . dx 2 x 1 Solution dy y dx 2 x 1 (2 x 1)dy ydx 1 1 dy dx y 2x 1 The variables have been separated. 1 1 y dy 2 x 1 dx ln y 1 ln( 2 x 1) C 2 1 2 ln y ln( 2 x 1) C ln y ln 2 x 1 C y 2x 1 e y A 2x 1 [e^] C [where A e C ] 1 ln( 2 x 1) should be written as ln 2 x 1 before taking the exponential 2 of both sides of the equation. Note that YOU CAN NOW ATTEMPT QUESTION 1 OF THE WORKSHEET "DIFFERENTIAL EQUATIONS 2." Worked Example 8 2x 3 in partial fractions. x( x 1) (a) Express (b) Hence find the general solution of the differential equation x( x 1) dy y (2 x 3) , dx expressing y explicitly in terms of x. Solution (a) 2x 3 3 1 . x( x 1) x x 1 It can be shown that dy y (2 x 3) dx x( x 1)dy y (2 x 3)dx 1 2x 3 dy dx y x( x 1) x( x 1) (b) The variables have been separated. 1 2x 3 1 3 y dy x( x 1) dx 1 y dy x x 1 dx ln y 3 ln x ln( x 1) C ln y ln( x 3 ) ln( x 1) C x3 C ln y ln x 1 3 x C e y x 1 y Ax 3 x 1 [e^] [where A e C ] Worked Example 9 x 1 in partial fractions. x(2 x 1) (a) Express (b) Hence find the general solution of the differential equation dy y ( x 1) , dx x (2 x 1) expressing y explicitly in terms of x. Solution (a) x 1 1 1 . x(2 x 1) x 2 x 1 It can be shown that (b) dy y ( x 1) dx x (2 x 1) x(2 x 1)dy y ( x 1)dx 1 x 1 dy dx y x(2 x 1) The variables have been separated. x 1 1 y dy x(2 x 1) dx 1 1 1 y dy x 2x 1 dx ln y ln x ln y ln x ln( 2 x 1) 2 C ln y ln x ln 2 x 1 C 1 ln( 2 x 1) C 2 1 x C [e^] ln y ln 2x 1 x C e y 2x 1 Ax y [where A e C ] 2x 1 YOU CAN NOW ATTEMPT QUESTIONS 2 TO 18 OF THE WORKSHEET "DIFFERENTIAL EQUATION 2." PARTICULAR SOLUTIONS OF DIFFERENTIAL EQUATIONS Worked Example 1 Find the particular solution of the differential equation y2 dy 4x 2 1, dx given that y 2 when x 1 , expressing y explicitly in terms of x. Solution dy 4x 2 1 dx 2 y dy (4 x 2 1)dx y2 The variables have been separated. y 2 dy (4 x 2 1)dx 1 3 4 3 y x xC 3 3 3 y 4 x 3 3x C y 2 when x 1 Hence y 4 x 3x 1 3 3 [ 3] 2 3 4 13 3 1 C 7 C 8 C 1 y (4 x 3x 1) 3 1 3 Worked Example 2 Find the particular solution of the differential equation dy 2xy 2 , dx given that y 3 when x 2 , expressing y explicitly in terms of x. 10 Solution dy 2xy 2 dx dy 2 xy 2 dx 1 dy 2 xdx y2 The variables have been separated. y y 2 dy 2 xdx y 1 x 2 C 1 x 2 C [ (1) ] y 1 x 2 C y 1 y C x2 3 when x 2 10 Hence y 1 2 x2 3 3 . 2 3x 2 3 1 10 C (2) 2 3 1 10 C 4 3(C 4) 10 3C 12 10 2 C 3 Worked Example 3 Find the particular solution of the differential equation ( x 4) dy 1 y , dx given that y 7 when x 1, expressing y explicitly in terms of x. Solution dy 1 y dx dy ( x 4) y 1 dx ( x 4)dy ( y 1)dx 1 1 dy dx y 1 x4 ( x 4) The variables have been separated. 1 1 y 1 dy x 4 dx ln( y 1) ln( x 4) C y 1 ( x 4) e C y 1 A( x 4) [where A e C ] y A( x 4) 1 y 7 when x 1 Hence y 2( x 4) 1 [e^] 7 A(3) 1 3A 1 7 A2 y 2x 9 Worked Example 4 2 in partial fractions. ( y 1)( y 3) (a) Express (b) Hence find the particular solution of the differential equation 2x given that y dy ( y 1)( y 3) , dx 5 when x 1, expressing y explicitly in terms of x. 3 Solution (a) It can be shown that 2 1 1 . ( y 1)( y 3) y 1 y 3 dy ( y 1)( y 3) dx 2 xdy ( y 1)( y 3)dy 2 1 dy dx ( y 1)( y 3) x 2x (b) The variables have been separated. 2 1 ( y 1)( y 3) dy x dx 1 1 1 y 1 y 3 dy x dx ln( y 1) ln( y 3) ln x C y 1 ln x C [e^] ln y 3 y 1 x eC y3 y 1 Ax [ A e C ] y3 y 1 Ax( y 3) y 1 Axy 3 Ax y Axy 3 Ax 1 y (1 Ax) 3 Ax 1 3 Ax 1 y 1 Ax y 5 when x 1 3 5 3 A(1) 1 3 1 A(1) 5 3A 1 3 1 A 5(1 A) 3(3 A 1) 5 5 A 9 A 3 4A 2 1 A 2 3 x 1 3x 2 Hence y 2 . 1 2x 1 x 2 [Alternatively the value of A can be found by substituting y into the equation y 1 Ax . y3 5 1 3 A(1) 5 3 3 Then y 1 Ax y3 5 and x 1 3 53 A 59 2 A 4 1 A 2 y 1 1 x y3 2 y 1 x y3 2 2( y 1) x( y 3) 2 y 2 xy 3x 2 y xy 3x 2 y ( 2 x) 3 x 2 3x 2 y ] 2x YOU CAN NOW ATTEMPT THE WORKSHEET "PARTICULAR SOLUTIONS OF DIFFERENTIAL EQUATIONS." DIFFERENTIAL EQUATIONS AS MATHEMATICAL MODELS Worked Example 1 The number of strands of bacteria, x, present in a culture after t days of growth is assumed to be increasing at a rate proportional to the number of strands present. (a) Write down a differential equation which represents this and find the general solution for x in terms of t. (b) Given that there are 326 strands initially present and that the number of strands observed after 4 days is 1833, estimate the number of strands likely to be present after one week. Solution (a) The rate of growth of the bacteria is dx and the number of strands present is dt x. Hence dx is proportional to x dt dx kx dt dx kxdt 1 dx kdt x dx kx , dt The variables have been separated. 1 x dx kdt (b) ln x kt C x e kt C x e kt e C x Ae kt [e^] When t 0 , x 326 326 Ae k 0 Ae 0 326 A 326 When t 4 , x 1833 1833 Ae k 4 326e 4 k 1833 1833 e 4k [ln] 326 1833 4k ln 326 where k is a constant. k 1 1833 ln 0 4317 4 326 Hence x 326e 04317t . When t 7 : x 326e 043177 326e 30219 6693 About 6693 strands are likely to be present after one week. Worked Example 2 According to Newton's law of cooling, the rate at which an object cools is proportional to the difference in temperature between the object and the surrounding medium. When an object cools surrounded by air at a temperature of 75 oC, the cooling of the object is governed by a differential equation of the form dT k (T 75) , dt where T oC is the temperature of the object after t hours of cooling and k is a constant. (a) Find the general solution of this differential equation, expressing T as a function of t. (b) Given that a certain object cools from 125 oC to 100 oC in half an hour when surrounded by air at a temperature of 75 oC, find: (i) (ii) the temperature of this object at the end of another half-hour the time taken for the temperature of this object to fall to 80 oC. Solution (a) dT k (T 75) dt dT k (T 75)dt 1 dT kdt T 75 The variables have been separated. 1 T 75 dT kdt (b) ln( T 75) kt C T T T T When t 0 , T 125 When t 1 , T 100 2 [e^] 75 e kt C 75 e kt e C 75 Ae kt [where A e C ] 75 Ae kt 125 75 Ae k 0 75 Ae 0 125 75 A 125 A 50 100 75 Ae Ae 1 k 2 50e 1 k 2 25 25 k 1 2 1 k 2 e 1 2 [ln] 1 1 k ln 2 2 1 k 2 ln 1 3863 2 Hence T 75 50e 13863t . (i) When t 1: T 75 50e 138631 75 50e 13863 87 5 The temperature of the object if 875 oC at the end of another half hour. (ii) When T 80 : 80 75 50e 13863t 50e 13863t 5 1 e 13863t [ln] 10 1 1 3863t ln 10 1 ln 10 t 1 66 1 3863 It will take 166 hours for the temperature of the object to fall to 80 oC. Worked Example 3 When a valve is opened, the rate at which the water drains from a pool is proportional to the square root of the depth of the water. This can be represented by the differential equation dh k h , dt where h metres is the depth of the water t minutes after the valve was opened and k is a positive constant. (a) Find the general solution of the differential equation. (You need not express h explicitly as a function of t.) (b) Given that the pool was initially 9 metres deep and that the depth of water was 4 metres after 20 minutes of draining, how long did it take to drain the pool completely? Solution (a) dh k h dt dh k hdt 1 dh kdt h The variables have been separated. 1 1 h 2 dh kdt (b) 2h 2 kt C 2 h C kt When t 0 , h 9 2 9 C k 0 C 6 When t 20 , h 4 2 4 C k 20 6 20k 4 20k 2 1 k 10 Hence 2 h 6 1 t t , i.e. 2 h 6 . 10 10 2 0 6 When h 0 : 06 t 6 10 t 60 t 10 t 10 It takes 60 minutes (i.e. 1 hour) to drain the pool completely. Worked Example 4 In a chemical reaction, two substances X and Y combine to form a third substance Z. Let Q denote the number of grams of Z formed t minutes after the reaction begins. The rate at which Q varies is represented by the differential equation dQ (20 Q)(10 Q) . dt 400 400 in partial fractions. (20 Q )(10 Q ) (a) Express (b) Given that Q 0 when t 0 , find the general solution of the differential equation, expressing Q explicitly as a function of t. (c) Find: (i) (ii) (d) the number of grams of Z formed one hour after the reaction begins the time taken to form 5 grams of Z. Find the limiting value of Q as t . Solution 400 40 40 , (20 Q)(10 Q) 20 Q 10 Q (a) It can be shown that (b) dQ (20 Q)(10 Q) dt 400 400dQ (20 Q)(10 Q)dt 400 dQ dt (20 Q)(10 Q) The variables have been separated. 400 (20 Q)(10 Q) dQ dt 40 40 20 Q 10 Q dQ dt 40 ln( 20 Q) 40 ln( 10 Q) t C 40 ln( 20 Q) 40 ln( 10 Q) t C 40ln( 20 Q) ln( 10 Q) t C 20 Q t C 40 ln 10 Q 20 Q t ln C 10 Q 40 t C 20 Q e 40 10 Q 20 Q e 40 e C 10 Q 20 Q Ae 40 10 Q [e^] t t [where A e C ] 20 0 Ae 0 10 0 A2 Q 0 when t 0 20 Q 2e 40 Hence 10 Q t t 40 20 Q 2e (10 Q) 20 Q 20e 2Qe t 40 t 40 2Qe t 40 t Q 20e 40 20 t t Q 2e 40 1 20 e 40 1 t 20 e 40 1 Q t 2e 40 1 (c) (i) When t 60 : Q 60 20 e 40 1 60 2e 40 1 20(e15 1) 8 74 2e15 1 874 grams of Z are formed on hour after the reaction begins. 5 (ii) When Q 5 : t 20 e 40 1 t 40 1 t 1 20 e 40 1 2e 5 2e 10e 40 5 20e 40 20 t t 40 t 10e t 40 15 t 40 e 1 5 [ln] t ln 1 5 40 t 40 ln 1 5 16 2 It takes 162 minutes to form 5 grams of Z. (d) Q 40t 20 e 1 t 2e 40 1 As t , both the numerator and denominator of the above expression will t tend to infinity (since e 40 ) and the limiting value of Q cannot be found using this expression. An alternative expression for Q must therefore be found before investigating the limiting value. t Dividing all terms in the above expression by e 40 : 1 201 t e 40 Q 1 2 t t 40 201 e 2e t 40 e 40 Now as t , e t 40 0 and Q 20(1 0) 10 . 20 Hence the limiting value of Q as t is 10. YOU CAN NOW ATTEMPT THE WORKSHEET "DIFFERENTIAL EQUATIONS AS MATHEMATICAL MODELS."