Upcoming SlideShare
Loading in …5
×

# Week 6 [compatibility mode]

2,500 views

Published on

KNF1023

Published in: Education
0 Comments
0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• Be the first to comment

• Be the first to like this

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

No notes for slide

### Week 6 [compatibility mode]

1. 1. KNF1023 Engineering Mathematics II Second Order ODEs Prepared By Annie ak JosephPrepared ByAnnie ak Joseph Session 2008/2009
2. 2. Learning Objectives Explain about 2nd Order Linear ODEs Discuss about General Solutions of Homogeneous ODEs Explain about Homogeneous ODEs with constants coefficients
3. 3. Second Order Linear ODEs A second-order ODEs is called linear if it can be written as ,, y + p ( x) y + q ( x) y = r ( x) − − − (1) and nonlinear if it cannot be written in this form. Here p(x), q(x) and r(x) are given functions of x.
4. 4. Second Order Linear ODEs ,, y + p ( x) y + q ( x) y = 0 called homogeneous. If r ( x ) ≠ 0 , then equation (1) is called non-homogeneous. Below are some examples of 2nd order linear ODEs 21. d y − 4 dy + 5 y = 8 x dx 2 dx ,, , 22. y (x) + 2xy (x) + (x + 1) y(x) = x3. d2y 2 + 9y = 0 dx
5. 5. General Solutions Of HomogeneousODEs Consider the 2nd order linear homogeneous ODE given by ,, , y + f ( x) y + g ( x) y = 0 We have the following lemmas and theorem concerning the solutions of the ODE.
6. 6. Lemma #1, #2 and Theorem 2Lemma #1 If y1 (x ) and y 2 ( x ) are solutions of the above ODE (over a certain interval), then y(x) = Ay1 (x) + By2 (x) where A and B are any arbitrary constants, is also a solution of the ODE (over the interval).Lemma# 2 If y 1 ( x ) and y 2 ( x ) are solutions of the above 2nd order linear homogeneous ODE, then 2 1 1 2 ( y y − y y = D exp − ∫ f ( x ) dx ) where D is a constant
7. 7. Theorem 2 If y1 (x ) and y 2 ( x ) are solutions of the above 2nd order linear homogeneous ODE (over a certain interval) and if y1 (x ) and y 2 ( x ) are linearly independent of each other (over the interval), then the general solution of the ODE is given by y( x ) = Ay1 ( x ) + By 2 ( x ) where A and B are arbitrary constants.
8. 8. Homogeneous ODEs With ConstantCoefficients A 2nd order linear homogeneous ODE with constant coefficients is one which can be written in the form ay ( x ) + by ( x ) + cy ( x ) = 0 Here a ≠ 0, b and c are given constants. According to Theorem #2, to construct the general solution of the ODE, we have to find any two linearly independent solutions of the ODE.
9. 9. Homogeneous ODEs With ConstantCoefficients To look for a solution of the ODE, let us try y ( x ) = eλ x Where λ is a constant Differentiating, we obtain y ( x) = λ eλ x y "( x) = λ ⋅ λ eλ x = λ 2 eλ x
10. 10. Homogeneous ODEs With ConstantCoefficients Substituting into the ODE, we obtain aλ 2 eλ x + bλ eλ x + ceλ x = 0  aλ 2 + bλ + c  = 0 λx e   which will be true for all x if 2 aλ + bλ + c = 0 We can therefore determine the constant form this quadratic equations. We consider the following cases.
11. 11. Case (a): 2 b − 4ac > 0Now if b 2 − 4ac > 0 then the quadratic equationhas two distinct real solutions given by −b + b 2 − 4ac λ = λ1 = 2a −b − b 2 − 4ac λ = λ2 = 2aThus, we obtain two solutions for the ODE is λ1 x λ2x y1 = e , and y2 = e
12. 12. Continue… y1 eλ1 x = λ 2 x = e[ 1 2 ] ≠ cons tan t ,since λ1 ≠ λ2 . λ −λ x Now y2 e Hence, the two solutions are linearly independent. For this case where b 2 − 4 ac > 0 from Theorem #2, the general solution of the ODE ay "+ by + cy = 0 (a≠0, b, and c are constants) is given by λ1 x λ2 x y = Ae + Be where A and B are arbitrary constants and λ1 and λ2 are the solutions of the quadratic equation 2 aλ + bλ + c = 0
13. 13. Example 1Solve the ODE y"+ y −6 y = 0 subject to y (0) = 1and y (0) = 7*This is 2nd order linear homogeneous ODE withconstant coefficient. So, we use λx λx 2 λx y=e , y = λe and y" = λ eSubstituting into the ODE, we obtain λ 2 e λ x + λ e λ x − 6e λ x = 0 ⇒e  λ 2 + λ − 6  = 0 λx  ⇒ λ2 + λ − 6 = 0 ⇒ ( λ + 3)( λ − 2 ) = 0 ⇒ λ = −3 λ = 2
14. 14. Continue…The two linearly independent solutions are −3 x 2x y1 = e and y2 = eThe general solution is −3 x 2x y = Ae + Bewhere A and B are arbitrary constants.We will now use y ( 0 ) = 1 and y ( 0 ) = 7 to workout A and B. Differentiating the general solution,we have −3 x 2x y = −3 Ae + 2 Be
15. 15. Continue…So, y (0) = 1; A + B = 1 y (0) = 7; − 3 A + 2 B = 7Solving for A and B, we obtain A = −1 and B = 2Thus, the required particular solution of the ODEis −3 x 2x y = −e + 2e
16. 16. 2Case b: b − 4ac = 0 In this case, the quadratic equation aλ 2 + bλ + c = 0 has only one real solution given b by λ =− 2a . Hence, in trying y = eλ x we have succeeded in finding only one solution for the − bx /(2 a ) ODE y = e To construct the general solution of the ODE, we need another solution, which is linearly independent to the one we have already found. To look for another solution, let us try the λx substitution y = u ( x ) ⋅ e
17. 17. Continue… where u ( x ) is a function to be determined. Differentiating, we obtain λx λx y = λu ( x) ⋅ e + u ( x) ⋅ e y = λ 2u ( x) ⋅ eλ x + 2λu ( x) ⋅ eλ x + u "( x)eλ x Substituting into the ODE, we have ( ) ( )a λ2u(x) ⋅ eλx + 2λu (x) ⋅ eλx + u"(x)eλx + b λu(x) ⋅ eλx + u (x) ⋅ eλx + cu(x)eλx = 0
18. 18. Continue… bSince aλ 2 + bλ + c = 0 and λ = − , the equation 2a λxabove reduces to au "( x)e =0 λxSince a≠0 and e ≠0 , we find that u "( x ) = 0A solution for this simple ODE is u ( x ) = x (Wedo not have to look for the general solution of thissimple ODE, we are just interested in finding twolinearly independent solutions of the ODEay "( x ) + by ( x ) + cy ( x ) = 0 )
19. 19. Continue…To summarise, for this case where b 2 − 4ac = 0, two particular solutions of the ODEay "(x) + by (x) + cy(x) = 0 (a≠0, b and c are constants) are given by − bx − bx y1 = e 2a y2 = x ⋅ e 2a y1 1Now, since y2 = x ≠ (co ns tan t ) , the two solutions aboveare linearly independent and hence from Theorem#2, the general solution of the ODE is − bx − bx y = Ae 2a + Bxe 2a
20. 20. Example 2:Solve the ODE y"+6 y +9 y = 0subject toy ( 0) = y ( 0 ) = 1This is a 2nd order linear homogeneous ODE withconstant coefficients. So let us try y = e λx , y = λ e λx and y" = λ2 e λxSubstituting into the ODE, we obtain λ 2 + 6λ + 9 = 0 (λ + 3) 2 = 0 λ = −3
21. 21. Continue…Since λ = −3 is the only possible solution of thequadratic equation, the general solution ofthe ODE is given by −3 x −3 x y = Ae + BxeDifferentiating the general solution, we obtain −3 x −3 x −3 x y = −3 Ae − 3Bxe + BeUsing the given conditions, we have y (0) = 1; A =1 y (0) = 1; − 3 + B = 1 or B=4
22. 22. Continue…Hence, the required particular solution is −3 x −3 x y=e + 4 xe
23. 23. Case C: b 2 − 4ac < 0In this case, the quadratic equationaλ 2 + bλ + c = 0 does not have any real solutions. Ithas two distinct complex solutions given by b b 2 − 4ac λ = λ1 = − + i 2a 2a b b 2 − 4ac λ = λ2 = − −i 2a 2aWhere i = −1If we simply ignore the fact that λ1 and λ2are complex and proceed as in case (a) above, the λx λ xgeneral solution of the ODE is given by y = Ae 1 + Be 2
24. 24. Continue…Theory which will be useful to us in dealing λxwith e when λ is complex.1. If z and w are any numbers (either real or complex) then e z + w = e z ⋅ e w2. If x is any real number then ± ix e = cos( x) ± i sin( x)
25. 25. Example 3Solve the ODE y −4 y +13 y = 0 subject to y (0) = 1 and y (0) = 2 . What is the value of y at π x= ? 2This is 2nd order linear homogeneous ODE withconstant coefficients. Let us try y = e λx , y = λ e λx and y" = λ 2 e λxSubstituting into the ODE, we obtain λ2 − 4λ + 13 = 0 λ = 2 + 3i λ = 2 − 3i
26. 26. Continue…Thus, the general solution is given by y = Ae ( 2+3i ) x + Be ( 2−3i ) xBefore we proceed any further, it is useful toRewrite the general solution as (2 + 3i ) x (2 −3i ) xy = Ae + Be 2x i (3 x ) − i (3 x )y = e ( Ae + Be )y = e 2 x ( A [ cos(3 x) + i sin(3 x) ] + B [ cos(3 x) − i sin(3 x) ])y = e 2 x ([ A + B ] cos(3 x) + i [ A − B ] sin(3 x) )
27. 27. Continue…Thus, we can rewrite the general solution as y = e 2 x [C cos(3 x) + D sin(3 x) ]where C=A+B and D=i[A-B] are arbitraryconstants.Differentiating, we havey = e 2 x [− 3C sin(3x) + 3D cos(3x)] + 2e 2 x [C cos(3x) + D sin(3x)]Using the given conditions, we find that y (0) = 1; C = 1 y (0) = 2; 3D + 2C = 2 or D=0
28. 28. Continue…Thus, the required particular solution is 2x y = e cos(3 x)The value of y at x = π is ( 2) = e yπ π ( 2) = 0 cos 3π 2
29. 29. Prepared By Annie ak JosephPrepared ByAnnie ak Joseph Session 2007/2008