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

Online Help

All Products    Maple    MapleSim


dsolve

find exact solutions for systems of ordinary differential equations (ODEs)

 

Calling Sequence

Parameters

Options

Description

Examples

References

Calling Sequence

dsolve(ODE_sys, opts)

Parameters

ODE_sys

-

system of ODEs; it can contain inequations

opts

-

(optional) argument(s) that can be given in any order and are described in Options

Options

• 

funcs - set or list with indeterminate functions or just their names - can also be a ranking

• 

explicit - request the composition of the sets appearing in the solution in the case of nonlinear systems of ODEs

• 

useInt - request the use of Inert integrals instead of performing the integrations involved in the solution

• 

singsol=false - avoid the computation of the singular solutions when the system is nonlinear

• 

mindim=N - avoid the computation of solutions when the dimension of the solution space is less than N

• 

parameters=P - P is a list or set of names or functions which are solving variables with priority lower than any other variable

• 

rif - request that the differential elimination step for nonlinear ODE systems should also be done using the DEtools[Rif] package

Description

• 

Given an ODE system, possibly including algebraic constraints and inequations, dsolve returns an exact solution when: 1) it succeeds in uncoupling the system and 2) dsolve's routines for solving a single ODE succeed in solving each of the ODEs arising in the uncoupling process. Depending on the complexity of the system, step 2) may not be fully successful. However, step 1) is systematic in that, whenever the system is consistent, the uncoupling of systems rational in the unknowns and their derivatives is feasible (up to the amount of memory available on your computer).

ODE systems rational in the unknowns: The solving process

  

The solving process consists of two steps.

  

1. The system is first triangularized by using differential algebra techniques for polynomial systems. When the ODE system, rational in the unknowns and their derivatives, contains non-polynomial coefficients, the triangularization-also called sequential uncoupling-is performed by rewriting the system in polynomial form by using a differential extension approach (see PDEtools[dpolyform]).

  

Due to the intrinsic nature of the differential algebra elimination process, this first step always produces (possibly many) ODEs or algebraic equations, such that:

– 

The union of the non-singular solutions of each of these ODEs and algebraic equations is equal to the set of general and singular solutions of the original ODE system.

– 

Provided that the original ODE system is not subdetermined, one of the ODEs arising in step 1 depends on a single unknown.

  

2. This ODE depending on a single unknown is solved, and the unknown removed from the other ODEs. Due to nature of the differential elimination process, after removing this single unknown, there is another ODE depending on a single unknown.

  

Step 2 is repeated until all the ODEs obtained in step 1 are solved, thus arriving at the solution to the original input ODE system.

The output

• 

When successful, in the case of linear ODE systems, dsolve returns a single solution set, with all the unknowns expressed in terms of the corresponding independent variable.

• 

In the case of nonlinear ODE systems, dsolve, by default, returns sequences of solutions, including the singular solutions of the problem (if any). These singular solutions can be identified by the fact that the dimension of the solution space (the number of integration constants _Cn appearing) is less than the dimension of the general solution.

• 

In the nonlinear case, each of the solutions is returned as a list, whose elements, in turn, are sets, each containing the (possibly many) solutions found for each of the unknowns of the system. The first set appearing inside each list contains the solution for one unknown expressed in terms of the independent variable. The next sets express other unknowns in terms of the independent variable and possibly also the previously solved unknowns. See the Examples section. In this way, the solution is expressed as compactly as possible, permitting an easy analysis of the solving process. Note that, depending on the solving ordering, the form of the solution can be quite different.

• 

When dsolve is successful, in a second step, or even in a first single step, it is usually of interest to obtain a solution in built or explicit format, as a sequence of sets, where each set contains all the unknowns of the problem in solved form, with the right-hand sides containing just the independent variable(s) of the problem. To obtain the solution in such explicit format it suffices to add the keyword explicit to the arguments passed to dsolve. Note that solutions expressed in this format do not show how the system was uncoupled/solved, and usually appear much bigger than the default solution format described in the previous paragraph. The explicit format may also take noticeably more time to be compute because the simplification and integration processes involved are more expensive.

• 

