Second Order IVPs - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


ODE Steps for Second Order IVPs

 

Overview

Examples

Overview

• 

This help page gives a few examples of using the command ODESteps to solve second order initial value problems.

• 

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

Examples

withStudent:-ODEs:

ivp1ⅆ2ⅆx2yxⅆⅆxyxxⅇx=0,ⅆⅆxyxx=0|ⅆⅆxyxx=0=0,y0=1

ivp1ⅆ2ⅆx2yxⅆⅆxyxxⅇx=0,ⅆⅆxyxx=0|ⅆⅆxyxx=0=0,y0=1

(1)

ODEStepsivp1

Let's solveⅆ2ⅆx2yxⅆⅆxyxxⅇx=0,ⅆⅆxyxx=0|ⅆⅆxyxx=0=0,y0=1Highest derivative means the order of the ODE is2ⅆ2ⅆx2yxIsolate 2nd derivativeⅆ2ⅆx2yx=ⅆⅆxyx+xⅇxGroup terms withyxon the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearⅆ2ⅆx2yxⅆⅆxyx=xⅇxCharacteristic polynomial of homogeneous ODEr2r=0Factor the characteristic polynomialrr1=0Roots of the characteristic polynomialr=0,11st solution of the homogeneous ODEy1x=12nd solution of the homogeneous ODEy2x=ⅇxGeneral solution of the ODEyx=C1y1x+C2y2x+ypxSubstitute in solutions of the homogeneous ODEyx=C1+C2ⅇx+ypxFind a particular solutionypxof the ODEUse variation of parameters to findypherefxis the forcing functionypx=y1xy2xfxWy1x,y2xⅆx+y2xy1xfxWy1x,y2xⅆx,fx=xⅇxWronskian of solutions of the homogeneous equationWy1x,y2x=1ⅇx0ⅇxCompute WronskianWy1x,y2x=ⅇxSubstitute functions into equation forypxypx=xⅇxⅆx+ⅇxxⅆxCompute integralsypx=ⅇx1x+12x2Substitute particular solution into general solution to ODEyx=C1+C2ⅇx+ⅇx1x+12x2Check validity of solutionyx=_C1+_C2ⅇx+ⅇx1x+12x2Use initial conditiony0=11=_C1+_C2+1Compute derivative of the solutionⅆⅆxyx=_C2ⅇx+ⅇx1x+12x2+x1ⅇxUse the initial conditionⅆⅆxyxx=0|ⅆⅆxyxx=0=00=_C2Solve for_C1and_C2_C1=0,_C2=0Substitute constant values into general solution and simplifyyx=ⅇxx22x+22Solution to the IVPyx=ⅇxx22x+22

(2)

ivp2ⅆ2ⅆx2yx+5ⅆⅆxyx2yx=0,ⅆⅆxyxx=1|ⅆⅆxyxx=1=3,y1=1

ivp2ⅆ2ⅆx2yx+5ⅆⅆxyx2yx=0,ⅆⅆxyxx=1|ⅆⅆxyxx=1=−3,y1=1

(3)

ODEStepsivp2

