Second Order ODEs - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


ODE Steps for Second Order ODEs

 

Overview

Examples

Overview

• 

This help page gives a few examples of using the command ODESteps to solve second order ordinary differential equations.

• 

See Student[ODEs][ODESteps] for a general description of the command ODESteps and its calling sequence.

Examples

> 

with⁡Student:-ODEs:

> 

ode1≔2⁢x⁢diff⁡y⁡x,x−9⁢x2+2⁢diff⁡y⁡x,x+x2+1⁢diff⁡y⁡x,x,x=0

ode1≔2⁢x⁢ⅆⅆxy⁡x−9⁢x2+2⁢ⅆⅆxy⁡x+x2+1⁢ⅆ2ⅆx2y⁡x=0

(1)
> 

ODESteps⁡ode1

Let's solve2⁢x⁢ⅆⅆxy⁡x−9⁢x2+2⁢ⅆⅆxy⁡x+x2+1⁢ⅆ2ⅆx2y⁡x=0•Highest derivative means the order of the ODE is2ⅆ2ⅆx2y⁡x•Make substitutionu=ⅆⅆxy⁡xto reduce order of ODE2⁢x⁢u⁡x−9⁢x2+2⁢u⁡x+x2+1⁢ⅆⅆxu⁡x=0▫Check if ODE is exact◦ODE is exact if the lhs is the total derivative of aC2functionⅆⅆxG⁡x,u⁡x=0◦Compute derivative of lhs∂∂xG⁡x,u+∂∂uG⁡x,u⁢ⅆⅆxu⁡x=0◦Evaluate derivatives2⁢x=2⁢x◦Condition met, ODE is exact•Exact ODE implies solution will be of this formG⁡x,u=c__1,M⁡x,u=∂∂xG⁡x,u,N⁡x,u=∂∂uG⁡x,u•Solve forG⁡x,uby integratingM⁡x,uwith respect toxG⁡x,u=∫2⁢u⁢x−9⁢x2ⅆx+_F1⁡u•Evaluate integralG⁡x,u=x2⁢u−3⁢x3+_F1⁡u•Take derivative ofG⁡x,uwith respect touN⁡x,u=∂∂uG⁡x,u•Compute derivativex2+2⁢u+1=x2+ⅆⅆu_F1⁡u•Isolate forⅆⅆu_F1⁡uⅆⅆu_F1⁡u=2⁢u+1•Solve for_F1⁡u_F1⁡u=u2+u•Substitute_F1⁡uinto equation forG⁡x,uG⁡x,u=x2⁢u−3⁢x3+u2+u•SubstituteG⁡x,uinto the solution of the ODEx2⁢u−3⁢x3+u2+u=c__1•Solve foru⁡xu⁡x=−x22−12−x4+12⁢x3+2⁢x2+4⁢c__1+12,u⁡x=−x22−12+x4+12⁢x3+2⁢x2+4⁢c__1+12•Solve 1st ODE foru⁡xu⁡x=−x22−12−x4+12⁢x3+2⁢x2+4⁢c__1+12•Make substitutionu=ⅆⅆxy⁡xⅆⅆxy⁡x=−x22−12−x4+12⁢x3+2⁢x2+4⁢c__1+12•Integrate both sides to solve fory⁡x∫ⅆⅆxy⁡xⅆx=∫−x22−12−x4+12⁢x3+2⁢x2+4⁢c__1+12ⅆx+c__2•Compute lhsy⁡x=∫−x22−12−x4+12⁢x3+2⁢x2+4⁢c__1+12ⅆx+c__2•Solve 2nd ODE foru⁡xu⁡x=−x22−12+x4+12⁢x3+2⁢x2+4⁢c__1+12•Make substitutionu=ⅆⅆxy⁡xⅆⅆxy⁡x=−x22−12+x4+12⁢x3+2⁢x2+4⁢c__1+12•Integrate both sides to solve fory⁡x∫ⅆⅆxy⁡xⅆx=∫−x22−12+x4+12⁢x3+2⁢x2+4⁢c__1+12ⅆx+c__2•Compute lhsy⁡x=∫−x22−12+x4+12⁢x3+2⁢x2+4⁢c__1+12ⅆx+c__2

(2)
> 

ode2≔diff⁡y⁡x,x,x−diff⁡y⁡x,x−x⁢exp⁡x=0

ode2≔ⅆ2ⅆx2y⁡x−ⅆⅆxy⁡x−x⁢ⅇx=0

(3)
> 