When dsolve is partially successful, the elements of each "solution list" are either sets or lists. The sets contain solutions while the lists also contain unsolved differential equations. It is valuable to have these partial solutions because they may be easier to solve.  For example, the unsolved equations may be fewer in number or of lower differential order. See the Examples section.

The unknowns of the problem and rankings

• 

By default, when only the ODE system is given, dsolve considers all the unknown functions present in the system as the unknowns of the problem, herein also called the solving variables. This default can be changed by calling dsolve with an extra argument, specifying which are the solving variables, as a set or as a list containing the names of these unknown functions (for example, {f,g,...} ) or the unknown functions (for example, {fx,gx,...} ).

• 

For ODE systems rational in the unknowns and their derivatives, when the solving variables are indicated as a set, the ordering chosen by dsolve for uncoupling the system is chosen by the PDEtools[casesplit] command, where the triangularization is performed. When the solving variables are indicated as a list, for instance, f,g,h, the uncoupling ordering attempted is to obtain an ODE only depending on h, another ODE only depending on g,h, and another one depending on f,g,h. If such a triangularization is successful, dsolve first solves the ODE for h, then the one for g,h (assuming h is known - even if the ODE for h remained unsolved), and finally the one for f,g,h (assuming g,h are known).

• 

The concept of "solving ordering" for the unknowns of the problem is thus not different from the concept of "ranking" in differential algebra (for a useful discussion on rankings see rifsimp[ranking]). In fact, the indications of a "solving ordering" accepted by dsolve can be more elaborate, as for instance the ones used to indicate a "ranking" when using the DifferentialAlgebra or DEtools[Rif] packages. For example, by indicating the unknowns of the problem as in f,g,h,j,k, one is indicating that dsolve decides whether f comes before g (or the opposite), h is ranked third, and then dsolve decides whether j comes before k. This flexibility is extremely useful when solving nonlinear ODE systems, where slight changes in the solving ordering can lead to solutions in quite different formats or make an otherwise unsolvable (by dsolve) problem solvable.

• 

In addition to indicating the solving variables or the solving ordering as explained above, one can use the optional argument parameters=P, where P is a set or list of solving variables with less priority, meaning that they always appear at the end of the list of solving variables described in the previous paragraph. When P is given as a list, the rules for choosing a particular ordering inside it are the ones just described in the previous paragraph for the main solving variables.

ODE systems nonrational in the unknowns

• 

The scheme used to solve systems depending on the unknowns in a nonrational manner can be summarized as the following.

1. 

The whole system is split into subsystems of ODEs, coupled among themselves but independent of the ODEs of the other subsystems (see PDEtools[splitsys]).

2. 

Each subsystem is analyzed, looking for a subsubsystem of ODEs that can be solved without using the other ODEs of the subsystem. This step is repeated until the whole subsystem is solved or until no such subsystem exists, in which case dsolve goes to step 3).

3. 

This step consists of three different algebraic algorithms for trying to reduce a subsystem of ODEs to the case treated in Step 2.

• 

The scheme summarized above, when successful, usually obtains an answer by solving each uncoupled ODE independently. In some cases it is useful to indicate with which functions dsolve should begin, for example, first f and then g. This can be done by giving the second argument (the indeterminate functions) as a list (such as f,g) instead of as a set. Such an indication is considered only when it is equivalent to begin with f or g.

• 

When one of the uncoupled ODEs cannot be solved by dsolve, the command goes to the next ODE as if the previous one were already solved and the solution contains one or more unsolved ODEs.

• 

Concerning the output for nonrational ODE systems, the conventions are the same as those used for rational ODE systems explained some paragraphs above.

Other optional arguments

• 

When the ODE system is nonlinear, by default, dsolve's output contains, in separate solution lists or sets, the singular solutions of the system. This involves both computing the singular cases, when uncoupling the system inside PDEtools[casesplit], and solving them. In many applications, however, the computation of the singular cases may not be relevant, and also their computation may sometimes be more time consuming than the computation of the general solution. For this reason, an optional argument is provided to override this behavior. By giving singsol=false, these singular solutions are not computed and no time is spent with them.

• 

