Upcoming SlideShare
Loading in …5
×

Primer for ordinary differential equations

1,115 views

Published on

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
1,115
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
19
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Primer for ordinary differential equations

1. 1. TARUN GEHLOTPrimer for Ordinary Differential EquationsAfter reading this chapter, you should be able to: 1. define an ordinary differential equation, 2. differentiate between an ordinary and partial differential equation, and 3. solve linear ordinary differential equations with fixed constants by using classical solution and Laplace transform techniques.IntroductionAn equation that consists of derivatives is called a differential equation. Differentialequations have applications in all areas of science and engineering. Mathematicalformulation of most of the physical and engineering problems leads to differential equations.So, it is important for engineers and scientists to know how to set up differential equationsand solve them.Differential equations are of two types (A) ordinary differential equations (ODE) (B) partial differential equations (PDE)An ordinary differential equation is that in which all the derivatives are with respect to asingle independent variable. Examples of ordinary differential equations include d2y dy dy 2 2 y 0, (0) 2, y (0) 4 , dx dx dx d3y d2y dy d2y dy 3 3 2 5 y sin x, 2 (0) 12 , (0) 2 , y (0) 4 dx dx dx dx dxOrdinary differential equations are classified in terms of order and degree. Order of anordinary differential equation is the same as the highest derivative and the degree of anordinary differential equation is the power of highest derivative.
2. 2. Thus the differential equation, d3y d2y dy x3 3 x2 2 x xy e x dx dx dxis of order 3 and degree 1, whereas the differential equation 2 dy dy 1 x2 sin x dx dxis of order 1 and degree 2.An engineer’s approach to differential equations is different from a mathematician. While,the latter is interested in the mathematical solution, an engineer should be able to interpret theresult physically. So, an engineer’s approach can be divided into three phases: a) formulation of a differential equation from a given physical situation, b) solving the differential equation and evaluating the constants, using given conditions, and c) interpreting the results physically for implementation.Formulation of differential equationsAs discussed above, the formulation of a differential equation is based on a given physicalsituation. This can be illustrated by a spring-mass-damper system. K b M x Figure 1 Spring-mass damper system.Above is the schematic diagram of a spring-mass-damper system. A block is suspendedfreely using a spring. As most physical systems involve some kind of damping - viscousdamping, dry damping, magnetic damping, etc., a damper or dashpot is attached to accountfor viscous damping. Let the mass of the block be M , the spring constant be K , and the dampercoefficient be b . If we measure displacement from the static equilibrium position we neednot consider gravitational force as it is balanced by tension in the spring at equilibrium. Below is the free body diagram of the block at static and dynamic equilibrium. So,the equation of motion is given by
3. 3. Primer for Ordinary Differential Equation Ma FS FD (1)where FS is the restoring force due to spring. FD is the damping force due to the damper. a is the acceleration.The restoring force in the spring is given by FS Kx (2)as the restoring force is proportional to displacement and it is negative as it opposes themotion. The damping force in the damper is given by FD bv (3)as the damping force is directly proportional to velocity and also opposes motion.Therefore, the equation of motion can be written as Ma Kx bv (4) Static Dynamic FS FD T Mg Ma Figure 2 Free body diagram of spring-mass-damper system.Since d 2x dx a 2 and v dt dtfrom Equation (4), we get d 2x dx M 2 Kx b dt dt 2 d x dx M 2 b Kx 0 (5) dt dtThis is an ordinary differential equation of second order and of degree one.
4. 4. Solution to linear ordinary differential equationsIn this section we discuss two techniques used to solve ordinary differential equations (A) Classical technique (B) Laplace transform techniqueClassical TechniqueThe general form of a linear ordinary differential equation with constant coefficients is givenby dny d n 1y d2y dy n k n n 1 ......... k 3 2 k 2 k1 y F ( x) (6) dx dx dx dxThe general solution contains two parts y yH yP (7)where y H is the homogeneous part of the solution and y P is the particular part of the solution.The homogeneous part of the solution y H is that part of the solution that gives zero whensubstituted in the left hand side of the equation. So, y H is solution of the equation dny d n 1y d2y dy n k n n 1 ......... k 3 2 k 2 k1 y 0 (8) dx dx dx dx The above equation can be symbolically written as D n y k n D n 1 y .......... ....... k 2 Dy k1 y 0 (9) (D n kn D n 1 .......... ....... k2 D k1 ) y 0 (10)where, dn Dn (11) dx n dn 1 Dn 1 dx n 1 . . .operating on y is the same as ( D r1 ), ( D r2 ) , ( D rn )operating one after the other in any order, where ( D r1 ), ( D r2 ),........ ...., ( D rn )are factors of D n k n D n 1 .......... ..... k 2 D k1 0 (12)To illustrate
5. 5. Primer for Ordinary Differential Equation ( D 2 3D 2) y 0is same as ( D 2)(D 1) y 0 ( D 1)(D 2) y 0Therefore, ( D n k n D n 1 .......... .......... k 2 D k1 ) y 0 (13)is same as ( D rn )( D rn 1 )......... .........( D r1 ) y 0 (14)operating one after the other in any order.Case 1: Roots are real and distinctThe entire left hand side becomes zero if D r1 y 0 . Therefore, the solution to D r1 y 0 is a solution to a homogeneous equation. D r1 y 0 is called Leibnitz’slinear differential equation of first order and its solution is D r1 y 0 (15) dy r1 y (16) dx dy r1 dx (17) yIntegrating both sides we get ln y r1 x c (18) y ce r1 x (19)Since any of the n factors can be placed before y , there are n different solutionscorresponding to n different factors given by C n e rn x , C n 1e rn 1x ,......... ....., C 2 e r2 x , C1e r1xwhere rn , rn 1 ,......... .., r2 , r1 are the roots of Equation (12) and C n , C n 1 ,......, C 2 , C1 are constants.We get the general solution for a homogeneous equation by superimposing the individualLeibnitz’s solutions. Therefore y H C1e r1x C 2 e r2 x .......... ... C n 1e rn 1x C n e rn x (20)Case 2: Roots are real and identicalIf two roots of a homogeneous equation are equal, say r1 r2 , then ( D rn )( D rn 1 )......... .......... ...( D r1 )( D r1 ) y 0 (21)Let’s work at ( D r1 )( D r1 ) y 0 (22)If ( D r1 ) y z (23)then
6. 6. ( D r1 ) z 0 z C 2 e r1x (24)Now substituting the solution from Equation (24) in Equation (23) ( D r1 ) y C 2 e r1x dy r1 y C 2 e r1x dx dy e r1x r1e r1x y C 2 dx d (e r1x y ) C2 dx d (e r1x y ) C 2 dx (25)Integrating both sides of Equation (25), we get e r1x y C 2 x C1 y (C 2 x C1 )e r1 x (26)Therefore the final homogeneous solution is given by yH C1 C 2 x e r1x C 3 e r3 x ... C n e rn x (27)Similarly, if m roots are equal the solution is given by yH C1 C 2 x C 3 x 2 ....... C m x m 1 e rm x C m 1e rm 1x ... C n e rn x (28)Case 3: Roots are complexIf one pair of roots is complex, say r1 i and r2 i ,where i 1then y H C1e i x C 2 e i x C 3 e r3 x ...... C n e rn x (29)Since e i x cos x i sin x , and (30a) e i x cos x i sin x (30b)then y H C1e x cos x i sin x C 2 e x cos x i sin x C 3 e r3 x ......... C n e rn x C1 C 2 e x cos x i C1 C 2 e x sin x C 3 e r3 x ......... C n e rn x e x A cos x B sin x C 3 e r3 x ........ C n e rn x (31)where A C1 C 2 and B i(C1 C 2 ) (32)Now, let us look at how the particular part of the solution is found. Consider the generalform of the ordinary differential equation D n k n D n 1 k n 1 D n 2 .......... k1 y X (33)
7. 7. Primer for Ordinary Differential EquationThe particular part of the solution y P is that part of solution that gives X when substitutedfor y in the above equation, that is, D n k n D n 1 k n 1 D n 2 ...... k1 y P X (34)Sample Case 1When X e ax , the particular part of the solution is of the form Aeax . We can find A bysubstituting y Ae ax in the left hand side of the differential equation and equatingcoefficients.Example 1Solve dy 3 2y e x , y(0) 5 dxSolutionThe homogeneous solution for the above equation is given by 3D 2 y 0The characteristic equation for the above equation is given by 3r 2 0The solution to the equation is r 0.666667 y H Ce 0.666667 x xThe particular part of the solution is of the form Ae d Ae x 3 2 Ae x e x dx 3 Ae x 2 Ae x e x Ae x e x A 1Hence the particular part of the solution is yP e xThe complete solution is given by y yH yP Ce 0.666667 x e xThe constant C can be obtained by using the initial condition y(0) 5 y 0 Ce 0.666667 0 e 0 5 C 1 5 C 6The complete solution is y 6e 0.666667 x e xExample 2Solve
8. 8. dy 1.5 x 2 3y e , y(0) 5 dxSolutionThe homogeneous solution for the above equation is given by 2D 3 y 0The characteristic equation for the above equation is given by 2r 3 0The solution to the equation is r 1.5 y H Ce 1.5 xBased on the forcing function of the ordinary differential equations, the particular part of thesolution is of the form Ae 1.5 x , but since that is part of the form of the homogeneous part ofthe solution, we need to choose the next independent solution, that is, y P Axe 1.5 xTo find A , we substitute this solution in the ordinary differential equation as d Axe 1.5 x 2 3 Axe 1.5 x e 1.5 x dx 1.5 x 2 Ae 3 Axe 1.5 x 3 Axe 1.5 x e 1.5 x 2 Ae 1.5 x e 1.5 x A 0.5Hence the particular part of the solution is y P 0.5 xe 1.5 xThe complete solution is given by y yH yP Ce 1.5 x 0.5xe 1.5 xThe constant C is obtained by using the initial condition y(0) 5. y 0 Ce 1.5( 0) 0.5(0)e 1.5( 0) 5 C 0 5 C 5The complete solution is y 5e 1.5 x 0.5 xe 1.5 xSample Case 2When X sin(ax) or cos(ax) ,the particular part of the solution is of the form A sin(ax) B cos(ax) .We can get A and B by substituting y A sin(ax) B cos(ax) in the left hand side of thedifferential equation and equating coefficients.
9. 9. Primer for Ordinary Differential EquationExample 3Solve d2y dy dy 2 3 3.125 y sin x , y (0) 5, (x 0) 3 dx 2 dx dxSolutionThe homogeneous equation is given by (2 D 2 3D 3.125 ) y 0The characteristic equation is 2r 2 3r 3.125 0The roots of the characteristic equation are 3 32 4 2 3.125 r 2 2 3 9 25 4 3 16 4 3 4i 4 0.75 iTherefore the homogeneous part of the solution is given by y H e 0.75 x ( K1 cos x K 2 sin x)The particular part of the solution is of the form y P A sin x B cos x d2 d 2 2 A sin x B cos x 3 A sin x B cos x 3.125 ( A sin x B cos x ) sin x dx dx d 2 A cos x B sin x 3( A cos x B sin x) 3.125( A sin x B cos x) sin x dx 2( A sin x B cos x) 3( A cos x B sin x) 3.125( A sin x B cos x) sin x (1.125A 3B) sin x (1.125B 3 A) cos x sin xEquating coefficients of sin x and cos x on both sides, we get 1.125A 3B 1 1.125B 3A 0Solving the above two simultaneous linear equations we get A 0.109589 B 0.292237Hence y P 0.109589 sin x 0.292237 cos xThe complete solution is given by y e 0.75 x ( K1 cos x K 2 sin x) (0.109589 sin x 0.292237 cos x)To find K 1 and K 2 we use the initial conditions
10. 10. dy y (0) 5, ( x 0) 3 dxFrom y(0) 5 we get 5 e 0.75( 0) ( K1 cos(0) K 2 sin(0)) (0.109589 sin(0) 0.292237 cos(0)) 5 K1 0.292237 K1 5.292237 dy 0.75 e 0.75 x ( K 1 cos x K 2 sin x) e 0.75 x ( K 1 sin x K 2 cos x) dx 0.109589 cos x 0.292237 sin x From dy (x 0) 3, dxwe get 3 0.75e 0.75(0) ( K1 cos(0) K 2 sin(0)) e 0.75(0) ( K1 sin(0) K 2 cos(0)) 0.109589cos(0) 0.292237sin(0) 3 0.75 K1 K 2 0.109589 3 0.75(5.292237 ) K 2 0.109589 K 2 6.859588The complete solution is y e 0.75 x (5.292237 cos x 6.859588 sin x) 0.109589 sin x 0.292237 cos xExample 4Solve d2y dy dy 2 6 3.125 y cos(x) , y (0) 5, (x 0) 3 dx 2 dx dxSolutionThe homogeneous part of the equations is given by (2 D 2 6 D 3.125 ) y 0The characteristic equation is given by 2r 2 6r 3.125 0 6 62 4(2)(3.125) r 2(2) 6 36 25 4 6 11 4 1.5 0.829156 0.670844, 2.329156Therefore, the homogeneous solution y H is given by
11. 11. Primer for Ordinary Differential Equation y H K1e 0.670845 x K 2 e 2.329156 xThe particular part of the solution is of the form y P A sin x B cos xSubstituting the particular part of the solution in the differential equation, d2 d 2 2 ( A sin x B cos x) 6 ( A sin x B cos x) dx dx 3.125 ( A sin x B cos x) cos x d 2 ( A cos x B sin x) 6( A cos x B sin x) dx 3.125 ( A sin x B cos x) cos x 2( A sin x B cos x) 6( A cos x B sin x) 3.125 ( A sin x B cos x) cos x (1.125A 6B) sin x (1.125B 6 A) cos x cos xEquating coefficients of cos x and sin x we get 1.125B 6 A 1 1.125 A 6 B 0The solution to the above two simultaneous linear equations are A 0.161006 B 0.0301887Hence the particular part of the solution is y P 0.161006 sin x 0.0301887 cos xTherefore the complete solution is y yH yP y ( K1e 0.670845 x K 2 e 2.329156 x ) 0.161006 sin x 0.0301887 cos xConstants K1 and K 2 can be determined using initial conditions. From y(0) 5, y(0) K1 K 2 0.0301887 5 K1 K 2 5 0.0301887 4.969811Now dy 0.670845K1e ( 0.670845) x 2.329156K 2 e ( 2.329156) x dx 0.161006cos x 0.0301887sin x dyFrom (x 0) 3 dx 0.670845 K1 2.329156 K 2 0.161006 3 0.670845 K1 2.329156 K 2 3 0.161006 0.670845 K1 2.329156 K 2 2.838994We have two linear equations with two unknowns K1 K 2 4.969811 0.670845 K1 2.329156 K 2 2.838994Solving the above two simultaneous linear equations, we get
12. 12. K1 8.692253 K2 3.722442The complete solution is y (8.692253 e 0.670845 x 3.722442 e 2.329156 x ) 0.161006 sin x 0.0301887 cos x.Sample Case 3When X e ax sin bx or e ax cosbx ,the particular part of the solution is of the form e ax ( A sin bx B cos bx) ,we can get A and B by substituting y e ax ( A sin bx B cos bx)in the left hand side of differential equation and equating coefficients.Example 5Solve d2y dy dy 2 5 3.125 y e x sin x , y (0) 5, (x 0) 3 dx 2 dx dxSolutionThe homogeneous equation is given by (2 D 2 5D 3.125 ) y 0The characteristic equation is given by 2r 2 5r 3.125 0 5 52 4(2)(3.125) r 2(2) 5 25 25 4 5 0 4 1.25, 1.25Since roots are repeated, the homogeneous solution y H is given by y H ( K1 K 2 x)e ( 1.25) xThe particular part of the solution is of the form y P e x ( A sin x B cos x)Substituting the particular part of the solution in the ordinary differential equation
13. 13. Primer for Ordinary Differential Equation d2 d 2 2 {e x ( A sin x B cos x)} 5 {e x ( A sin x B cos x)} dx dx 3.125{e ( A sin x B cos x)} e x sin x x d 2 { e x ( A sin x B cos x) e x ( A cos x B sin x)} dx 5{ e x ( A sin x B cos x) e x ( A cos x B sin x)} 3.125e x ( A sin x B cos x) e x sin x2{e x ( A sin x B cos x) e x ( A cos x B sin x) e x ( A cos x B sin x) e x ( A sin x B cos x)} 5{ e x ( A sin x B cos x) e x ( A cos x B sin x)} 3.125e x ( A sin x B cos x) e x sin x x x x 1.875e ( A sin x B cos x) e ( A cos x B sin x) e sin x 1.875( A sin x B cos x) ( A cos x B sin x) sin x (1.875 A B) sin x ( A 1.875 B) cos x sin xEquating coefficients of cos x and sin x on both sides we get A 1.875B 0 1.875A B 1Solving the above two simultaneous linear equations we get A 0.415224 and B 0.221453Hence, yP e x (0.415224 sin x 0.221453 cos x)Therefore complete solution is given by y yH yP y ( K1 xK 2 )e 1.25 x e x (0.415224 sin x 0.221453 cos x)Constants K 1 and K 2 can be determined using initial conditions,From y(0) 5, we get K1 0.221453 5 K1 5.221453Now dy 1.25 K 1e 1.25 x 1.25 K 2 xe 1.25 x K 2 e 1.25 x dx e x (0.415224 cos x 0.221453 sin x) e x (0.415224 sin x 0.221453 cos x) dyFrom (0) 3, we get dx 1.25K1e 1.25( 0) 1.25K 2 (0)e 1.25( 0) K 2 e 1.25( 0) e 0 (0.415224cos(0) 0.221453sin(0)) e 0 (0.415224sin(0) 0.221453cos(0) 3 1.25 K1 K 2 0.221453 0.415224 3 1.25 K1 K 2 3.193771 1.25(5.221453 ) K 2 3.193771 K 2 9.720582Substituting K1 5.221453 and K 2 9.720582
14. 14. in the solution, we get 1.25 x y (5.221453 9.720582 x)e e x (0.415224 sin x 0.221453 cos x)The forms of the particular part of the solution for different right hand sides of ordinarydifferential equations are given below X yP x a0 a1 x a 2 x 2 b0 b1 x b2 x 2 e ax Aeax sin(bx) A sin(bx) B cos(bx) e ax sin(bx) e ax A sin(bx) B cos(bx) cos(bx) A sin(bx) B cos(bx) e ax cos(bx) e ax A sin(bx) B cos(bx)Laplace TransformsIf y f (x) is defined at all positive values of x , the Laplace transform denoted by Y (s) isgiven by sx Y ( s) L{ f ( x)} e f ( x)dx (35) 0where s is a parameter, which can be a real or complex number. We can get back f (x) bytaking the inverse Laplace transform of Y (s) . L 1{Y ( s )} f ( x) (36)Laplace transforms are very useful in solving differential equations. They give the solutiondirectly without the necessity of evaluating arbitrary constants separately.The following are Laplace transforms of some elementary functions 1 L(1) s n! L( x n ) , where n 0,1,2,3.... sn 1 1 L(e ax ) s a a L(sin ax) s a2 2 s L(cosax) s a2 2 a L(sinh ax) s a2 2
15. 15. Primer for Ordinary Differential Equation s L(coshax) (37) s a2 2The following are the inverse Laplace transforms of some common functions 1 L1 1 s 1 L1 e ax s a 1 xn 1 L1 , where n 1,2,3...... sn n 1! 1 e ax x n 1 L1 n s a n 1! 1 1 L1 2 2 sin ax s a a s L1 2 cos ax s a2 1 1 L1 2 2 sinh ax s a a s L1 2 cosh at s a2 1 1 ax L1 2 2 e sin bx s a b b s a L1 2 2 e ax cosbx s a b s 1 L1 x sin ax (38) 2 2 2 2a s aProperties of Laplace transformsLinear propertyIf a, b, c are constants and f ( x), g ( x), and h(x) are functions of x then L[af ( x) bg ( x) ch( x)] aL( f ( x)) bL( g ( x)) cL(h( x)) (39)Shifting propertyIf L{ f ( x)} Y ( s) (40)then L{e at f ( x)} Y ( s a) (41)Using shifting property we get
16. 16. n! L e ax x n n 1 , n 0 s a b L e ax sin bx 2 s a b2 s a L e ax cos bx 2 s a b2 b L e ax sinh bx 2 s a b2 s a L e ax cosh bx 2 (42) s a b2Scaling propertyIf L{ f ( x)} Y ( s) (43)then 1 s L{ f (ax)} Y (44) a aLaplace transforms of derivativesIf the first n derivatives of f (x) are continuous then L{ f n ( x)} e sx f n ( x)dx (45) 0Using integration by parts we get sx n 1 sx n 2 sx n e f ( x ) ( s )e f ( x) e f ( x)dx 0 ( s) 2 e sx f n 3 ( x) ...... ( 1) n 1 ( s) n 1 e sx f ( x) 0 ( 1) n ( s) n e sx f ( x)dx 0 f n 1 (0) sf n 2 (0) s 2 f n 3 (0) .......... s n 1 f (0) s n e ... sx f ( x )dx 0 s nY ( s ) f n 1 (0) sf n 2 (0) s 2 f n 3 (0) ........ s n 1 f (0) (46)Laplace transform technique to solve ordinary differential equationsThe following are steps to solve ordinary differential equations using the Laplace transformmethod (A) Take the Laplace transform of both sides of ordinary differential equations. (B) Express Y (s) as a function of s . (C) Take the inverse Laplace transform on both sides to get the solution.Let us solve Examples 1 through 4 using the Laplace transform method.
17. 17. Primer for Ordinary Differential EquationExample 6Solve dy 3 2y e x , y(0) 5 dxSolutionTaking the Laplace transform of both sides, we get dy L 3 2y Le x dx 1 3[ sY ( s) y(0)] 2Y ( s) s 1Using the initial condition, y(0) 5 we get 1 3[ sY ( s) 5] 2Y ( s) s 1 1 (3s 2)Y ( s) 15 s 1 15s 16 (3s 2)Y ( s) s 1 15 s 16 Y (s) ( s 1)( 3s 2)Writing the expression for Y (s) in terms of partial fractions 15 s 16 A B ( s 1)(3s 2) s 1 3s 2 15 s 16 3 As 2 A Bs B ( s 1)(3s 2) ( s 1)(3s 2) 15s 16 3As 2 A Bs BEquating coefficients of s 1 and s 0 gives 3A B 15 2 A B 16The solution to the above two simultaneous linear equations is A 1 B 18 1 18 Y ( s) s 1 3s 2 1 6 s 1 s 0.666667Taking the inverse Laplace transform on both sides 1 6 L 1{Y ( s )} L1 L1 s 1 s 0.666667Since
18. 18. 1 L1 e at s aThe solution is given by y ( x) e x 6e 0.666667 xExample 7Solve dy 1.5 x 2 3y e , y(0) 5 dxSolutionTaking the Laplace transform of both sides, we get dy L 2 3y L e 1.5 x dx 1 2[ sY ( s) y(0)] 3Y ( s) s 1.5Using the initial condition y(0) 5 , we get 1 2[ sY ( s) 5] 3Y ( s) s 1.5 1 (2s 3)Y ( s) 10 s 1.5 10s 16 (2s 3)Y ( s) s 1.5 10 s 16 Y (s) ( s 1.5)( 2 s 3) 10 s 16 2( s 1.5)( s 1.5) 10 s 16 2( s 1.5) 2 5s 8 ( s 1.5) 2Writing the expression for Y (s) in terms of partial fractions 5s 8 A B 2 ( s 1.5) s 1.5 ( s 1.5) 2 5s 8 As 1.5 A B 2 ( s 1.5) ( s 1.5) 2 5s 8 As 1.5 A BEquating coefficients of s 1 and s 0 gives A 5 1.5 A B 8The solution to the above two simultaneous linear equations is
19. 19. Primer for Ordinary Differential Equation A 5 B 0.5 5 0.5 Y (s) s 1.5 ( s 1.5) 2Taking the inverse Laplace transform on both sides 5 0.5 L 1{Y ( s)} L 1 L1 s 1.5 ( s 1.5) 2Since 1 1 L1 e ax and L 1 2 xe ax s a ( s a)The solution is given by y ( x) 5e 1.5 x 0.5 xe 1.5 xExample 8Solve d2y dy dy 2 3 3.125 y sin x , y (0) 5, (x 0) 3 dx 2 dx dxSolutionTaking the Laplace transform of both sides d2y dy L 2 2 3 3.125 y L sin x dx dxand knowing d2y dy L 2 s 2Y s sy 0 x 0 dx dx dy L sY s y0 dx 1 L(sin x) 2 s 1we get dy 1 2 s 2Y ( s ) sy (0) (x 0) 3 sY ( s ) y ( 0) 3.125 Y ( s ) 2 dx s 1 1 2 s 2Y ( s) 5s 3 3 sY ( s) 5 3.125Y ( s) 2 s 1 1 s 2s 3 3.125 Y ( s) 10s 21 2 s 1 1 s 2s 3 3.125 Y ( s) 2 10s 21 s 1
20. 20. 22 10s 3 10s 21s 2 2s 2 3s 3.125 Y (s) (s 2 1) 10s 3 21s 2 10s 22 Y ( s) s 2 1 2s 2 3s 3.125Writing the expression for Y (s) in terms of partial fractions As B Cs D 10s 3 21s 2 10s 22 2 2s 3s 3.125 s2 1 s 2 1 2s 2 3s 3.125 As 3 As Bs 2 B 2Cs 3 3Cs 2 3.125Cs 2 Ds 2 3Ds 3.125D 2 s 2 3s 3.125 s 2 1 10s 3 21s 2 10s 22 s 2 1 2 s 2 3s 3.125 A 2C s 3 B 3C 2 D s 2 A 3.125C 3D s B 3.125D s 2 1 2 s 2 3s 3.125 10s 3 21s 2 10s 22 s 2 1 2s 2 3s 3.125Equating terms of s 3 , s 2 , s 1 and s 0 gives A 2C 10 B 3C 2D 21 A 3.125C 3D 10 B 3.125D 22The solution to the above four simultaneous linear equations is A 10.584474 B 21.657534 C 0.292237 D 0.109589Hence 10.584474s 21.657534 0.292237s 0.109589 Y ( s) 2 2s 3s 3.125 s2 1 2s 2 3s 3.125 2{( s 2 1.5s 0.5625 ) 1} 2{( s 0.75 ) 2 1} 10 .584474 ( s 0.75 ) 13 .719179 0.292237 s 0.109589 Y (s) 2 2{( s 0.75 ) 1} s2 1 5.292237 ( s 0.75 ) 6.859589 0.292237 s 0.109589 2 2 {( s 0.75 ) 1} {( s 0.75 ) 1} ( s 2 1) ( s 2 1)Taking the inverse Laplace transform of both sides 5.292237( s 0.75) 6.859589 L 1{Y ( s )} L 1 2 L1 {(s 0.75) 1} {(s 0.75) 2 1 0.292237s 0.109589 L1 L1 s2 1 s2 1
21. 21. Primer for Ordinary Differential Equation s 0.75 1 L 1{Y ( s)} 5.292237L 1 6.859589L 1 {(s 0.75) 2 1} {(s 0.75) 2 1 s 1 0.292237L 1 2 0.109589L 1 2 s 1 s 1Since s a L1 2 2 e ax cosbx s a b b L1 2 sin bx2 e ax s a b 1 L1 2 sin ax s a2 s L1 2 cos ax s a2The complete solution is y ( x) 5.292237 e 0.75 x cos x 6.8595859 e 0.75 x sin x 0.292237 cos x 0.109589 sin x e 0.75 x 5.292237 cos x 6.859589 sin x 0.292237 cos x 0.109589 sin xExample 9Solve d2y dy dy 2 6 3.125 y cos x , y (0) 5, (x 0) 3 dx 2 dx dxSolutionTaking the Laplace transform of both sides d2y dy L 2 2 6 3.125 y L cos x dx dxand knowing d2y dy L 2 s 2Y s sy 0 x 0 dx dx dy L sY s y0 dx s L(cos x) 2 s 1we get dy s 2 s 2Y ( s ) sy (0) (x 0) 6 sY ( s ) y (0) 3.125 Y ( s ) 2 dx s 1 s 2 s 2 Y ( s ) 5s 3 6 sY ( s) 5 3.125Y ( s) 2 s 1
22. 22. s s(2s 6) 3.125 Y ( s) 2 10s 36 s 1 36 10 s 3 11s 36 s 2 2s 2 6s 3.125 Y ( s) s2 1 10s 3 36s 2 11s 36 Y ( s) s 2 1 2s 2 6s 3.125Writing the expression for Y (s) in terms of partial fractions As B Cs D 10s 3 36s 2 11s 36 2s 2 6s 3.125 s2 1 s 2 1 2s 2 6s 3.125 As 3 As Bs 2 B 2Cs 3 6Cs 2 3.125Cs 2 Ds 2 6 Ds 3.125D 2s 2 6 s 3.125 s 2 1 10s 3 36s 2 11s 36 s 2 1 2 s 2 6 s 3.125 A 2C s 3 B 6C 2 D s 2 A 3.125C 6 D s B 3.125D s 2 1 2 s 2 6 s 3.125 10s 3 36s 2 11s 36 s 2 1 2 s 2 6 s 3.125Equating terms of s 3 , s 2 , s 1 and s 0 gives A 2C 10 B 6C 2D 36 A 3.125C 6D 11 B 3.125D 36The solution to the above four simultaneous linear equations is A 9.939622 B 35.496855 C 0.0301886 D 0.161006Then 9.939622s 35.496855 0.0301886s 0.161006 Y ( s) 2s 2 6s 3.125 s2 1 2s 2 6s 3.125 2{( s 2 3s 2.25 ) 0.6875 } 2{( s 1.5) 2 0.829156 2 } 9.939622 ( s 1.5) 20 .587422 0.0301886 s 0.161006 Y ( s) 2{( s 1.5) 2 0.829156 2 } s2 1 4.969811 ( s 1.5) 10 .293711 {( s 1.5) 0.829156 } {( s 1.5) 2 0.829156 2 } 2 2 0.0301886 s 0.161006 s2 1 s2 1Taking the inverse Laplace transform on both sides
23. 23. Primer for Ordinary Differential Equation 4.969811( s 1.5) 10.293711 L 1{Y ( s )} L 1 L1 {(s 1.5) 2 0.8291562 } {(s 1.5) 2 0.8291562 0.0301886s 0.161006 L1 L1 s2 1 s2 1 ( s 1.5) 1 4.969811L 1 10.293711L 1 ( s 1.5) 2 0.8291562 ( s 1.5) 0.8291562 2 s 1 0.0301886L 1 2 0.161006L 1 2 (s 1) (s 1)Since s a L1 2 2 e ax coshbx s a b 1 1 L1 2 2 e ax sinh bx s a b b 1 1 L1 2 2 sin ax s a a s L1 2 cos ax s a2The complete solution is 1.5 x 10.293711 1.5 x y ( x) 4.969811e cosh(0.829156x) e sinh(0.829156x) 0.829156 0.0301886cos x 0.161006sin x e 0.829156 x e 0.829156 x e 0.829156 x e 0.829156 x e 1.5 x 4.969811 12.414685 2 2 0.030188cos x 0.161006sin x 1.5 x e 8.692248 e 0.829156 x 3.722437 e 0.829156 x 0.0301886 cos x 0.161006 sin xExample 10Solve d2y dy dy 2 5 3.125 y e x sin x , y (0) 5, (x 0) 3 dx 2 dx dxSolutionTaking the Laplace transform of both sides d2y dy L 2 2 5 3.125 y L e x sin x dx dxknowing
24. 24. d2y dy L s 2Y s sy 0 x 0 dx 2 dx dy L sY s y0 dx 1 L(e x sin x) ( s 1) 2 1we get dy 1 2 s 2Y ( s ) sy (0) (x 0) 5 sY ( s ) y (0) 3.125Y ( s) dx ( s 1) 2 1 1 2 s 2 Y ( s ) 5s 3 5 sY ( s ) 5 3.125Y ( s ) ( s 1) 2 1 1 s 2s 5 3.125 Y ( s ) 10 s 31 ( s 1) 2 1 1 s (2s 5) 3.125 Y ( s ) 10 s 31 ( s 1) 2 1 63 10 s 3 82 s 51s 2 2s 2 5s 3.125 Y ( s) s 2 2s 2 10s 3 51s 2 82s 63 Y ( s) s 2 2s 2 2s 2 5s 3.125Writing the expression for Y (s) in terms of partial fractions As B Cs D 10s 3 51s 2 82s 63 2s 2 5s 3.125 s2 2s 2 s 2 2s 2 2s 2 5s 3.125 2Cs 3 5Cs 2 3.125Cs 2 Ds 2 5 Ds 3.125D As3 2 As 2 2 As Bs 2 2 Bs 2 B 2s 2 5s 3.125 s 2 2s 2 10s 3 51s 2 82s 63 s 2 2s 2 2s 2 5s 3.125 2C A s3 5C 2 D 2 A B s 2 3.125C 5 D 2 A 2 B s 3.125D 2 B s 2 2s 2 2s 2 5s 3.125 10s 3 51s 2 82s 63 s 2 2s 2 2s 2 5s 3.125Equating terms of s 3 , s 2 , s 1 and s 0 gives four simultaneous linear equations 2C A 10 5C 2D 2 A B 51 3.125C 5D 2 A 2B 82 3.125D 2B 63The solution to the above four simultaneous linear equations is
25. 25. Primer for Ordinary Differential Equation A 10.442906 B 32.494809 C 0.221453 D 0.636678Then 10.442906s 32.494809 0.221453s 0.636678 Y ( s) 2 2s 5s 3.125 s 2 2s 2 2s 2 5s 3.125 2{( s 2 2.5s 1.5625 )} 2( s 1.25 ) 2 10 .442906 ( s 1.25 ) 19 .441176 0.221453 ( s 1) 0.415225 Y ( s) 2 2( s 1.25 ) ( s 1) 2 1 5.221453 ( s 1.25 ) 9.720588 0.221453 ( s 1) 0.415225 2 2 ( s 1.25 ) ( s 1.25 ) ( s 1) 2 1 ( s 1) 2 1Taking the inverse Laplace transform on both sides 5.221453 9.720588 L 1{Y ( s)} L 1 L1 ( s 1.25) ( s 1.25) 2 0.221453( s 1) 0.415225 L1 L1 ( s 1) 2 1 ( s 1) 2 1 1 1 5.221453L 1 9.720588L 1 ( s 1.25) ( s 1.25) 2 ( s 1) 1 0.221453L 1 0.415225L 1 ( s 1) 2 1 ( s 1) 2 1Since s a L1 2 2 e ax cosbx s a b b L1 2 2 e ax sin bx s a b 1 L1 e ax s a 1 e ax x n 1 L1 ( s a) n (n 1)!The complete solution is y( x) 5.221453e 1.25 x 9.720588e 1.25 x x 0.221453e x cos x 0.415225e x sin x e 1.25 x 5.221453 9.720588 x e x ( 0.221453 cos x 0.415225 sin x)