Successfully reported this slideshow.
Upcoming SlideShare
×

# Week 7 [compatibility mode]

2,562 views

Published on

KNF1023

Published in: Education
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

### Week 7 [compatibility mode]

1. 1. KNF1023 Engineering Mathematics II Second Order ODEs Prepared By Annie ak JosephPrepared ByAnnie ak Joseph Session 2007/2008
2. 2. Learning Objectives Explain about Euler-Cauchy ODEs Discuss about Second order inhomogeneous ODEs Explain about Particular Solution by Guesswork
3. 3. Euler-Cauchy ODEs An Euler-Cauchy ODE is one of the form ax 2 y "( x) + bxy ( x) + cy ( x) = 0 Where a ≠ 0, b and c are given constants. To look for linearly independent solutions of this ODE, try y = x λwhere λ is a constant yet to be determined. Differentiating, we have y = λ x λ −1 and y " = λ ( λ − 1) x λ − 2
4. 4. Euler-Cauchy ODEsSubstituting into the ODE gives ax ⋅ λ ( λ − 1) x 2 λ −2 + bx ⋅ λ x λ −1 λ + cx = 0 ⇒x λ ( aλ ( λ − 1) + bλ + c ) = 0 ⇒ aλ ( λ − 1) + bλ + c = 0 ⇒ aλ 2 + ( b − a ) λ + c = 0Hence, the value of the constant λ can bedetermined from the quadratic equation above. Weconsider the following cases.
5. 5. 2Case (a): [b − a ] − 4ac > 0In this case, we can find two distinct real values foras given by 2 − [b − a ] + [b − a ] − 4ac λ = λ1 = 2a 2 − [b − a ] − [b − a ] − 4ac λ = λ2 = 2aThus, we have two solutions for the Euler-CauchyODE, namely λ1 y1 = x , y 2 = x λ2
6. 6. Continue…These solutions are linearly independent, since y1 x λ1 = λ2 = x λ1 −λ2 ≠ (cons tan t ) (as λ1 ≠ λ2 ) y2 xFor this particular case where λ1 ≠ λ 2 and λ1 a nd λ 2are real, the general solution of the Euler-Cauchy λ λODE is given by y = A x 1 + B x 2where A and B are arbitrary constants.
7. 7. Example 1Solve the ODE x 2 y"+4 xy+2 y = 0 subject toy (1) = y (1) = 1This is an Euler-Cauchy ODE. So try y=x λ , y = λx λ −1 and y" = λ (λ − 1)x λ −2Substituting into the ODE, we obtain x 2 (λ (λ − 1) x λ − 2 ) + 4 x(λ x λ −1 ) + 2 x λ = 0 x λ [λ (λ − 1) + 4λ + 2] = 0 λ (λ − 1) + 4λ + 2 = 0 λ2 + 3λ + 2 = 0 (λ + 1)(λ + 2) = 0 λ = −1, λ = −2
8. 8. Continue… y = Ax-1 + Bx-2Where A and B are arbitrary constant.Differentiating the general solution gives −2 −3 y = − Ax − 2 BxPutting the given conditions into the generalsolution, we have y (1) = 1; A+ B =1 y (1) = 1; − A − 2 B = 1
9. 9. Continue…Solving for A and B, we obtain A=3 and B=-2.The required particular solution is −1 −2 y = 3x − 2 x
10. 10. 2Case (b): [b − a ] − 4ac = 0In this case, the quadratic equationaλ 2 + (b − a)λ + c = 0 has only one solution. − [b − a ] λ = λ1 = 2a λThus, in trying y = x we manage to find onlyone solution for the Euler-Cauchy ODE. We needtwo linearly independent solutions to construct thegeneral solution of the ODE. To find anothersolution, let us try
11. 11. Continue… y ( x ) = x λ1 ⋅ u ( x ) y ( x ) = λ1 x λ1 −1 ⋅ u ( x ) + x λ1 ⋅ u ( x ) y "( x ) = λ1 ( λ1 − 1) x λ1 − 2 ⋅ u ( x ) + 2 λ1 x λ1 −1 ⋅ u ( x ) + x λ1 ⋅ u "( x ) Here, u ( x) is a function yet to be determined. Substitution into the ODE, we obtain ax 2 λ1 ( λ1 − 1) x λ1 − 2 ⋅ u ( x) + 2λ1 x λ1 −1 ⋅ u ( x) + x λ1 ⋅ u "( x)    +bx λ1 x λ1 −1 ⋅ u ( x) + x λ1 ⋅ u ( x)  + cx λ1 ⋅ u ( x) = 0  
12. 12. Continue… [b − a ]Since aλ ( λ − 1) + bλ + c = 0 and λ1 = − this further 2areduces to u ( x ) + xu "( x ) = 0 dvTo solve for u ( x) let v ( x ) = u ( x) so that v + x =0 dxThis leads to dv dx ∫v = −∫ x 1 ⇒ ln(v) = − ln( x) = ln   x 1 ⇒v= x du 1 ⇒ = dx x ⇒ u = ln( x)
13. 13. Continue…The solution of the Euler-Cauchy ODE whichwe are looking for is therefore given by y = x λ1 ⋅ ln ( x ) λ λThe solutions y = x 1 and y = x 1 ⋅ ln( x ) are linearlyindependent to each other. λ1 λ1 y = Ax + Bx ln( x)where A and B are arbitrary constants.
14. 14. Example 2Solve the ODE x 2 y "+ 3 xy + y = 0 subject toy (1) = 1 and y (e) = 2This is an Euler-CODE. So let us try y=x , λ y = λx λ −1 , y " = λ ( λ − 1) x λ −2Substitution into the ODE gives x λ [λ (λ − 1) + 3λ + 1] = 0 λ ( λ − 1) + 3λ + 1 = 0 λ 2 + 2λ + 1 = 0 2 ( λ + 1) =0 λ = −1 is the only solution
15. 15. Continue…Thus, general solution of the ODE is y = Ax −1 + Bx −1 ln( x)Where A and B are arbitrary constants.Using the given conditions, we have y (1) = 1; A =1 1 B ln(e) y (e) = 2; + = 2; B = 2e − 1 e eThe required particular solution is therefore y = x −1 + ( 2e − 1) x −1 ln( x)
16. 16. 2Case C: [b − a ] − 4ac < 0In this case, the quadratic equationaλ 2 + (b − a )λ + c = 0 has two complex solutions givenby. 2 [b − a ] + i [b − a ] − 4ac λ = λ1 =− 2a 2a 2 [b − a ] − i [b − a ] − 4ac λ = λ2 =− 2a 2aIf we proceed on, without bothering about the factsthat λ 1 and λ 2 are complex, we can construct thegeneral solution of the Euler-Cauchy ODE as λ1 λ2 y = Ax + Bx
17. 17. Continue… λOur only problem is to interpret what xmeans when λ is complex and also to find a way tocalculate this complex power. Once again we canresort to the theory of complex functions to resolvethis problem. We can use the following results1 x z + w = x z ⋅ x w if z and w are any numbers (real or complex) and x is a real number2 x iy = eiy ln( x ) if x > 0 and y are real numbers ± ix3 e = cos( x) ± i sin( x) if x is any real numbers
18. 18. Example 3 2Solve the ODE x y "( x) + 3 xy ( x) + 2 y ( x) = 0subject to y (1) = y (1) = 1 λ λ −1 y=x , y = λx , y " = λ ( λ − 1) x λ −2 x λ [λ (λ − 1) + 3λ + 2] = 0 λ ( λ − 1) + 3λ + 2 = 0 λ 2 + 2λ + 2 = 0 λ = −1 + i , − 1 − i −1+ i −1−i y = Ax + Bx
19. 19. Continue…y = Ax −1+i + Bx −1−i  Axi + Bx − i  =x  −1  = x −1  Aei ln( x ) + Be −i ln( x )    = x −1  A ( cos ( ln( x) ) + i sin(ln( x) ) + B(cos(ln( x)) − i sin(ln( x))  ( )   = x −1 [C cos(ln( x)) + D sin(ln( x))]
20. 20. Continue… where C = A + B and D = i ( A − B ) are arbitrary constants. Differentiating, we havey = x −1  −Cx −1 sin ( ln ( x ) ) + Dx −1 cos ( ln ( x ) )  − x −2 C cos ( ln ( x ) ) + D sin ( ln ( x ) )      Using the given conditions, we have y (1) = 1; C = 1 y (1) = 1; D − C = 1; D = 2
21. 21. Continue…Thus, the required particular solution is y = x −1 cos ( ln ( x ) ) + 2sin ( ln ( x ) )   
22. 22. THEORY FOR INHOMOGENEOUS ODEsConsider the 2nd order linear inhomogeneousODE y "+ f ( x) y + g ( x) y = r ( x)Let y p = y p ( x) be any particular solution ofthe inhomogeneous ODE. Then " y + f ( x) y + g ( x) y p = r ( x) p pTo solve the inhomogeneous ODE, let us make thesubstitution y = y p ( x) + Y ( x)
23. 23. Continue…On substituting into the ODE, we obtain " p  yp ( x) + Y ( x) + g( x)  yp ( x) + Y ( x) = r( x)y ( x) + Y "( x) + f ( x)     y"p + f ( x) yp + g( x) yp  + Y "+ f ( x)Y + g( x)Y = r( x) r( x) + Y "+ f ( x)Y + g( x)Y = r( x)Y "+ f ( x)Y + g( x)Y = 0Thus, we obtain a 2nd order linearhomogeneous ODE in Y = Y ( x)
24. 24. Continue…To summarise, assuming that we can find aparticular solution for the 2nd order linearinhomogeneous ODE and also that we can solve thehomogeneous ODE in for its general solution of theinhomogeneous ODE is given by y= y p ( x) + Y ( x) { { a particular solution general solution of the of in hom ogeneous ODE corresponding hom ogeneous ODE
25. 25. PARTICULAR SOLUTIONS BYGUESSWORK: ExampleSolve the ODE y "( x) + 3 y + 2 y = 2 exp(5 x) subject toy (0) = y (0) = 0Firstly let us solve the corresponding homogeneousODE Y "+ 3Y + 2Y = 0This is a 2nd order linear ODE with constantcoefficients. Let us try Y = eλ x , Y = λ eλ x , Y " = λ 2 eλ x
26. 26. Continue…Then, substitution into the homogeneous ODEGives λ 2 + 3λ + 2 = 0 ( λ + 1)( λ + 2 ) = 0 λ = −1, − 2The general solution of the homogeneous ODE is Y = Ae− x + Be−2 x
27. 27. Continue…Now, to construct the general solution of theinhomogeneous ODE y "( x) + 3 y + 2 y = 2exp(5x) weneed to find one particular solution of the ODE. Wewill try to look for one by guesswork. The righthand side of the ODE, namely the term 2 exp(5 x )suggests that we try a particular solution of theForm y p = α exp(5 x)where the constant α is to be selected to satisfy theODE
28. 28. Continue…Differentiating, we have " y p = 5α exp(5 x), y = 25α exp(5 x) pSubstituting into the ODE, we obtain 25α exp(5 x) + 15α exp(5 x) + 2α exp(5 x) = 2 exp(5 x) ⇒ 42α exp(5 x) = 2 exp(5 x) 1 ⇒α = 21 1Hence, y p = exp(5 x ) is a particular solution of the 21inhomogeneous ODE.
29. 29. Continue…The general solution of the inhomogeneousODE is 1 y = exp(5 x ) + Ae − x + Be − 2 x 21 5 y = exp(5 x ) − A exp(− x) − 2 B exp( −2 x) 21 1 y (0) = 0; A+ B = − 21 5 y (0) = 0; A + 2B = 21 2 1 B= and A = − 7 3 1 1 2 y = exp(5 x) − exp(− x) + exp(−2 x) 21 3 7
30. 30. Prepared By Annie ak JosephPrepared ByAnnie ak Joseph Session 2008/2009