ODESteps⁡ode2

Let's solveⅆ2ⅆx2y⁡x−ⅆⅆxy⁡x−x⁢ⅇx=0•Highest derivative means the order of the ODE is2ⅆ2ⅆx2y⁡x•Isolate 2nd derivativeⅆ2ⅆx2y⁡x=ⅆⅆxy⁡x+x⁢ⅇx•Group terms withy⁡xon the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearⅆ2ⅆx2y⁡x−ⅆⅆxy⁡x=x⁢ⅇx•Characteristic polynomial of homogeneous ODEr2−r=0•Factor the characteristic polynomialr⁢r−1=0•Roots of the characteristic polynomialr=0,1•1st solution of the homogeneous ODEy1⁡x=1•2nd solution of the homogeneous ODEy2⁡x=ⅇx•General solution of the ODEy⁡x=c__1⁢y1⁡x+c__2⁢y2⁡x+yp⁡x•Substitute in solutions of the homogeneous ODEy⁡x=c__1+c__2⁢ⅇx+yp⁡x▫Find a particular solutionyp⁡xof the ODE◦Use variation of parameters to findypheref⁡xis the forcing functionyp⁡x=−y1⁡x⁢∫y2⁡x⁢f⁡xW⁡y1⁡x,y2⁡xⅆx+y2⁡x⁢∫y1⁡x⁢f⁡xW⁡y1⁡x,y2⁡xⅆx,f⁡x=x⁢ⅇx◦Wronskian of solutions of the homogeneous equationW⁡y1⁡x,y2⁡x=1ⅇx0ⅇx◦Compute WronskianW⁡y1⁡x,y2⁡x=ⅇx◦Substitute functions into equation foryp⁡xyp⁡x=−∫x⁢ⅇxⅆx+ⅇx⁢∫xⅆx◦Compute integralsyp⁡x=ⅇx⁢1−x+12⁢x2•Substitute particular solution into general solution to ODEy⁡x=c__1+c__2⁢ⅇx+ⅇx⁢1−x+12⁢x2

(4)
> 

ode3≔diff⁡y⁡x,x,x+5⁢diff⁡y⁡x,x2y⁡x=0

ode3≔ⅆ2ⅆx2y⁡x+5⁢ⅆⅆxy⁡x2y⁡x=0

(5)
> 

ODESteps⁡ode3

Let's solveⅆ2ⅆx2y⁡x+5⁢ⅆⅆxy⁡x2y⁡x=0•Highest derivative means the order of the ODE is2ⅆ2ⅆx2y⁡x•Define new dependent variableuu⁡x=ⅆⅆxy⁡x•Computeⅆ2ⅆx2y⁡xⅆⅆxu⁡x=ⅆ2ⅆx2y⁡x•Use chain rule on the lhsⅆⅆxy⁡x⁢ⅆⅆyu⁡y=ⅆ2ⅆx2y⁡x•Substitute in the definition ofuu⁡y⁢ⅆⅆyu⁡y=ⅆ2ⅆx2y⁡x•Make substitutionsⅆⅆxy⁡x=u⁡y,ⅆ2ⅆx2y⁡x=u⁡y⁢ⅆⅆyu⁡yto reduce order of ODEu⁡y⁢ⅆⅆyu⁡y+5⁢u⁡y2y=0•Solve for the highest derivativeⅆⅆyu⁡y=−5⁢u⁡yy•Separate variablesⅆⅆyu⁡yu⁡y=−5y•Integrate both sides with respect toy∫ⅆⅆyu⁡yu⁡yⅆy=∫−5yⅆy+c__1•Evaluate integralln⁡u⁡y=−5⁢ln⁡y+c__1•Solve foru⁡yu⁡y=ⅇc__1y5•Redefine the integration constant(s)u⁡y=c__1y5•Solve 1st ODE foru⁡yu⁡y=c__1y5•Revert to original variables with substitutionu⁡y=ⅆⅆxy⁡x,y=y⁡xⅆⅆxy⁡x=c__1y⁡x5•Solve for the highest derivativeⅆⅆxy⁡x=c__1y⁡x5•Separate variablesⅆⅆxy⁡x⁢y⁡x5=c__1•Integrate both sides with respect tox∫ⅆⅆxy⁡x⁢y⁡x5ⅆx=∫c__1ⅆx+c__2•Evaluate integraly⁡x66=c__1⁢x+c__2•Solve fory⁡xy⁡x=6⁢c__1⁢x+6⁢c__216,y⁡x=−12−I⁢32⁢6⁢c__1⁢x+6⁢c__216,y⁡x=−12+I⁢32⁢6⁢c__1⁢x+6⁢c__216,y⁡x=12−I⁢32⁢6⁢c__1⁢x+6⁢c__216,y⁡x=12+I⁢32⁢6⁢c__1⁢x+6⁢c__216,y⁡x=−6⁢c__1⁢x+6⁢c__216•Simplifyy⁡x=6⁢c__1⁢x+6⁢c__216,y⁡x=−6⁢c__1⁢x+6⁢c__216,y⁡x=−1+I⁢3⁢6⁢c__1⁢x+6⁢c__2162,y⁡x=1+I⁢3⁢6⁢c__1⁢x+6⁢c__2162,y⁡x=−I⁢3−1⁢6⁢c__1⁢x+6⁢c__2162,y⁡x=I⁢3−1⁢6⁢c__1⁢x+6⁢c__2162•Redefine the integration constant(s)y⁡x=6⁢c__1⁢x+c__216,y⁡x=−6⁢c__1⁢x+c__216,y⁡x=−1+I⁢3⁢6⁢c__1⁢x+c__2162,y⁡x=1+I⁢3⁢6⁢c__1⁢x+c__2162,y⁡x=−I⁢3−1⁢6⁢c__1⁢x+c__2162,y⁡x=I⁢3−1⁢6⁢c__1⁢x+c__2162•Redefine the integration constant(s)y⁡x=c__1⁢x+c__216,y⁡x=c__1⁢x+c__216,y⁡x=c__2⁢c__1⁢x+116

