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

Online Help

All Products    Maple    MapleSim


Student[ODEs]

  

ODESteps

  

Show a step-by-step solution process for ODEs, IVPs, or systems

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

ODESteps(ODE)

ODESteps(ODE, y(x))

ODESteps(sys)

Parameters

ODE

-

an ordinary differential equation

y

-

name ; the dependent variable

x

-

name ; the independent variable

sys

-

set ; an ODE system including initial values

Description

• 

The ODESteps() command solves an ordinary differential equation (ODE) or system of ODEs.

• 

The input may include a corresponding set of initial values, which would make it an initial value problem (IVP).

• 

The output shows a series of steps in the solving process.

• 

The following types of ODEs and ODE systems and/or solving methods are considered:

Cauchy-Euler Equations

First Order IVPs

First Order ODEs

Second Order IVPs

Second Order ODEs

Series Solutions

Special Function Solutions

Systems of ODEs

Systems of ODEs with IVP

 

 

 

Examples

withStudentODEs:

A first order ODE:

ode1t2zt+1+zt2t1diffzt,t=0

ode1t2zt+1+zt2t1ⅆⅆtzt=0

(1)

ODEStepsode1

Let's solvet2zt+1+zt2t1ⅆⅆtzt=0Highest derivative means the order of the ODE is1ⅆⅆtztSeparate variablesⅆⅆtztzt2zt+1=t2t1Integrate both sides with respect totⅆⅆtztzt2zt+1ⅆt=t2t1ⅆt+C1Evaluate integralzt22zt+lnzt+1=t22tlnt1+C1

(2)

A first order IVP:

ivp1t2zt+1+zt2t1diffzt,t=0,z3=1

ivp1t2zt+1+zt2t1ⅆⅆtzt=0,z3=1

(3)

ODEStepsivp1

Let's solvet2zt+1+zt2t1ⅆⅆtzt=0,z3=1Highest derivative means the order of the ODE is1ⅆⅆtztSeparate variablesⅆⅆtztzt2zt+1=t2t1Integrate both sides with respect totⅆⅆtztzt2zt+1ⅆt=t2t1ⅆt+C1Evaluate integralzt22zt+lnzt+1=t22tlnt1+C1Use initial conditionz3=112+ln2=152ln2+C1Solve for_C1C1=7+2ln2Substitute_C1=7+2ln2into general solution and simplifyzt22zt+lnzt+1=t22tlnt1+7+2ln2Solution to the IVPzt22zt+lnzt+1=t22tlnt1+7+2ln2

(4)

A second order ODE:

ode22xdiffyx,x9x2+2diffyx,x+x2+1diffyx,x,x=0

ode22xⅆⅆxyx9x2+2ⅆⅆxyx+x2+1ⅆ2ⅆx2yx=0

(5)

ODEStepsode2

Let's solve2xⅆⅆxyx9x2+2ⅆⅆxyx+x2+1ⅆ2ⅆx2yx=0Highest derivative means the order of the ODE is2ⅆ2ⅆx2yxMake substitutionu=ⅆⅆxyxto reduce order of ODE2xux9x2+2ux+x2+1ⅆⅆxux=0Check if ODE is exactODE is exact if the lhs is the total derivative of aC2functionⅆⅆxFx,ux=0Compute derivative of lhsxFx,u+uFx,uⅆⅆxux=0Evaluate derivatives2x=2xCondition met, ODE is exactExact ODE implies solution will be of this formFx,u=C1,Mx,u=xFx,u,Nx,u=uFx,uSolve forFx,uby integratingMx,uwith respect toxFx,u=2xu9x2ⅆx+_F1uEvaluate integralFx,u=x2u3x3+_F1uTake derivative ofFx,uwith respect touNx,u=uFx,uCompute derivativex2+2u+1=x2+ⅆⅆu_F1uIsolate forⅆⅆu_F1uⅆⅆu_F1u=2u+1Solve for_F1u_F1u=u2+uSubstitute_F1uinto equation forFx,uFx,u=x2u3x3+u2+uSubstituteFx,uinto the solution of the ODEx2u3x3+u2+u=C1Solve foruxux=x2212x4+12x3+2x2+4C1+12,ux=x2212+x4+12x3+2x2+4C1+12Solve 1st ODE foruxux=x2212x4+12x3+2x2+4C1+12Make substitutionu=ⅆⅆxyxⅆⅆxyx=x2212x4+12x3+2x2+4C1+12Integrate both sides to solve foryxⅆⅆxyxⅆx=x2212x4+12x3+2x2+4C1+12ⅆx+C2Compute lhsyx=x2212x4+12x3+2x2+4C1+12ⅆx+C2Solve 2nd ODE foruxux=x2212+x4+12x3+2x2+4C1+12Make substitutionu=ⅆⅆxyxⅆⅆxyx=x2212+x4+12x3+2x2+4C1+12Integrate both sides to solve foryxⅆⅆxyxⅆx=x2212+x4+12x3+2x2+4C1+12ⅆx+C2Compute lhsyx=x2212+x4+12x3+2x2+4C1+12ⅆx+C2

(6)

A second order IVP:

ivp2diffyx,x,xdiffyx,xxexpx=0,evaldiffyx,x,x=0=0,y0=1

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

(7)

