Differential equation

5,277 views

Published on

Published in: Technology, Education
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
5,277
On SlideShare
0
From Embeds
0
Number of Embeds
31
Actions
Shares
0
Downloads
218
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Differential equation

  1. 1. B5001- Engineering Mathematics DIFFERENTIAL EQUATION4.1 INTRODUCTION TO DIFFERENTIAL EQUATIONS A differential equation is an equation which relates an unknown function of a single variable with one or more of its derivatives. Example: dy x y cos x 0 dx Independent variable Dependent variable Derivative of y wrt x The order of a differential equation is the highest derivative involved in the equation, and the degree is the power of the highest derivative in the equation. Example : dy 1 x a. is a DE of order 1 and degree 1. dx 1 y2 dy b. x 2 y sin x is a DE of order 1 and degree 1. dx d2y dy c. 4 2y x 2 is a DE of order 2 and degree 1. dx 2 dx dy d. xy xy 2 x is a DE of order 1 and degree 1. dx 2 2 dy e. y 1 x is a DE of order 1 and degree 2 dx 2 d2 y dy f. 2 10y cos 2x is a DE of order 2 and degree 2. dx2 dxSa`adiah Saad JMSK, POLIMAS Page 1
  2. 2. B5001- Engineering Mathematics DIFFERENTIAL EQUATIONExample 1State the dependent variable, the independent variable, the order and degree for eachdifferential equation. ds s dmi. ii. 2mn 0 dt t dn 2 dy 4 x dsiii. iv. t2 sin t 0 dx x3 dt dy dyv. t2 1 yt vi. x xy y2 1 dt dx d2y dy dvvii. x 4 2 xy 0 viii. u3 1 uv2 u dx 2 dx du 2 d2y dy d2y dyix. 3 2y 0 x. x 4 2 xy 0 dx 2 dx dx2 dxAnswer Independent Dependent Variable Order Degree variable i. s t 1 1 ii. m n 1 1 iii. y x 1 2 iv. s t 1 1 v. y t 1 1 vi. y x 1 1 vii. y x 2 1 viii. v u 1 1 ix. y x 2 2 x. y x 2 1Sa`adiah Saad JMSK, POLIMAS Page 2
  3. 3. B5001- Engineering Mathematics DIFFERENTIAL EQUATION4.2 Formation of Differential Equations If y 10x2 A ; Differential Equation is formed when the arbitrary constant A is eliminated from this equation. Example 2 i. If y 10x2 A Differentiate with respect to x, dy 20 x dx dy 20x 0 Differential equation. dx ii. If y x Ax 2 ------ Differentiate with respect to x, gives, dy 1 2 Ax ----- dx y x From , A 2 x y x Subtituting A 2 into  x dy y x Then, 1 2 2 x dx x y x 1 2 x y 1 2 2 x Multiply both sides with x. dy So, x x 2 y 2x dx dy x 2y x dxSa`adiah Saad JMSK, POLIMAS Page 3
  4. 4. B5001- Engineering Mathematics DIFFERENTIAL EQUATIONiii. If y Ax 2 Bx x ----- Differentiate with respect to x, gives, dy 2 Ax B 1 ----- dx dy Differentiate with respect to x. dx d2y 2A ----- dx 2 1 d2y From  , A ----- 2 dx 2 Substituting  into  to get B. dy 1 d2y 2 x B 1 dx 2 dx2 d2y x B 1 dx2 d2y dy B x 1 ----- dx2 dx Then, substitute  and  into . 1 d2y 2 d2y dy y x x 2 1 x x 2 dx2 dx dx 1 2 d2y d2y dy x x2 x x x 2 dx2 dx2 dx 1 2 d2y dy x x 2 dx2 dxSa`adiah Saad JMSK, POLIMAS Page 4
  5. 5. B5001- Engineering Mathematics DIFFERENTIAL EQUATIONEXERCISE 1Form differential equation of the following:i. y x3 Ax 2 iv. y 4Bx Aii. y Ax 2 7x v. y A sin 2 x B kos xiii. y Dx 2 Ex vi. y Ce x 2 De xAnswer dy dyi. x2 3x 4 2( y x3 ) iv x 2 y 7x dx dx dy x2 d 2 y d2yii. y x v. 0 dx 2 dx2 dx2 d2y d2yiii. 4y 0 vi y 0 dx 2 dx 24.3 SOLUTIONS OF FIRST ORDER DIFFERENTIAL EQUATIONS (DE)We already know that DE is one that contains differential coefficient. dyExample: i. 4x - 1st order DE dx d2 y dy ii. 2 2 4y 0 - 2nd order DE dx dxSa`adiah Saad JMSK, POLIMAS Page 5
  6. 6. B5001- Engineering Mathematics DIFFERENTIAL EQUATION dy4.3.1 f(x) - Solve By Direct Integration; i.e. y f(x)dx dx dyExample 3: Find the general solution of the DE 3x 2 sin2x dxAnswer dy cos2x dx (3x 2 sin2x)dx so y = x3 c dx 2 dyExample 4: Find the particular solution of de 5 2x 3 , given the boundary dx 2 conditions y 1 when x = 2 . 5Answer dy dy dy 3 2x 3 2x 5 2x 3 5 3 2x dx dx dx 5 5 5 3 x2 Hence y x c 5 5 Substituting the boundary conditions; 7 3 22 7 6 4 7 6 4 5 (2) c c c= 1 5 5 5 5 5 5 5 5 5 5 3 x2 The particular solution, y x 1 5 5Sa`adiah Saad JMSK, POLIMAS Page 6
  7. 7. B5001- Engineering Mathematics DIFFERENTIAL EQUATION4.3.2 Solve By Variable Separable; dy dy 4.3.2.1 f(y) - rearranged to give dx and then solve by direct dx f(y) dy integration; i.e. dx f(y) dyExample 5: Find the general solution of de 5 sin2 3y . dxAnswer dy dy 5 2 dx dx = 5 sin 3y sin2 3y cot3y x = 5 cosec 2 3y dy = 5[- ] +c 3 5 i.e. x = - cot3y +c 3 dyExample 6: Find the particular solution of de (y 2 1) 3y given that y = 1 when dx x 13 6Answer (y 2 1) 1 y2 1 1 1 dy dx dx = dy dx = (y ) dy 3y 3 y 3 y 1 y2 x= ( - ln y) + c 3 2 Substituting y=1 and x 13 ; 6Sa`adiah Saad JMSK, POLIMAS Page 7
  8. 8. B5001- Engineering Mathematics DIFFERENTIAL EQUATION 13 1 1 13 1 = ( - ln 1) + c c= - =2 6 3 2 6 6 1 2 1 The particular solution is x = y ln y 2 6 3 dy dy 4.3.2.2 f(x)g(y) - rearranged to give f(x)dx and then solve dx g(y) by direct integration dy 2x3 1Example 7: Solve dx 3 2yAnswerSeparating the variables gives: (3 -2y)dy = (2x3 – 1)dx x4 (3 2y)dy (2x 3 1)dx 3y - y 2 = x c 2Example 8: The current in an electric circuit containing resistance R and inductance L di in series with a constant voltage source E is given by the de E L Ri . dt Solve the equation and find i in terms of time t given that when t = 0 and i = 0.Answer di di 1 L E Ri dt dt E-Ri L Let u = E-Ri , du = -Rdi 1 du 1 1 1 - = dt - ln (E - Ri) = t c R u L R LSa`adiah Saad JMSK, POLIMAS Page 8
  9. 9. B5001- Engineering Mathematics DIFFERENTIAL EQUATION When t = 0, i= 0; 1 1 - ln E = c ; c=- ln E R R 1 1 1 - ln (E - Ri) = t ln E R L R 1 1 t = ln E - ln (E - Ri) = R R L Rt Rt Rt E Rt E E-Ri ln ( )= eL e L E-Ri = Ee L E-Ri L E-Ri E Rt E - i = ( 1-e L ) RExample 9: Solve the Des: dy 2x xy dy y(2 3x) a. 2 d. dx y 1 dx x(1 3y) ds s2 6s 9 dy 6t 2 2t 1 b. e. dt t 2 dt cos y ey dy sec h y c. dx 2 x4.3.3 Homogeneneous First Order DEs dyAn equation of the form P = Q , where P and Q are function of both x and y of the dxsame degree – said to be homogenous in y and x.Example;Sa`adiah Saad JMSK, POLIMAS Page 9
  10. 10. B5001- Engineering Mathematics DIFFERENTIAL EQUATION f(x,y) Homogeneous degree 1 x2 + 3xy + y2 yes 2 x 3y 2 yes 1 2x y 4 x 2 3y 2 3 yes 2 2 xy x2 y y–1 4 no 2 x2 y2 x-2 dyProcedure to solve DE of the form P =Q dx dy dy Q i. Rearrange P = Q into the form = dx dx P dy dv ii. Make the substitution y =vx, from = v (1) + x , by the product rule. dx dx dy dy Q Substitute for both y and in the equation = . Simplify, by iii. dx dx P cancelling, and on equation result in which the variables are separable. iv. Separate the variable and solve as direct integrating. y v. Substitute v = to solve in terms of the original variables. x dyExample 10: Solve the DE y - x = x , given x = 1 when y = 2. dxAnswer dy y - x i. Rearranging; = dx x dy dv ii. Let y = vx, =v+x dx dx dy dv v x - x iii. Substitute for both y and gives: v + x = dx dx xSa`adiah Saad JMSK, POLIMAS Page 10
  11. 11. B5001- Engineering Mathematics DIFFERENTIAL EQUATION dv x(v - 1) dv v+x = x v-1-v dx x dx dv dx x -1 dv=- v = - ln x +c dx x y = - ln x +c Subtitute x =1 and y = 2 x 2 c c=2 1 y = - ln x + 2 or y = - x ( ln x - 2 ) x dy x2 y2Example 11: Find the particular solution of DE; x given the boundary dx y conditions that y = 4 when x = 1.Answer dy x2 y2 dy x2 y2 i. Rearranging; x dx y dx yx dy dv ii. Let y = vx, =v+x dx dx dv x2 + v 2 x2 x2 (1 + v 2 ) (1 + v 2 ) iii. v+x = dx vx2 vx2 v dv (1 + v 2 ) 1 + v2 v2 1 x v dx v v v 1 vdv = dx x v2 = ln x + c 2Sa`adiah Saad JMSK, POLIMAS Page 11
  12. 12. B5001- Engineering Mathematics DIFFERENTIAL EQUATION y2 2 = ln x + c y2 2x 2 (ln x c) 2x 16 c c=8 y 2 = 2x 2 (lnx + 8) 24.3.4 Linear First Order DEs dyIf P = P(x) and Q = Q(x) are functions of x only, then + Py = Q is called a linear dxdifferential equation order 1. We can solve these linear DEs using an integratingfactor. For linear DEs of order 1, the integrating factor is: e∫PdxThe solution for the DE is given by multiplying y by the integrating factor (on the left)and multiplying Q by the integrating factor (on the right) and integrating the right sidewith respect to x, as follows: y eò Q eò Pdx Pdx = ò +K dy 3Example 12: Solve for - y = 7. dx xAnswer dy 3 3 - y = 7. then P(x) = - and Q(x) = 7 dx x x Now for the integrating factor: 3 3 ò Pdx = e ò - x dx = e ò - x dx = e- 3 ln x = x- 3 IF= e For the left hand side of the formulaSa`adiah Saad JMSK, POLIMAS Page 12
  13. 13. B5001- Engineering Mathematics DIFFERENTIAL EQUATION ye ò Qe ò Pdx Pdx = ò dx we have ye∫Pdx = yx-3 For the right hand of the formula, Q = 7 and the IF = x-3, so: Qeò Pdx - 3 = 7x Qe ò Pdx 7 -2 ò ò 7x - 3 Applying the outer integral: dx = dx = - x +K 2 ye ò Qe ò Pdx Pdx Now, applying the whole formula; = ò dx - 3 7 -2 we have ; yx =- x +K 2 7 3 Multiplying throughout by x3 gives: y = - x + Kx 2 dyExample 13: Solve + (cot x)y = cos x dxAnswer dy + (cot x)y = cos x dx Here, then P(x) = cot x and Q(x) = cos x Determine ò Pdx = ò cot xdx = lnsin x IF = e ò Pdx = eln sin x = sin x ò Pdx = cos x sin x Now Qe Apply the formula: ye ò Qe ò Pdx cot xdx = ò dxSa`adiah Saad JMSK, POLIMAS Page 13
  14. 14. B5001- Engineering Mathematics DIFFERENTIAL EQUATION y sin x = ò cos x sin xdx The integral needs a simple substitution: u = sin x, du = cos x dx 2 sin x y sin x = +K 2 Divide throughout by sin x: sinx K sinx y= + = + K cosecx 2 sinx 2 - 3xExample 14: Solve dy + 3ydx = e dxAnswer Dividing throughout by dx to get the equation in the required form, we get: dy - 3x + 3y = e dx In this example, P(x) = 3 and Q(x) = e-3x. Now e∫Pdx = e∫3dx = e3x and Qe ò Pdx òe ò 1dx = x - 3x 3x = e dx = ò Pdx Qe ò Pdx Using ye = ò dx + K , we have: ye3x = x + K or we could write it as: x +K y= 3x eExample 15: Solve 2(y - 4x2)dx + x dy = 0AnswerSa`adiah Saad JMSK, POLIMAS Page 14
  15. 15. B5001- Engineering Mathematics DIFFERENTIAL EQUATION We need to get the equation in the form of a linear DE of order 1. Expand the bracket and divide throughout by dx: 2 dy 2y - 8x + x = 0 dx Rearrange: dy 2 x + 2y = 8x dx Divide throughout by x: dy 2 + y = 8x dx x 2 Here, P(x) = and Q(x) = 8x x 2 ò Pdx ò x dx 2 ln x ln x 2 2 IF = e = e = e = e = x Now Qe ò Pdx 2 3 = 8xx = 8x Applying the formula: ye ò Qeò Pdx Pdx = ò dx + K ò 2 3 4 gives: yx = 8x dx + K = 2x + K 2 K Divide throughout by x2: y = 2x + 2 x dy 6 xExample 16: Solve x - 4y = x e dxAnswer Divide throughout by x: dy 4 5 x - y= x e dx x 4 5 x Here, P(x) = - and Q(x) = x e xSa`adiah Saad JMSK, POLIMAS Page 15
  16. 16. B5001- Engineering Mathematics DIFFERENTIAL EQUATION 4 ò - dx - 4 IF = e ò P(x)dx ln x - 4 = e x = e = x Now Qe ò P(x)dx = x5 ex x- 4 = xex ye ò Qeò Pdx Pdx Applying the formula: = ò dx + K gives ò - 4 x yx = xe dx + K This requires integration by parts, with x u= x dv=e x du = dx v=e - 4 x x So yx = xe - e + K 5 x 4 x 4 Multiplying throughout by x4 gives: y = x e - x e +Kx dy xExample 17: Solve e 2y , x 0 , subject to the initial condition y = 2 dx when x = 0Answer The differential equation can be expressed in the proper form by adding 2y to both sides: dy x 2y e for x 0 dx x We have P(x) = 2 and Q(x) = e P(x)dx 2dx An integrating factor is given by IF = e e e2x for x 0Sa`adiah Saad JMSK, POLIMAS Page 16
  17. 17. B5001- Engineering Mathematics DIFFERENTIAL EQUATION Next, use the first-order linear differential equation theorem, where IF = x e 2 x and Q(x) = e , to find y: 1 y= 2x e2x e x dx C e 1 = 2x ex C e x e 2x C for x 0 e To find C, insert y = 2 when x = 0, to obtain C = 1 x 2x Thus y = e e , x 0 dy 2xyExample 18: Solve sin x with y = 1 when x = 0 dx 1 x2Answer 2x P(x) = ; Q(x) = sin x 1 x2 2x dx 2 1) IF = e 1 x2 = e ln(x x2 1 1 y= 2 (x 2 1)sin xdx C 1 x 1 = 2 x 2 sin xdx sin xdx C 1 x 1 = 2 2x sin x (2 x 2 )cos x cos x C 1 xSa`adiah Saad JMSK, POLIMAS Page 17
  18. 18. B5001- Engineering Mathematics DIFFERENTIAL EQUATION 1 = 2 2x sin x (1 x 2 )cos x C 1 x Since y = 1 when x = 0, 1 1= 0 1 C implies C = 0 1 1 y= 2 2xsinx +(1- x 2 )cosx 1+ xExample 19: dya. Solve the DE = sec θ + y tan θ , given the boundary conditions y=1 when θ = 0. dθ [Ans: y = (θ + 1) sec θ] dy 5 cb. Solve the DE t -5 t = -y . [ ans: y t ] dt 2 tc. Consider a simple electric circuit with the resistance of 3 an inductance of 2H. If a battery gives a constant voltage of 24V and the switch is closed when t = 0, the current, I(t), after t seconds is given by dI 4 + t = 15, I(0) = 0 dt 3 4 45 t i) Obtain I(t) [ans: I(t) (1 e 3 )] 4 ii) Determine the difference in the amount of current flowing through the circuit from the fourth to eight seconds. Give your answer to 3 d.p. [ans: 0.05 A] iii) If the current is allowed to flow through the circuit for a very long period of time, estimate I(t).Sa`adiah Saad JMSK, POLIMAS Page 18
  19. 19. B5001- Engineering Mathematics DIFFERENTIAL EQUATION 45 [ans: A] 44.4 SECOND ORDER DIFFERENTIAL EQUATIONThe general form of the second order differential equation with constant coefficients is d2y dy a +b + cy = Q( x ) dx 2 dxwhere a, b, c are constants with a > 0 and Q(x) is a function of x only.4.4.1 Homogeneous EquationIn this section, most of our examples are homogeneous 2nd order linear DEs (that is, withQ(x) = 0): d 2y dy a +b + cy = 0 , where a, b, c are constants. dx 2 dxMethod of SolutionThe equation am2 + bm + c = 0 is called the Auxiliary Equation (A.E.) (orCharacteristic Equation)The general solution of the differential equation depends on the solution of the A.E. Tofind the general solution, we must determine the roots of the A.E. The roots of the A.E.are given by the well-known quadratic formula: m= -b ± b2 - 4ac 2aSa`adiah Saad JMSK, POLIMAS Page 19
  20. 20. B5001- Engineering Mathematics DIFFERENTIAL EQUATIONSummary:If Differential Equation: ay + by + c = 0 and Associated auxiliary equation is:am2 + bm + c = 0 Nature of roots Condition General Solution 4.4.1. Real and distinct roots, b2 − 4ac > 0 y = Aem1x + Bem2x m1, m2 4.4.2. Real and equal roots, m b2 − 4ac = 0 y = emx(A + Bx) 4.4.3. Complex roots m1 = α + jω b2 − 4ac < 0 y = eαx(A cos ωx + B sin ωx) m1 = α − jωExample 20 2 d i diThe current i flowing through a circuit is given by the equation + 60 + 500i = 0 , dt dtSolve for the current i at time t > 0.AnswerThe auxiliary equation arising from the given differential equations is: 2A.E.: m + 60m + 500 = 0 = (m + 50)(m + 10) = 0So m = - 50 and m = - 10 and 1 2We have 2 distinct real roots, so we need to use the first solution from the table above(y = Aem1x + Bem2x), but we use i instead of y, and t instead of x.Sa`adiah Saad JMSK, POLIMAS Page 20
  21. 21. B5001- Engineering Mathematics DIFFERENTIAL EQUATION - 10t - 50tSo i = Ae + Be - 10t - 50tWe could have written this as: i= C e + C e 1 2Since we have 2 constants of integration. We would be able to find these constants ifwe were given some initial conditions.Example 21Solve the following equation in which s is the displacement of a object at time t. 2d s ds ds - 4 + 4s = 0 , given that s = 1, = 3 when t = 0 2 dt dtdt(That is, the objects position is 1 unit and its velocity is 3 units at the beginning of themotion.)AnswerThe auxiliary equation for our differential equation is: 2 2A.E. m - 4m + 4 = 0 = (m - 2) = 0In this case, we have: m = 2 (repeated root or real equal roots)We need to use the second form from the table above (y = emx(A + Bx)), and once againuse the correct variables (t and i, instead of x and y). 2tSo S(t) = ( A + Bt )e .Now to find the values of the constants:s(0) = 1 Þ A = 1 2tSo we can write S(t) = (1+ Bt )e 2t 2tS (t) = 2(1+Bt)e +Bes (0) = 3 Þ 2 + B = 3 Þ B = 1Sa`adiah Saad JMSK, POLIMAS Page 21
  22. 22. B5001- Engineering Mathematics DIFFERENTIAL EQUATION 2tSo s t) ( =(1+ t )eThe graph of our solution is as follows:Example 22 d 2y dySolve the equation - 2 + 4y = 0 2 dx dxAnswer 2This time the auxiliary equation is: m - 2m + 4 = 0Solving for m, we find that the solutions are a complex conjugate pair:m = 1- j 3 and m = 1 + j 3 1 2The solution for our DE, using the 3rd type from the table above:y = eαx(A cos ωx + B sin ωx) xwe get: y(x) = e (Acos 3 x +Bsin 3 x)Sa`adiah Saad JMSK, POLIMAS Page 22
  23. 23. B5001- Engineering Mathematics DIFFERENTIAL EQUATIONExample 23In a RCL series circuit, R = 10 Ω, C = 0.02 F, L = 1 H and the voltage source is E = 100V. Solve for the current i(t) in the circuit given that at time t = 0, the current in the circuitis zero and the charge in the capacitor is 0.1 C.[Note: Damping and the Natural Response in RLC CircuitsConsider a series RLC circuit (one that has a resistor, an inductor and a capacitor) witha constant driving electro-motive force (emf) E. The current equation for the circuit is di 1 di 1 L + Ri + ò idt = E or L + Ri + q = E dt C dt CDifferentiating, we have 2 d i di 1 L +R + i = 0 ; This is a second order linear homogeneous equation.] dt 2 dt CAnswerd 2i + 10 di + 50i = 0dt 2 dtAE : m2 + 10m + 50 = 0 ,Sa`adiah Saad JMSK, POLIMAS Page 23
  24. 24. B5001- Engineering Mathematics DIFFERENTIAL EQUATIONThe factors are: m = - 5 - j5 and m = - 5 + j5 1 2So, i = e- 5t ( Acos5t + B sin5t ) ; éù i êú ëû = A = 0 ; (This means at t = 0, i = A = 0 in this t= 0case.)Then i = e- 5t B sin5t , We need to find the value of B.Differentiating gives: di - 5t - 5t - 5t = e (5B cos5t ) + (B sin5t )(- 5e ) = 5Be (cos5t - sin5t ) dt diAt t = 0, = 5B dt diReturning to equation + 10i + 50q = 100 dt di diNow, at time t = 0, + 10(0) + 50(0.1) = 100 ; So = 95 = 5B , so B = 19. dt t = 0 dt t = 0 -5tTherefore, i = 19e sin5tSa`adiah Saad JMSK, POLIMAS Page 24

×