Systems of ODEs with IVP - 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 Systems of ODEs with IVP

 

Overview

Examples

Overview

• 

This help page gives a few examples of using the command ODESteps to solve systems of ordinary differential equations with initial values.

• 

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

Examples

withStudent:-ODEs:

high_order_ivp1diffyx,x,x,x+3diffyx,x,x+4diffyx,x+2yx=0,evaldiffyx,x,x=0=1,evaldiffyx,x,x,x=0=2,y0=1

high_order_ivp1ⅆ3ⅆx3yx+3ⅆ2ⅆx2yx+4ⅆⅆxyx+2yx=0,ⅆ2ⅆx2yxx=0|ⅆ2ⅆx2yxx=0=2,ⅆⅆxyxx=0|ⅆⅆxyxx=0=−1,y0=1

(1)

ODEStepshigh_order_ivp1

Let's solveⅆ3ⅆx3yx+3ⅆ2ⅆx2yx+4ⅆⅆxyx+2yx=0,ⅆ2ⅆx2yxx=0|ⅆ2ⅆx2yxx=0=2,ⅆⅆxyxx=0|ⅆⅆxyxx=0=−1,y0=1Highest derivative means the order of the ODE is3ⅆ3ⅆx3yxCharacteristic polynomial of ODEr3+3r2+4r+2=0Roots of the characteristic polynomialr=−1,−1I,−1+ISolution fromr=−1y1x=ⅇxSolutions fromr=−1Iandr=−1+Iy2x=ⅇxsinx,y3x=ⅇxcosxGeneral solution of the ODEyx=c__1y1x+c__2y2x+c__3y3xSubstitute in solutions and simplifyyx=ⅇxc__1+c__2sinx+c__3cosxUse the initial conditiony0=11=c__1+c__3Calculate the 1st derivative of the solutionⅆⅆxyx=ⅇxc__1+c__2sinx+c__3cosx+ⅇxc__2cosxc__3sinxUse the initial conditionⅆⅆxyxx=0|ⅆⅆxyxx=0=−1−1=c__1c__3+c__2Calculate the 2nd derivative of the solutionⅆ2ⅆx2yx=ⅇxc__1+c__2sinx+c__3cosx2ⅇxc__2cosxc__3sinx+ⅇxc__2sinxc__3cosxUse the initial conditionⅆ2ⅆx2yxx=0|ⅆ2ⅆx2yxx=0=22=c__12c__2Solve for the unknown coefficientsc__1=2,c__2=0,c__3=−1Solution to the IVPyx=ⅇx2cosx

(2)

macroY=y1x,y2x:

ivpsys2diffY,x=`%.`Matrix7,1,`-`4,3,Y,evalY,x=0=1,1

ivpsys2ⅆⅆxy1xⅆⅆxy2x=71−43·y1xy2x,y10y20=11

(3)

ODEStepsivpsys2

ivpsys3diffY,x=Matrix1,2,3,2·Y+1,expx,evalY,x=1=0,1

ivpsys3ⅆⅆxy1xⅆⅆxy2x=y1x+2y2x+13y1x+2y2x+ⅇx,y11y21=0−1

(4)

ODEStepsivpsys3

ivpsys4diffwx,x=wx+2zx,diffzx,x=3wx+2zx+expx,w1=2,z1=2

ivpsys4ⅆⅆxwx=wx+2zx,ⅆⅆxzx=3wx+2zx+ⅇx,w−1=2,z−1=−2

(5)

ODEStepsivpsys4

See Also

diff

Int

Student

Student[ODEs]

Student[ODEs][ODESteps]