ODEStepsivp2

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=c__1+_C2ⅇx+ⅇx1x+12x2Use initial conditiony0=11=c__1+_C2+1Compute derivative of the solutionⅆⅆxyx=_C2ⅇx+ⅇx1x+12x2+x1ⅇxUse the initial conditionⅆⅆxyxx=0|ⅆⅆxyxx=0=00=_C2Solve forc__1and_C2c__1=0,_C2=0Substitute constant values into general solution and simplifyyx=ⅇxx22x+22Solution to the IVPyx=ⅇxx22x+22

(8)

An Cauchy-Euler equation:

ECx2diffyx,x,x4xdiffyx,x+2yx=0

ECx2ⅆ2ⅆx2yx4xⅆⅆxyx+2yx=0

(9)

ODEStepsEC

Let's solvex2ⅆ2ⅆx2yx4xⅆⅆxyx+2yx=0Highest 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+2yx=0Make a change of variablest=lnxSubstitute the change of variables back into the ODECalculate the1stderivative ofywith respect tox, using the chain ruleⅆⅆxyx=ⅆⅆtytⅆⅆxtxCompute derivativeⅆⅆxyx=ⅆⅆtytxCalculate the2ndderivative ofywith respect tox, using the chain ruleⅆ2ⅆx2yx=ⅆ2ⅆt2ytⅆⅆxtx2+ⅆ2ⅆx2txⅆⅆtytCompute derivativeⅆ2ⅆx2yx=ⅆ2ⅆt2ytx2ⅆⅆtytx2Substitute the change of variables back into the ODEx2ⅆ2ⅆt2ytx2ⅆⅆtytx24ⅆⅆtyt+2yt=0Simplifyⅆ2ⅆt2yt5ⅆⅆtyt+2yt=0Characteristic polynomial of ODEr25r+2=0Use quadratic formula to solve forrr=5±172Roots of the characteristic polynomialr=52172,52+1721st solution of the ODEy1t=ⅇ52172t2nd solution of the ODEy2t=ⅇ52+172tGeneral solution of the ODEyt=C1y1t+C2y2tSubstitute in solutionsyt=C1ⅇ52172t+C2ⅇ52+172tChange variables back usingt=lnxyx=C1ⅇ52172lnx+C2ⅇ52+172lnxSimplifyyx=x52x172C1+x172C2

(10)

Finding a series solution:

series_odediffyx,x,x+xdiffyx,x+yx=0

series_odeⅆ2ⅆx2yx+xⅆⅆxyx+yx=0

(11)

ODEStepsseries_ode

Let's solveⅆ2ⅆx2yx+xⅆⅆxyx+yx=0Highest derivative means the order of the ODE is2ⅆ2ⅆx2yxAssume series solution foryxyx=k=0akxkRewrite DE with series expansionsConvertxⅆⅆxyxto series expansionxⅆⅆxyx=k=0akkxkConvertⅆ2ⅆx2yxto series expansionⅆ2ⅆx2yx=k=2akkk1xk2Shift index usingk->k+2ⅆ2ⅆx2yx=k=0ak+2k+2k+1xkRewrite DE with series expansionsk=0ak+2k+2k+1+akk+1xk=0Each term in the series must be 0, giving the recursion relationk+1ak+2k+2+ak=0Recursion relation that defines the series solution to the ODEyx=k=0akxk,ak+2=akk+2

(12)

Solving an ODE with special function solution:

Bessel_odex2diffyx,x,x+4xdiffyx,x+25x29yx=0

Bessel_odex2ⅆ2ⅆx2yx+4xⅆⅆxyx+25x29yx=0

(13)

ODEStepsBessel_ode

Let's solvex2ⅆ2ⅆx2yx+4xⅆⅆxyx+25x29yx=0Highest derivative means the order of the ODE is2ⅆ2ⅆx2yxIsolate 2nd derivativeⅆ2ⅆx2yx=25x29yxx24ⅆⅆxyxxGroup terms withyxon the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearⅆ2ⅆx2yx+4ⅆⅆxyxx+25x29yxx2=0Simplify ODEx2ⅆ2ⅆx2yx+25yxx2+4xⅆⅆxyx9yx=0Make a change of variablest=5xComputeⅆⅆxyxⅆⅆxyx=5ⅆⅆtytCompute second derivativeⅆ2ⅆx2yx=25ⅆ2ⅆt2ytApply change of variables to the ODEt2ⅆ2ⅆt2yt+ytt2+4tⅆⅆtyt9yt=0Make a change of variablesyt=utt32Computeⅆⅆtytⅆⅆtyt=3ut2t52+ⅆⅆtutt32Computeⅆ2ⅆt2ytⅆ2ⅆt2yt=15ut4t723ⅆⅆtutt52+ⅆ2ⅆt2utt32Apply change of variables to the ODEutt2+ⅆ2ⅆt2utt2+ⅆⅆtutt45ut4=0ODE is now of the Bessel formSolution to Bessel ODEut=C1BesselJ352,t+C2BesselY352,tMake the change fromyxback toytyt=C1BesselJ352,t+C2BesselY352,tt32Make the change fromtback toxyx=C1BesselJ352,5x+C2BesselY352,5x525x32

(14)

Solving a third order ODE by writing it as a system:

ode3diffyx,x,x,x+3diffyx,x,x+4diffyx,x+2yx=0

ode3ⅆ3ⅆx3yx+3ⅆ2ⅆx2yx+4ⅆⅆxyx+2yx=0

(15)

ODEStepsode3

See Also

DEtools/odeadvisor

dsolve

Student

Student[ODEs]