(6)
> 

ode4≔diff⁡y⁡x,x,x−diff⁡y⁡x,x−6⁢y⁡x=0

ode4≔ⅆ2ⅆx2y⁡x−ⅆⅆxy⁡x−6⁢y⁡x=0

(7)
> 

ODESteps⁡ode4

Let's solveⅆ2ⅆx2y⁡x−ⅆⅆxy⁡x−6⁢y⁡x=0•Highest derivative means the order of the ODE is2ⅆ2ⅆx2y⁡x•Characteristic polynomial of ODEr2−r−6=0•Factor the characteristic polynomialr+2⁢r−3=0•Roots of the characteristic polynomialr=−2,3•1st solution of the ODEy1⁡x=ⅇ−2⁢x•2nd solution of the ODEy2⁡x=ⅇ3⁢x•General solution of the ODEy⁡x=c__1⁢y1⁡x+c__2⁢y2⁡x•Substitute in solutionsy⁡x=c__1⁢ⅇ−2⁢x+c__2⁢ⅇ3⁢x

(8)
> 

ode5≔diff⁡y⁡x,x,x−diff⁡y⁡x,x=x2+6⁢y⁡x

ode5≔ⅆ2ⅆx2y⁡x−ⅆⅆxy⁡x=x2+6⁢y⁡x

(9)
> 

ODESteps⁡ode5

Let's solveⅆ2ⅆx2y⁡x−ⅆⅆxy⁡x=x2+6⁢y⁡x•Highest derivative means the order of the ODE is2ⅆ2ⅆx2y⁡x•Isolate 2nd derivativeⅆ2ⅆx2y⁡x=ⅆⅆxy⁡x+x2+6⁢y⁡x•Group terms withy⁡xon the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearⅆ2ⅆx2y⁡x−ⅆⅆxy⁡x−6⁢y⁡x=x2•Characteristic polynomial of homogeneous ODEr2−r−6=0•Factor the characteristic polynomialr+2⁢r−3=0•Roots of the characteristic polynomialr=−2,3•1st solution of the homogeneous ODEy1⁡x=ⅇ−2⁢x•2nd solution of the homogeneous ODEy2⁡x=ⅇ3⁢x•General solution of the ODEy⁡x=c__1⁢y1⁡x+c__2⁢y2⁡x+yp⁡x•Substitute in solutions of the homogeneous ODEy⁡x=c__1⁢ⅇ−2⁢x+c__2⁢ⅇ3⁢x+yp⁡x▫Find a particular solutionyp⁡xof the ODE◦Use variation of parameters to findypheref⁡xis the forcing functionyp⁡x=−y1⁡x⁢∫y2⁡x⁢f⁡xW⁡y1⁡x,y2⁡xⅆx+y2⁡x⁢∫y1⁡x⁢f⁡xW⁡y1⁡x,y2⁡xⅆx,f⁡x=x2◦Wronskian of solutions of the homogeneous equationW⁡y1⁡x,y2⁡x=ⅇ−2⁢xⅇ3⁢x−2⁢ⅇ−2⁢x3⁢ⅇ3⁢x◦Compute WronskianW⁡y1⁡x,y2⁡x=5⁢ⅇx◦Substitute functions into equation foryp⁡xyp⁡x=∫x2⁢ⅇ−3⁢xⅆx⁢ⅇ5⁢x−∫x2⁢ⅇ2⁢xⅆx⁢ⅇ−2⁢x5◦Compute integralsyp⁡x=−16⁢x2+118⁢x−7108•Substitute particular solution into general solution to ODEy⁡x=c__1⁢ⅇ−2⁢x+c__2⁢ⅇ3⁢x−x26+x18−7108

