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

Online Help

All Products    Maple    MapleSim


dsolve

Solve ODE problems with given initial conditions

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

dsolve({ODE, ICs}, y(x))

dsolve({ODE, ICs}, y(x), extra_args)

dsolve({sysODE, ICs}, {funcs})

dsolve({sysODE, ICs}, {funcs}, extra_args)

Parameters

ODE

-

ordinary differential equation

y(x)

-

the dependent variable (indeterminate function)

ICs

-

initial conditions for y(x) and/or its derivatives

sysODE

-

system of ODEs

{funcs}

-

set with indeterminate functions

extra_args

-

optional, can be 'type=series' or 'type=numeric'

Description

• 

The basic task being performed by dsolve when solving an "Initial Conditions" (ICs) ODE problem is to find appropriate values for the set of integration constants _Cn appearing in the symbolic solution of the problem, such that the solution will match the given ICs.

• 

As general rules for IC problems, the first argument must be a set containing an ODE or a system of ODEs together with the ICs, the second argument must be a set containing the indeterminate functions of the problem, and the number of ICs should not be greater than the sum of the differential orders of the given ODEs (see PDEtools[difforder]).

  

If no variable is specified, x is assumed to be the variable.

• 

For symbolic problems (that is, when neither series nor numeric solutions were requested) a typical IC can be any equation relating algebraic expressions, or just the algebraic expressions themselves, then assumed to be = 0 (see examples below).

  

The derivatives entering the ICs can always be expressed using the D syntax (for example Dy0=1, DyA+B=C). Alternately, standard math syntax may be used in 2-D math (for example y'0=1 is equivalent to the first example above, and y2x is equivalent to DDyx or D2yx. If the evaluation points are of type symbol, diff will also work (for example, ⅆⅆaya=1 means that the derivative of y at a is 1).

  

It is also possible to give "coupled" ICs, involving more than one function in each IC equation, and perhaps in a nonlinear manner. When nonlinear ICs are given dsolve might return a sequence of solution sets related to the various possible solutions found for the integration constants.

• 

When requesting numeric or series solutions, by giving the extra argument 'type=numeric' or 'type=series'; see dsolve,numeric, or dsolve,series), or the use of integral transforms (see dsolve,inttrans), the ICs must be given as equations. All derivatives entering the ICs must be expressed using the D syntax, each IC must be related to a single indeterminate function (coupled ICs are not allowed), and all ICs must be linear in the indeterminate function or its derivatives.

Examples

odediffyt,t,t+diffyt,t2=0

odeⅆ2ⅆt2yt+ⅆⅆtyt2=0

(1)

ans41dsolveode,y0=3,yt

ans41yt=lnc__1t+ⅇ3

(2)

ans42dsolveode,y0=3,Dy0=0,yt

ans42yt=3

(3)

ans43dsolveode,diffya,a,a=A,yt

ans43yt=lnc__1taA1c__1A,yt=lnc__1taA+1c__1A

(4)

ans44dsolveode,D2yayb=A,expyb=B,yt

ans44yt=lntRootOfAa22Aab+Ab2+a2lnB2ablnB+b2lnB+1_Z2+lnB+A+2Aa2Ab+2lnBa2lnBb_ZBbRootOfAa22Aab+Ab2+a2lnB2ablnB+b2lnB+1_Z2+lnB+A+2Aa2Ab+2lnBa2lnBb_ZB+B

(5)

Explicit or implicit answers can be tested, in principle, using odetest:

mapodetest,ans41,ans42,ans43,ans44,ode

0,0,0,0,0

(6)

sysdiffxt,t=yt,diffyt,t=xt

sysⅆⅆtxt=yt,ⅆⅆtyt=xt

(7)

IC_1xa=A,yb=B

IC_1xa=A,yb=B

(8)

ans1combinedsolvesysunionIC_1,xt,yt,trig

ans1xt=AcosbtBsinatcosab,yt=Asinbt+Bcosatcosab

(9)

IC_2diffxa,a=B,xa=A

IC_2ⅆⅆaxa=B,xa=A

(10)

ans2combinedsolvesysunionIC_2,xt,yt,trig

ans2xt=AcosatBsinat,yt=Asinat+Bcosat

(11)

IC_3diffxa,a=A,diffyb,b=B

IC_3ⅆⅆaxa=A,ⅆⅆbyb=B

(12)

ans3combinedsolvesysunionIC_3,xt,yt,trig

ans3xt=Asinbt+Bcosatcosab,yt=AcosbtBsinatcosab

(13)

Answers for systems of ODEs (provided that they are explicit as in this case) can also be tested using odetest

mapodetest,ans1,ans2,ans3,sys

0,0,0

(14)

See Also

DEtools

dsolve

dsolve,inttrans

dsolve,Lie

dsolve,numeric

dsolve,series

dsolve,system

plots[odeplot]

solve