MATH 251: DIFFERENTIAL EQUATIONS M. A. BOATENG, PhD., MIMA March 3, 2022 TABLE OF CONTENT Definition Classification Solution to a Differential Equation Methods of Solving Differential Equations M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 2 / 40 DEFINITION A differential equation is an equation with an unknown function and one or more of its derivative. A differential equation is an equation relating some function f to one or more of its derivatives. Example: d 2f df + 2 + f 2 x = sinx 2 dx dx M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS (1) March 3, 2022 3 / 40 CLASSIFICATION Differential equation can be classified by the following: Type: The equation of derivatives are taken with respect to one or several variables. Example dx = yx (ODE ) dy (2) δy δy + = 0(PDE ) (3) δt δx Order: The order of a DE is the order of the highest derivative in that particular equation. M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 4 / 40 Examples. dy 2 d 2 y ) + 2 = sinx (order 2) dx dx 3 d x + x ll + tx 2 = yx (order 3) 3 dy ( M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS (4) (5) March 3, 2022 5 / 40 Linearity: A DE is said to be linear if the following conditions are satisfied; the dependent variable(s) and their derivatives appear linear or in the power of one. There is no product of the dependent variable and any of its derivatives. There is no transcendental function (Trignometric, Logarithmic or exponential) of the dependent variable). M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 6 / 40 Examples d 4x = 0(linear ) dt 4 x ll + tx 2 = t(non − linear ) (6) (7) Homogeneity: if the equation is not equal to a function of the independent variable. Example dy 2 d 2 y + 2 = 0(homogeneous) dx dx d 3x + x ll = sinx (non − homogeneous) 3 dy M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 (8) (9) 7 / 40 Degree: The degree is the exponent of the highest derivative. Example dy dx M. A. BOATENG, PhD., MIMA !2 + d 2y = sinx (degree1) dx 2 MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 (10) 8 / 40 SOLUTION TO A DIFFERENTIAL EQUATION A function that satisfies the given differential equation is called its solution. The solution that contains as many arbitrary constants as the order of the differential equation is called a general solution. The solution free from arbitrary constants is called a particular solution. M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 9 / 40 Examples −3 Show that y (x ) = x 2 is a solution to the differential equation 4x 2 y ′′ + 12xy ′ + 3y = 0 for x > 0 solution −5 2 y ′ = −3 2 x −7 2 y ′′ = 15 4x substituting this into the question yields −7 −3 −3 −5 2 ) + 12x ( 2 ) + 3(x 2 ) = 0 4x 2 ( 15 x x 4 2 0=0 EXAMPLE Find the DE whose general equation is y = c1 e −2x + c2 e 3x M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 10 / 40 SOLUTION TO A DIFFERENTIAL EQUATION There are two forms of solution to a differential equation. They are: General Solution Particular Solution General Solution A general solution is a function that gives all the possible solutions to a differential equation. M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 11 / 40 Example: Solve the ODE dy dx = −4 Solution R dy = −4dx R y = −4x + c where c is an arbitrary constant. This type of solution is a general solution. M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 12 / 40 Particular Solution A Particular Solution is a solution of a differential equation taken from the General Solution by allocating specific values to the random constants. Example: Solve y ′ = −4, y (0) = 1 from the general solution we have y = −4x + c substituting the condition given yields 1 = 4(0) + c c=1 Hence the particular solution becomes y = −4x + 1 M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 13 / 40 SUBSIDIARY CONDITIONS SUBSIDIARY CONDITION A subsidiary condition helps to find a particular solution to a differential equation. There are two types of subsidiary conditions. Initial conditions Boundary conditions Example: 1 y ′ = −4, y (0) = 1 (Initial condition) ′′ 2 y = −4, y (0) = 1, y ′ (0) = 2 (Initial condition) 3 y ′′ + 2y ′ = e 2 , y (0) = 1, y ′ (1) = 1 (boundary (0,1) condition) M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 14 / 40 NB: Both boundary and initial conditions gives a particular solution. EXAMPLE Given that y = c1 e −x + c2 e 3x is a general solution of the D.E y ′′ − 2y ′ − 3y = 0, y (0) = 3, y ′ (0) = 4. Find the particular solution. M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 15 / 40 SOLUTION y = c1 e −x + c2 e 3x 3 = c1 + c2 y ′ = −c1 e −x + 3c2 e 3x 4 = −c1 + 3c2 Solving simultaneously yields c1 = 54 and c2 = 74 Hence the particular solution becomes y = 54 e −x + 74 e 3x M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 16 / 40 SOLUTIONS TO FIRST ORDER ODEs First order ODEs are in the form F (x , y , y ′ ) = 0 There two forms ODEs. They are Standard Form y ′ = f (x , y ) dy dx = f (x , y ) Differential form. M(x,y)dx+N(x,y)dy=0 (x + y )dx + y 2 dy = 0 M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 17 / 40 METHODS OF SOLVING ODEs Separation of variables Homogeneous Method Integrating factor Exactness M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 18 / 40 METHOD OF SEPARATION OF VARIATION M(y ) dy dx = N(x ) M(x , y )dy = N(x , y )dx let M(x,y)=m(x).p(y) N(x,y)=n(x).q(y) m(x).p(y)dx + n(x).q(y)dy=0 m(x ) p(y ) n(x ) q(y ) n(x ) . p(y ) dx + n(x ) . p(y ) dy = 0 =⇒ R m(x ) n(x ) dx + M. A. BOATENG, PhD., MIMA R q(y ) p(y ) dy =c MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 19 / 40 Example Solve the ODE 2 (x + 1) dy dx = x (y + 1) M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 20 / 40 Solution (x + 1)dy = x (y 2 + 1)dx (x + 1)dy = (xy 2 + xdx ) (x + 1)dy − (xy 2 + xdx ) = 0 x 1 x +1 dx − y 2 +1 dy = 0 R x R 1 dx − x +1 y 2 +1 dy = C let u = x + 1 x =u−1 R u+1 R 1 u du − y 2 +1 dy = C R R R udu u1 du − y 21+1 dy = C (x + 1) − ln|x + 1| − tan−1 y = C M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 21 / 40 TRIAL Solve the following ODEs dy x2 1 = dx y (1+x 3 ) 2 3 (1 + x 2 ) − x (1 + 2y )y ′ = 0 2 −4 y ′ = 3x 2y+4x −4 , y (1) = 3 M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 22 / 40 HOMOGENEOUS FUNCTION Definition A function f(x,y) is homogeneous if f (λx , λy )=λn f (x , y ), n = −∞, ., ., .∞ Example: Check if f (x , y ) = x 4 − x 3 y is homogeneous. solution f (λx , λy ) = (λx )4 − (λx )3 (λy ) f (λx , λy ) = λ4 x 4 − λ3 x 3 λy f (λx , λy ) = λ4 x 4 − λ4 x 3 y =⇒ f (λx , λy ) = λ4 (x 4 − x 3 y ) Hence homogeneous. M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 23 / 40 Trials Check for homogeneity in the following function +y f (x , y ) = 2x x 2y 2 y f (x , y ) = e x + tan( yx ) M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 24 / 40 HOMOGENEOUS METHOD In using the homogeneous method, we follow the following rules: Check for homogeneity of the function. Divide through the function by the highest term of the independent variable. Let v = yx M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 25 / 40 EXAMPLES Determine whether the differential equation is homogeneous, hence solve it. (x 2 + y 2 )dx − 2xydy = 0 SOLUTION (x 2 +y 2 ) dy = dx 2xy From the funciton on the right hand side, we could see that, each term is of the power two(2). Hence, the function is homogeneous. Let v = yx dy dv dx = v + x dx dy = vdx + xdv M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 26 / 40 (x 2 + (xv )2 )dx − 2x (xv )(xdv + vdx ) = 0 x 2 dx + x 2 v 2 dx − 2x 3 vdv − 2x 2 v 2 dx = 0 x 2 dx 2x 3 v x 2v 2 − − 2 2 x x x2 = 0 dx − v 2 − 2xvdv = 0 (1−v 2 ) 2xv 2 dx − x dv = 0 1−v R 1 R 2v x dx − 1−v 2 dv = 0 ln |x | = ln |C | − ln |1 − v 2 | C ln |x | = ln 1−v 2 C x = 1−v 2 but v = yx x = 1−(Cy )2 x x= y= x 2C x 2 −y 2 √ x2 − Cx M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 27 / 40 TRIAL 1 2 3 4 2 dy dx 2 +y = x xy 2xdy = (x + y )dx dy y 2 −x 3 dx = yx dy dx = 2x +y x 2y 2 M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 28 / 40 HOMOGENEOUS LINEAR COEFFICIENT FUNCTIONS Given an ODE in the form (a1 x + b1 y + c1 )dx + (a2 x + b2 y + c2 )dy = 0, we say this type of ODE is almost homogeneous. There are two ways of solving the problem. Case 1: When aa21 ̸= bb12 Case 2: When aa21 = bb12 M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 29 / 40 CASE 1 Given an ODE in the form (a1 x + b1 y + c1 )dx + (a2 x + b2 y + c2 )dy = 0 When aa21 ̸= bb12 Set x = X + h, y = Y + k where (a1 X + b1 Y )dx + (a2 X + b2 Y )dy = 0 (a1 h + b1 k + c1 ) = 0 (a2 h + b2 k + c2 ) = 0 Then we solve for h and k. M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 30 / 40 Example Solve the first order ODE (x − 2y + 1)dx + (4x − 3y − 6)dy = 0 Solution a2 b2 4 3 a1 = 1 ̸= b1 = 2 Set x = X + h, y = Y + k h − 2k + 1 = 0 4h − 3k − 6 = 0 Solving this simultaneous h = 3, k = 2 (X − 2Y )dX + (4X − 3Y )dY = 0 M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 31 / 40 dY dX X −2Y = − 4X −3Y = 1−2 YX 3 YX −4 1−2v vdX + xdv = 3v −4 dX 2 3v −2v −1 dX = −Xdv 3v R −4 R 1 −4 − X dX = 3v 23v−2v −1 − ln |X | = 15 ln |3v + 1| − 14 ln |v − 1| + ln |c| 4 −4 ln |X | = 15 ln |3v + 1| − ln|v − 1| + 4 ln |c| 15 ln |X −4 c 4 | = ln | (3vv+1) −1 | X −4 c 4 = X −4 c 4 = X −5 c 4 = (3v +1)15 v −1 (( YX )+1)15 ( YX )−1 ( 3YX+x )15 /(Y M. A. BOATENG, PhD., MIMA − X) MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 32 / 40 15 ) X 10 c 4 = (3YY+X −X X 10 c 4 = (3Y + X )15 (x − 3)10 c 4 Y − X = (3y − 6 + x − 3 − 9)15 (x − 3)10 (y + x − 5)c 4 = (3y + x − 9)15 M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 33 / 40 Trials 1 2 (2x + y − 2)dx + (−x + 2y + 1)dy = 0 (x − 3y )dx + (x + y − 4)dy = 0 M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 34 / 40 case 2 Given an ODE in the form (a1 x + b1 y + c1 )dx + (a2 x + b2 y + c2 )dy = 0 When aa21 = bb12 = K Set z = a1 x + b1 y Example: Solve the ODE (x + 2y + 3)dx + (2x + 4y − 1)dy = 0 M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 35 / 40 Solution a2 b2 2 4 a1 = 1 = b1 = 2 = 2 let z = x + 2y dy dz dx = 1 + 2 dx dz−dx = dy 2 (z + 3)dx + (2z − 1)( dz−dx 2 ) =0 2(z + 3)dx + (2z − 1)(dz − dx ) = 0 (2z + 6)dx + 2zdz − 2zdx − dz + dx = 0 R R 7dx + (2z − 1)dz = 0 7x + z 2 − z = c 7x + (x + 2y )2 − (x + 2y ) = c M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 36 / 40 Trial 1 2 (x + 2y + 1)dx + (2x + 4y + 3)dy = 0 (x − y )dx + (x − y + 2)dy = 0 M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 37 / 40 INTEGRATING FACTOR In order to solve a linear first order differential equation we MUST start with the differential equation in the form dy dt + p(t)y = g(t) where both p(t) and g(t) are continuous functions. We find the solution to such a problem by multiplying a R function called the integrating factor µ(t) = e p(t)dt through the DE. i.e. µ(t) dy dt + µ(t)p(t)y = µ(t)g(t). This reduces to dtd µ(t)y = µ(t)g(t) (A derivative of the product of the integrating factor and the dependent variable). M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 38 / 40 Example Solve the differential equation dy dt − 2y = 4 − t SolutionR µ(t) = e −2dt . µ(t) = e −2t −2t e −2t dy − te −2t dt = 4e e −2t dy = (4e −2t − te −2t )dt R −2t R e dy = (4e −2t − te −2t )dt −2t − 14 e −2t ) + C e −2t y = −2e −2t − ( −t t e −2t e −2t y = −2e −2t + −t − 14 e −2t + C t e y = 2t − 47 + ce 2t M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 39 / 40 Exercise Solve the following IVP differential equations dv dt = 9.8 − 0.196, y (0) = 48 ty ′ + 2y = t 2 − t + 1, y (1) = 21 ty ′ − 2y = t 5 sin(2t) − t 3 + 4t 4 , y (π) = 23 π 4 M. A. BOATENG, PhD., MIMA MATH 251: DIFFERENTIAL EQUATIONS March 3, 2022 40 / 40