Let's solveⅆ2ⅆx2yx+5ⅆⅆxyx2yx=0,ⅆⅆxyxx=1|ⅆⅆxyxx=1=−3,y1=1Highest derivative means the order of the ODE is2ⅆ2ⅆx2yxDefine new dependent variableuux=Computeⅆ2ⅆx2yx=Use chain rule on the lhs=Substitute in the definition ofuuy=Make substitutionsⅆⅆxyx=uy,ⅆ2ⅆx2yx=uyⅆⅆyuyto reduce order of ODEuyⅆⅆyuy+5uy2y=0Separate variablesⅆⅆyuyuy=5yIntegrate both sides with respect toyⅆⅆyuyuyⅆy=5yⅆy+C1Evaluate integrallnuy=5lny+C1Solve foruyuy=ⅇC1y5Solve 1st ODE foruyuy=ⅇC1y5Revert to original variables with substitutionuy=ⅆⅆxyx,y=yxⅆⅆxyx=ⅇC1yx5Separate variablesⅆⅆxyxyx5=ⅇC1Integrate both sides with respect toxⅆⅆxyxyx5ⅆx=ⅇC1ⅆx+C2Evaluate integralyx66=ⅇC1x+C2Solve foryxyx=6ⅇC1x+6C216,yx=6ⅇC1x+6C216Check validity of solutionyx=6ⅇc__1x+6_C216Use initial conditiony1=11=6ⅇc__1+6_C216Compute derivative of the solutionⅆⅆxyx=ⅇc__16ⅇc__1x+6_C256Use the initial conditionⅆⅆxyxx=1|ⅆⅆxyxx=1=−3−3=ⅇc__16ⅇc__1+6_C256Solve forc__1and_C2c__1=ln3+Iπ,_C2=196Substitute constant values into general solution and simplifyyx=18x+1916Check validity of solutionyx=6ⅇc__1x+6_C216Use initial conditiony1=11=6ⅇc__1+6_C216Compute derivative of the solutionⅆⅆxyx=ⅇc__16ⅇc__1x+6_C256Use the initial conditionⅆⅆxyxx=1|ⅆⅆxyxx=1=−3−3=ⅇc__16ⅇc__1+6_C256Solve forc__1and_C2The solution does not satisfy the initial conditionsSolution to the IVPyx=18x+1916

(4)

ivp3ⅆ2ⅆx2yxⅆⅆxyx6yx=0,ⅆⅆxyxx=1|ⅆⅆxyxx=1=a,y1=0

ivp3ⅆ2ⅆx2yxⅆⅆxyx6yx=0,ⅆⅆxyxx=1|ⅆⅆxyxx=1=a,y1=0

(5)

ODEStepsivp3

Let's solveⅆ2ⅆx2yxⅆⅆxyx6yx=0,ⅆⅆxyxx=1|ⅆⅆxyxx=1=a,y1=0Highest derivative means the order of the ODE is2ⅆ2ⅆx2yxCharacteristic polynomial of ODEr2r6=0Factor the characteristic polynomialr+2r3=0Roots of the characteristic polynomialr=−2,31st solution of the ODEy1x=ⅇ2x2nd solution of the ODEy2x=ⅇ3xGeneral solution of the ODEyx=C1y1x+C2y2xSubstitute in solutionsyx=C1ⅇ2x+C2ⅇ3xCheck validity of solutionyx=c__1ⅇ2x+_C2ⅇ3xUse initial conditiony1=00=c__1ⅇ−2+_C2ⅇ3Compute derivative of the solutionⅆⅆxyx=2c__1ⅇ2x+3_C2ⅇ3xUse the initial conditionⅆⅆxyxx=1|ⅆⅆxyxx=1=aa=2c__1ⅇ−2+3_C2ⅇ3Solve forc__1and_C2c__1=a5ⅇ−2,_C2=a5ⅇ3Substitute constant values into general solution and simplifyyx=aⅇ22xⅇ3+3x5Solution to the IVPyx=aⅇ22xⅇ3+3x5

(6)

ivp4x2ⅆ2ⅆx2yx4xⅆⅆxyx+2yx=0,ⅆⅆxyxx=1|ⅆⅆxyxx=1=10,y1=1

ivp4x2ⅆ2ⅆx2yx4xⅆⅆxyx+2yx=0,ⅆⅆxyxx=1|ⅆⅆxyxx=1=10,y1=−1

(7)

ODEStepsivp4

Let's solvex2ⅆ2ⅆx2yx4xⅆⅆxyx+2yx=0,ⅆⅆxyxx=1|ⅆⅆxyxx=1=10,y1=−1Highest derivative means the order of the ODE is2ⅆ2ⅆx2yxIsolate 2nd derivativeⅆ2ⅆx2yx=2yxx2+4ⅆⅆxyxxGroup terms withyxon the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearⅆ2ⅆx2yx4ⅆⅆxyxx+2yxx2=0Multiply by denominators of the ODEx2ⅆ2ⅆx2yx4xⅆⅆxyx+2