(10)
> 

ode6≔diff⁡y⁡x,x,x+4⁢y⁡x=−4⁢diff⁡y⁡x,x

ode6≔ⅆ2ⅆx2y⁡x+4⁢y⁡x=−4⁢ⅆⅆxy⁡x

(11)
> 

ODESteps⁡ode6

Let's solveⅆ2ⅆx2y⁡x+4⁢y⁡x=−4⁢ⅆⅆxy⁡x•Highest derivative means the order of the ODE is2ⅆ2ⅆx2y⁡x•Isolate 2nd derivativeⅆ2ⅆx2y⁡x=−4⁢y⁡x−4⁢ⅆⅆxy⁡x•Group terms withy⁡xon the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearⅆ2ⅆx2y⁡x+4⁢y⁡x+4⁢ⅆⅆxy⁡x=0•Characteristic polynomial of ODEr2+4⁢r+4=0•Factor the characteristic polynomialr+22=0•Root of the characteristic polynomialr=−2•1st solution of the ODEy1⁡x=ⅇ−2⁢x•Repeated root, multiplyy1⁡xbyxto ensure linear independencey2⁡x=x⁢ⅇ−2⁢x•General solution of the ODEy⁡x=c__1⁢y1⁡x+c__2⁢y2⁡x•Substitute in solutionsy⁡x=c__1⁢ⅇ−2⁢x+c__2⁢x⁢ⅇ−2⁢x

(12)
> 

ode7≔5⁢diff⁡y⁡x,x,x+20⁢y⁡x+15⁢sin⁡x=−20⁢diff⁡y⁡x,x

ode7≔5⁢ⅆ2ⅆx2y⁡x+20⁢y⁡x+15⁢sin⁡x=−20⁢ⅆⅆxy⁡x

(13)
> 

ODESteps⁡ode7

Let's solve5⁢ⅆ2ⅆx2y⁡x+20⁢y⁡x+15⁢sin⁡x=−20⁢ⅆⅆxy⁡x•Highest derivative means the order of the ODE is2ⅆ2ⅆx2y⁡x•Isolate 2nd derivativeⅆ2ⅆx2y⁡x=−4⁢y⁡x−3⁢sin⁡x−4⁢ⅆⅆxy⁡x•Group terms withy⁡xon the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearⅆ2ⅆx2y⁡x+4⁢y⁡x+4⁢ⅆⅆxy⁡x=−3⁢sin⁡x•Characteristic polynomial of homogeneous ODEr2+4⁢r+4=0•Factor the characteristic polynomialr+22=0•Root of the characteristic polynomialr=−2•1st solution of the homogeneous ODEy1⁡x=ⅇ−2⁢x•Repeated root, multiplyy1⁡xbyxto ensure linear independencey2⁡x=x⁢ⅇ−2⁢x•General solution of the ODEy⁡x=c__1⁢y1⁡x+c__2⁢y2⁡x+yp⁡x•Substitute in solutions of the homogeneous ODEy⁡x=c__1⁢ⅇ−2⁢x+c__2⁢x⁢ⅇ−2⁢x+yp⁡x▫Find a particular solutionyp⁡xof the ODE◦Use variation of parameters to findypheref⁡xis the forcing functionyp⁡x=−y1⁡x⁢∫y2⁡x⁢f⁡xW⁡y1⁡x,y2⁡xⅆx+y2⁡x⁢∫y1⁡x⁢f⁡xW⁡y1⁡x,y2⁡xⅆx,f⁡x=−3⁢sin⁡x◦Wronskian of solutions of the homogeneous equationW⁡y1⁡x,y2⁡x=ⅇ−2⁢xx⁢ⅇ−2⁢x−2⁢ⅇ−2⁢xⅇ−2⁢x−2⁢x⁢ⅇ−2⁢x◦Compute WronskianW⁡y1⁡x,y2⁡x=ⅇ−4⁢x◦Substitute functions into equation foryp⁡xyp⁡x=3⁢ⅇ−2⁢x⁢∫x⁢ⅇ2⁢x⁢sin⁡xⅆx−x⁢∫ⅇ2⁢x⁢sin⁡xⅆx◦Compute integralsyp⁡x=12⁢cos⁡x25−9⁢sin⁡x25•Substitute particular solution into general solution to ODEy⁡x=c__1⁢ⅇ−2⁢x+c__2⁢x⁢ⅇ−2⁢x+12⁢cos⁡x25−9⁢sin⁡x25