When an ODE system, is solved, the dimension of the solution space (indicated by the number of integration constants present) depends on various factors, not only the "apparent differential order" of the system. In some applications, however, it is the case that the solutions of interest are only those that have at least a minimum number of dimensions. In such a case, to discard solutions with dimension less than N (a positive integer) use the mindim=N optional argument. For nonlinear ODE systems, this option may also speed up the computational process since there is no time consumed in computing and solving the lower-dimension cases. For linear ODE systems, in which case there is only one solution, dsolve returns NULL if you specify a value of N greater than the dimension of this single solution.

• 

By default, dsolve performs all differential elimination processes for linear ODE systems by using the DEtools[rifsimp] package, and uses the DifferentialAlgebra package for nonlinear systems. This default can be changed by giving the optional argument rif or RIF. In this case, the computation runs using the Rif package, independent of the type of the PDE system.

• 

For further mathematical conventions related to the output by dsolve, see the conventions used in solve, dsolve, and int.

Examples

PDEtoolsdeclarex,y,z,f,gt,prime=t

xtwill now be displayed asx

ytwill now be displayed asy

ztwill now be displayed asz

ftwill now be displayed asf

gtwill now be displayed asg

derivatives with respect totof functions of one variable will now be displayed with '

(1)

A linear system of ODEs:

sys1diffxt,t=yt,diffyt,t=xt

sys1x'=y,y'=x

(2)

sol1dsolvesys1

sol1x=c__1sint+c__2cost,y=c__1costc__2sint

(3)

For linear systems, as above, the solution is returned as a single set, with all the unknowns in solved form, expressed in terms of the independent variable of the problem.

These ODE system solutions can be verified by using odetest, which, when the solution is correct, returns zero for each of the ODEs of the system.

odetestsol1,sys1

0,0

(4)

A nonlinear system:

sys2diffft,t=cosft,diffgt,t=ft12,diffht,t,t=gtft

sys2f '=cosf,g'=f,h''=gf

(5)

sol2dsolvesys2

sol2f=arctanⅇ2tc__421ⅇ2tc__42+1,2ⅇtc__4ⅇ2tc__42+1,g=fⅆt+c__3,ht=gfⅆtⅆt+c__1t+c__2

(6)

In the solution above, f is solved as a function of t, then g is expressed in terms of t,f and ht is expressed in terms of t,f,g. In this example, each of these sets contain only one solution for each of the unknowns f,g,h. In other cases, many solutions can appear in each of these sets. Solutions like this one above can also be tested using odetest.

odetestsol2,sys2

0,0,0

(7)

To obtain solution sets (in this example there is only one, but typically there can be many) with f,g,h expressed as explicit functions of t, one can give the extra argument explicit, as follows.

sol22dsolvesys2,explicit

sol22f=arctanⅇ2tc__421ⅇ2tc__42+1,2ⅇtc__4ⅇ2tc__42+1,g=arctanⅇ2tc__421ⅇ2tc__42+1,2ⅇtc__4ⅇ2tc__42+1ⅆt+c__3,ht=arctanⅇ2tc__421ⅇ2tc__42+1,2ⅇtc__4ⅇ2tc__42+1ⅆt+c__3arctanⅇ2tc__421ⅇ2tc__42+1,2ⅇtc__4ⅇ2tc__42+1ⅆtⅆt+c__1t+c__2

(8)

Some polynomial nonlinear systems and their answers in implicit (default) or explicit form:

sys3diffxt,t=xtxt+yt,diffyt,t=ytxt+yt

sys3x'=xx+y,y'=yx+y

(9)

dsolvesys3

x=0,y=1t+c__1,x=tanhc__2+tc__1c__1,y=x2+x'x

(10)

dsolvesys3,explicit

x=0,y=1t+c__1,x=tanhc__2+tc__1c__1,y=1c__1tanhc__2+tc__1

(11)

The computation of the singular solution shown above (the one with only one integration constant) can be avoided by giving the extra argument singsol=false.

dsolvesys3,singsol=false

x=tanhc__2+tc__1c__1,y=x2+x'x

(12)

Note also the difference in the output when we explicitly request a particular solving ordering to be used by giving the solving variables as a list.

dsolvesys3,x,y

y=0,x=1t+c__1,y=tanc__2+tc__1c__1,x=y'y2y

(13)

dsolvesys3,y,x

x=0,y=1t+c__1,x=tanhc__2+tc__1c__1,y=x2+x'x

(14)

In the former solution, by specifying the solving ordering x,y the triangularization leads to a solution for y, then a solution for x expressed as a function of y. In the latter solution, it is the opposite.

sys4diffxt,t2+diffyt,t2=xt2+yt2,diffyt,tyt=diffxt,txt

sys4y'y=x'x,x'2+y'2=x2+y2

(15)

dsolvesys4

x=c__2ⅇt,y=c__1ⅇt,x=c__2ⅇt,y=c__1ⅇt,x=x,y=−Ix,y=Ix

(16)

Here, the system contains two solutions the general one, of dimension 2 (depends on c__1,c__2), and a singular one, of lower dimension. In turn, in each of these solutions, one of the two functions x or y can assume two different values. The explicit format of this solution involves four explicit solution sets.

dsolvesys4,explicit

x=c__2ⅇt,y=c__1ⅇt,x=c__2ⅇt,y=c__1ⅇt,x=x,y=−Ix,x=x,y=Ix

(17)

mapodetest,,sys4

0,0,0,0

(18)

An example from Kamke's textbook - number 22 - containing two singular solutions and where dsolve is only partially successful in obtaining the general solution:

sys5diffxt,t=12xt2124yt,diffyt,t=2xtyt3zt,diffzt,t=3xtzt16yt2

sys5x'=x22y24,y'=2yx3z,z'=3xzy26

(19)

sol5dsolvesys5

sol5y=0,x=22c__1t,z=0,y=256c__1t+c__24,x=y'3y3232y,x=y'+3y3232y,z=2yx3y'3,y=ⅇ_g_fⅆ_f+c__2where_g_f=15_f23_f2_g_f+12_f5_g_f_f_g_f+42_g_f3_g_f320_f2+_g_f22+_g_f_f,_f=y'y32,_g_f=2y322yy''y'3y',t=_g_f_fⅇ_g_fⅆ_f+c__2ⅆ_f+c__1,y=ⅇ_g_fⅆ_f+c__2,x=2y'''y+3y''y'12y''y+15y'2,z=4y'''y2+18y''yy'15y'336y''y+45y'2

(20)

In above there are three lists, each one containing a different solution.

– 

The first list, depending on a single arbitrary constant c__1, is a one-dimensional (1-D) singular solution. This list contains three sets, each with the value of a single unknown (here x,y,z) expressed as a function of the independent variable t.

– 

The second list is a 2-D singular solution that depends on c__1,c__2. We see that y is solved in terms of t, a set with two possible values for x expressed in terms of t,y, and then z is solved in terms of t,x,y.

– 

The third list is the general (3-D) solution to the ODE system. We see that y is not fully solved but instead reduced to a first order ODE in _g_f (see ODESolStruc). Then, assuming y(t) is known despite the fact that the ODE was not fully solved, we have x expressed as a function of t,y and finally z expressed as a function of t,x,y.

The value of such a partially successful output is in that it provides two fully integrated solutions (the singular ones, of dimensions 1 and 2) plus the general solution up to solving a single first order ODE. If you could find the solution to that remaining ODE, you could use buildsol to complete the process leading to the general solution in fully integrated form.

In examples like this one, by calling dsolve with the extra argument explicit, you receive the lists with fully solved cases composed into sequences of solution sets, with all the unknowns in solved form, but the partially successful case remains as the list displayed above.

References

  

Cheb-Terrab, E. S. "A Computational Approach for the Exact Solving of Systems of Partial Differential Equations." submitted to Computer Physics Communications, (2001).

See Also

casesplit

dchange

DEtools

DEtools,rifsimp

DifferentialAlgebra

dsolve

int

odetest

pdetest

PDEtools

PDEtools[declare]

PDEtools[dpolyform]

PDEtools[splitsys]

pdsolve,system

Rif

solve