(14)
> 

ode8≔diff⁡y⁡x,x,x+2⁢y⁡x+2⁢diff⁡y⁡x,x=0

ode8≔ⅆ2ⅆx2y⁡x+2⁢y⁡x+2⁢ⅆⅆxy⁡x=0

(15)
> 

ODESteps⁡ode8

Let's solveⅆ2ⅆx2y⁡x+2⁢y⁡x+2⁢ⅆⅆxy⁡x=0•Highest derivative means the order of the ODE is2ⅆ2ⅆx2y⁡x•Characteristic polynomial of ODEr2+2⁢r+2=0•Use quadratic formula to solve forrr=−2±−42•Roots of the characteristic polynomialr=−1−I,−1+I•1st solution of the ODEy1⁡x=ⅇ−x⁢cos⁡x•2nd solution of the ODEy2⁡x=ⅇ−x⁢sin⁡x•General solution of the ODEy⁡x=c__1⁢y1⁡x+c__2⁢y2⁡x•Substitute in solutionsy⁡x=c__1⁢ⅇ−x⁢cos⁡x+c__2⁢ⅇ−x⁢sin⁡x

(16)
> 

ode9≔diff⁡y⁡x,x,x+2⁢y⁡x−2⁢diff⁡y⁡x,x=exp⁡x

ode9≔ⅆ2ⅆx2y⁡x+2⁢y⁡x−2⁢ⅆⅆxy⁡x=ⅇx

(17)
> 

ODESteps⁡ode9

Let's solveⅆ2ⅆx2y⁡x+2⁢y⁡x−2⁢ⅆⅆxy⁡x=ⅇx•Highest derivative means the order of the ODE is2ⅆ2ⅆx2y⁡x•Characteristic polynomial of homogeneous ODEr2−2⁢r+2=0•Use quadratic formula to solve forrr=2±−42•Roots of the characteristic polynomialr=1−I,1+I•1st solution of the homogeneous ODEy1⁡x=ⅇx⁢cos⁡x•2nd solution of the homogeneous ODEy2⁡x=ⅇx⁢sin⁡x•General solution of the ODEy⁡x=c__1⁢y1⁡x+c__2⁢y2⁡x+yp⁡x•Substitute in solutions of the homogeneous ODEy⁡x=c__1⁢ⅇx⁢cos⁡x+c__2⁢ⅇx⁢sin⁡x+yp⁡x▫Find a particular solutionyp⁡xof the ODE◦Use variation of parameters to findypheref⁡xis the forcing functionyp⁡x=−y1⁡x⁢∫y2⁡x⁢f⁡xW⁡y1⁡x,y2⁡xⅆx+y2⁡x⁢∫y1⁡x⁢f⁡xW⁡y1⁡x,y2⁡xⅆx,f⁡x=ⅇx◦Wronskian of solutions of the homogeneous equationW⁡y1⁡x,y2⁡x=ⅇx⁢cos⁡xⅇx⁢sin⁡xⅇx⁢cos⁡x−ⅇx⁢sin⁡xⅇx⁢sin⁡x+ⅇx⁢cos⁡x◦Compute WronskianW⁡y1⁡x,y2⁡x=ⅇ2⁢x◦Substitute functions into equation foryp⁡xyp⁡x=ⅇx⁢−∫sin⁡xⅆx⁢cos⁡x+∫cos⁡xⅆx⁢sin⁡x◦Compute integralsyp⁡x=ⅇx•Substitute particular solution into general solution to ODEy⁡x=c__1⁢ⅇx⁢cos⁡x+c__2⁢ⅇx⁢sin⁡x+ⅇx

(18)

See Also

diff

Int

Student

Student[ODEs]

Student[ODEs][ODESteps]