dsolve - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Differential Equations : dsolve : dsolve/details

dsolve

solve ordinary differential equations (ODEs)

 

Calling Sequence

Parameters

Description

Input and Output

Optional Arguments

Solving Methods

Examples

Calling Sequence

dsolve(ODE)

dsolve(ODE, y(x), extra_args)

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

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

Parameters

ODE

-

ordinary differential equation

y(x)

-

indeterminate function of one variable, required if ODE contains derivatives of more than one such function

ICs

-

initial conditions

{sysODE}

-

set with a system of ODEs

{funcs}

-

set with indeterminate functions

extra_args

-

(optional) depends on the type of problem being solved (see below)

Description

• 

As a general ODE solver, dsolve handles different types of ODE problems. These include the following.

  

- Looking for closed form solutions for a single ODE (see below), or a system of ODEs (see dsolve, system).

  

- Solving ODEs or a system of them with given initial conditions (boundary value problems). See dsolve, ICs.

  

- Looking for formal power series solutions to a linear ODE with polynomial coefficients. See dsolve, formal_series.

  

- Looking for formal solution to a linear ODE with polynomial coefficients. See dsolve, formal_solution.

  

- Looking for solutions using integral transforms (Laplace, Fourier). See dsolve, integral_transform.

  

- Looking for numerical (see dsolve, numeric) or series solutions (see dsolve, series) to ODEs or systems of them.

  

- In the case of one or a system of ODEs without initial conditions, dsolve also works with anticommutative variables set using the Physics package using the approach explained in PerformOnAnticommutativeSystem.

  

In the case of a single ODE, dsolve tries to solve it using either classification methods or symmetry methods. Using symmetry methods, dsolve first looks for the generators of symmetry groups of the given ODE, and then uses this information to integrate it, or at least reduce its order. Classification methods are used when the ODE matches a recognizable pattern (that is, for which a solving method is already implemented), and symmetry methods are reserved for the non-classifiable cases.

  

To see what method is being used to solve a given ODE, you can assign the following (see infolevel):

infolevel[dsolve]:= 3;

• 

The ODE Analyzer, a new interactive interface, has been created for numeric and symbolic solutions of ODE and ODE systems. The interface is easy to use, with many common options. In addition to the computation of solutions and solution values, plots can also be generated. The interface is suitable as an educational tool; it can provide the corresponding Maple commands needed to compute the solution or plot. For information on launching the interface (and command-line options), see dsolve/interactive. For an illustrated description of the interface, see worksheet/interactive/dsolve.

Input and Output

• 

Given an ODE, an extra argument indicating the dependent variable is required only when the given ODE involves more than one function being differentiated. When extra arguments are given, they can be placed in any order after the first one. Note that ODEs can also be constructed by applying (differential) operators - see an example at the end of the page.

• 

Caveat: if the first argument ODE is a set or list, even with a single element, or ODE is one of the cases output by the casesplit command, the input is treated as an "ODE system" and the output follows the corresponding conventions described in dsolve,system.

• 

Herein x,yx represent any pair of independent and dependent variables.

• 

Closed form solutions are returned by dsolve as a sequence of explicit yx=Fx,_Cn or implicit Fyx,x,_Cn=0 equations, where the _Cn (n=integer) are arbitrary constants. By default, dsolve returns the answer in explicit form, unless solve is not able to isolate the dependent variable, or its isolation requires the inversion of fractional powers, or the isolation can only be obtained by means of RootOf (as say yx=RootOf... ). Note that dsolve is sensitive to the _EnvExplicit variable used by solve.

• 

In the case of a first order ODE of high degree in dy/dx, the solution may also appear in parametric form as x_T=f_T,y_T=g_T, where _T is the parameter and the right hand sides are explicit expressions of _T.

• 

For high order ODEs, dsolve might succeed in reducing the order of the ODE but not in solving the problem to the end. The answer is then expressed using a scheme for conveying reductions of order (see dsolve,ODESolStruc and the example below). You may then be able to obtain a solution for the reduced ODE by manipulating it using the tools available in DEtools, or as a series expansion, or by other means. When a solution to the reduced ODE is obtained, a solution to the original problem can be built using DEtools[buildsol].

• 

For linear ODEs, when dsolve is not able to find a solution or a reduction of order, an answer using DESol is returned. DESol structures can also appear in answers involving reductions of orders of linear ODEs. Although DESol structures do not contain more information than the ODE itself, they can be useful in further computations since Maple can manipulate them, for example, by expanding in series, or by simplifying. See DESol.

• 

Integrals appearing in answers returned by dsolve are expressed using the inert Int and Intat (not int or intat). These integrals appear when int is not able to calculate them or when it appears to be convenient not to evaluate them during the solving process. You can request the evaluation of these integrals using the value command.

• 

Floating-point numbers appearing in the given ODE are converted to rational exact numbers before attempting to solve the problem. See optional argument convert_to_exact=false below.

• 

The symbol variables _yn (n=integer) are reserved for use by internal routines and should not be assigned.

Arbitrary Constants, General, Particular and Singular ODE Solutions

• 

The arbitrary constants _Cn (n=integer) entering dsolve's output are arbitrary in that they represent any mathematical expression not depending on x, where x is the independent variable. In brief, they satisfy  ⅆⅆx_Cn=0 and are not restricted to be finite. When an arbitrary constant approaches  the actual form of the resulting solution is obtained by taking limits.

• 

A general solution to an ODE depends on as many arbitrary constants as the differential order, say N. Conversely, any solution depending on N arbitrary constants is a general solution. Depending on N constants here means there is no possible redefinition of the _Cn in terms of other N independent constants that results in a form of the solution with fewer than N constants.

• 

Because a set of arbitrary constants _Cn can always be rewritten in terms of other constants, a general ODE solution can be rewritten in infinitely many different manners. In doing so, and with no exceptions, all the particular solutions of an ODE can be obtained from the general solution by specializing the arbitrary constants _Cn. Note that, depending on the case (for example, take some _Cn approaching , or approaching a finite value that makes a denominator approach zero), the process of obtaining a particular solution from the general solution may involve taking limits.

• 

The only solutions involving fewer than N arbitrary constants that may not be included in the general solution of an ODE are the so called singular solutions. Only nonlinear ODEs admit singular solutions. For a discussion about singular solutions, see the examples in essential_components. By default, dsolve computes the general and essentially singular solutions of a nonlinear ODE; the latter are the singular solutions that cannot be obtained from the general solution by specializing the integration constants in any way.

Optional Arguments

• 

For the optional arguments in the context of IC problems, systems of ODEs, series or numeric solutions, or the use of integral transforms, see the links to the respective help pages in the previous section.

• 

In the case of single ODEs, optional arguments can be given in any order after the first one. A summary of the optional arguments most frequently used is given by the following.

  

'implicit'

  

To avoid dsolve trying to make an answer explicit.

  

'explicit'

  

To request answers in explicit form in all cases, provided that solve succeeds in isolating the dependent variable.

  

'parametric'

  

To request the use of only the parametric solving scheme when solving a single first order ODE, possibly of high degree in dy/dx. Note however that by default dsolve tries to remove the parameter used during the solving process. To keep the parameter, specify the optional argument 'implicit' together with 'parametric'.

  

'singsol' = ...

  

The right-hand-side is one of the keywords none, essential or all, to respectively request computing none, only the essentially singular (default behavior), or all the singular solutions; the latter includes singular solutions that can nevertheless be obtained from the general solution by specializing the integration constants.

  

'useInt'

  

To request the use of Int (the inert integral) instead of the default integrator during the solving process. This option is useful to speed up the solving process in many cases, and to see the form of the answer before the integrals are performed (pedagogical purposes). To perform the integrals afterwards, apply the value command to the answer returned by dsolve.

  

'useint'

  

To request the use of int instead of the default integrator during the solving process. This option makes dsolve attempt computing any integral present in the solution, regardless of the convenience of doing that. This option is of use when the heuristic procedure for deciding about the convenience of performing an integral does not lead to the simpler ODE solution.

  

'class'

  

To request the use of only classification methods (see odeadvisor) and avoid using symmetry methods.

  

solution = ...

  

To request the use of a specified solution, passed as an equation with the unknown isolated to the left and its value to the right, when adjusting initial conditions to solve an ODE-IVP.

  

usesolutions = ...

  

The right hand side can be any of "particular", "particular via integrating factors", "particular via symmetries", "particular via symmetries and general", "general", "general and particular", "general and particular via symmetries", "general and particular via integrating factors", to request the use of different kinds of solutions and try them in different orders when tackling ODE initial value problems.

  

'Lie'

  

To request the use of Lie's symmetry methods before trying the classification methods. Additional information about the symmetry scheme and various other related optional arguments is found in dsolve, Lie.

  

'_mu = int_factor_hint'

  

To request the search and use of integrating factors of the form suggested in int_factor_hint, which could be either an algebraic expression or a list of them, containing unknowns in the form of functions of x,y,y',... or any symbols whose values are to be determined. When int_factor_hint contains no unknowns only a direct test of it using mutest is performed to validate or discard the hint. When the hint contains unknowns, dsolve uses the Maple intfactor routines to compute integrating factors of the suggested form, then use its own routines to transform this information into a solution to the given ODE when possible. See examples below.

  

'[method1, method2, ...]'

  

To request the use of only '[method1, method2, ...]' , and in that order, when solving a given ODE. Each method is represented by a related keyword in a list of methods. For first order ODEs, for instance, the methods available are the following.

`dsolve/methods`[1];

quadrature,linear,Bernoulli,separable,inverse_linear,homogeneous,Chini,lin_sym,exact,Abel,pot_sym

(1)

`dsolve/methods`[1,'semiclass'];

Riccati,inverse_Riccati,equivalent_to_Abel,linearizable,linearizable_by_differentiation

(2)

`dsolve/methods`[1,'high_degree'];

WeierstrassP,WeierstrassPPrime,JacobiSN,linearizable_by_differentiation,missing,dAlembert,homogeneous_B,sym_implicit

(3)
• 

To see all the subdivisions and the methods available for different orders, you can use the indices and entries commands. Methods under development are not yet in use by dsolve, and can only by tried by explicitly indicating them by using this list of methods ('[method1, method2,...]') option.

  

'output=basis'

  

Only for linear ODEs, to request the answer as a list of functions that span the solution space. If the differential equation is non-homogeneous, dsolve returns a list containing the list of basis functions followed by a single particular solution.

  

'convert_to_exact'=false

  

To avoid converting floating-point numbers to rational exact numbers; although the use of this optional argument does work in most cases, depending on the ODE input the use of the related method may slow down the process - sometimes leading to unsolvable ODE problems.

• 

Other optional parameters involved in the solving scheme used by dsolve are explained in dsolve,setup.

Solving Methods

• 

For tackling linear and nonlinear ODEs of all orders, the present implementation of dsolve makes use of a combination of classification, integrating factor and symmetry methods, equivalence methods (classical invariant theory), as well as a number of decision procedures like Kovacic's algorithm.

• 

Most of the classification methods implemented have a related help page (see odeadvisor). These help pages can be displayed by either following the hyperlinks found in that page, or by using the odeadvisor command itself. The decision algorithms for linear ODEs are explained in dsolve,linear. The implementation of Lie's symmetry method in dsolve is explained in dsolve,Lie. For more details and references about the solving methods and its computational implementations, see dsolve, algorithms and dsolve, references.

• 

Other tools for working with ODEs are available in the DEtools package. These include, for example, routines for plotting ODEs; manipulating linear ODEs and linear differential operators; and performing most of the steps of the symmetry method. For all this, see DEtools. For changing variables, see dchange.

A Note on Solutions with Special Functions Versus Solutions Involving Simpler Functions

  

When using special functions to represent ODE solutions, a difficult mathematical problem is to determine whether the special function admits a representation in terms of simpler functions. For example, you may prefer to see the solution in terms of 2F1 hypergeometric functions instead of HeunC, and prefer a solution in terms of exponentials or sin instead of Kummer or Bessel functions.

  

To address this problem, when solving first order Riccati and Abel type equations (see references and examples), dsolve's routines have two mechanisms.

• 

When the solution can be written in terms of simpler Liouvillian or hypergeometric functions, the routines automatically detect that, before computing any solution, and return the simpler representation.

• 

By assigning the environment variable _Env_dsolve_Abel_AIR_use_simpler_functions to false or true, you can request to never or always (try to) compute a solution in terms of simpler functions.

  

The reason for providing the environment variable mechanism is twofold. Through it, you can make the routines return a simpler solution, when it exists, but its existence is difficult to determine a priori, or you can make them return the special function solution form, even when a solution in terms of simpler functions is known to the routines. This is useful for investigating the special cases of the more advanced functions entering alternative forms of the solution.

Examples

The following examples illustrate the use of dsolve in solving a single ODE. For examples related to more specific problems see: dsolve,initial_conditions, dsolve,system, dsolve,numeric, dsolve,integral_transform, dsolve,series, and dsolve,formal_series.

First-order ODEs

  

A linear equation (see odeadvisor)

ode1sinxⅆⅆxyxcosxyx=0

ode1:=sinxⅆⅆxyxcosxyx=0

(4)

dsolveode1

yx=_C1sinx

(5)
  

You can indicate to dsolve to use a specific sequence of 'methods' to tackle the ODE. In the following example, the method for 'linear' ODEs is indicated; in addition the optional argument 'useInt' makes dsolve not evaluate the integral appearing in the solution.

dsolveode1,linear,useInt

yx=_C1ⅇ∫cosxsinxⅆx

(6)
  

To see the solution before evaluating integrals is useful to understand how it was obtained. Integrals can be evaluated afterwards using value.

value

yx=_C1sinx

(7)
  

This linear ODE is homogeneous (no term independent of y(x)) and so also separable

DEtools[odeadvisor]ode1

_separable

(8)

dsolveode1,separable,useInt

∫cosxsinxⅆx∫yx1_aⅆ_a+_C1=0

(9)

value

lnsinxlnyx+_C1=0

(10)

isolate,yx

yx=ⅇ_C1sinx

(11)
  

Recalling that arbitrary constants can always be redefined, by making the replacement ⅇ_C1_C1 you reobtain the form of the solution returned by dsolve(ode[1]).

  

As a general alternative, you can also look for an integrating factor (see DEtools,intfactor).

μDEtools[intfactor]ode1

μ:=1sinx2

(12)
  

Integrating factors make ODEs exact. To indicate to dsolve to use the scheme for exact ODEs use

dsolveμode1,exact

yx=_C1sinx

(13)
  

A Riccati type equation

ode2ⅆⅆxyxyx2+yxsinxcosx=0

ode2:=ⅆⅆxyxyx2+yxsinxcosx=0

(14)

DEtools[odeadvisor]ode2

_Riccati

(15)
  

Computing exact solutions for ODEs is about mapping them into as many integration problems as the differential order. The integrals are not always computable

dsolveode2

yx=ⅇcosx_C1+∫ⅇcosxⅆx+sinx

(16)
  

An ODE of Abel type

ode3ⅆⅆxyx=xx1+x22x2yx+2x4x2yxx+1

ode3:=ⅆⅆxyx=xx1+x22x2yx+2x4x2yxx+1

(17)
  

dsolve automatically solves this equation by computing an integrating factor for it. dsolve's internal solving steps can be reproduced at the Maple prompt as follows

μDEtools[intfactor]ode3

μ:=x2+yx2x2+2yx1

(18)
  

The solution for the related exact ODE using the method for exact ODEs

sol3simplifydsolveμode3,exact

sol3:=yx=x2+12LambertWⅇ43x34x24_C1+4x1x+14+12

(19)
  

Explicit or implicit solutions can be tested, in principle, using odetest.

odetestsol3,ode3

0

(20)
  

ODE of high degree in dy/dx:

ode4xn1ⅆⅆxyxnnxⅆⅆxyx+yx=0

ode4:=xn1ⅆⅆxyxnnxⅆⅆxyx+yx=0

(21)
  

In these cases, dsolve first tries a set of methods for high degree ODEs, including a parametric solving scheme.

dsolveode4

yx=_C1x_C11nn1_C1n_C1

(22)
  

To see the solution in parametric form, use the extra argument 'implicit'

dsolveode4,implicit

y_T=_C1_Tnn1n_Tn2n1_C1+_T1n1_C1n,x_T=_C1_Tnn1

(23)
  

High degree ODEs may admit singular solutions, returned together with the general solution. Also, depending on the case dsolve may not be able to remove the parameter introduced in the solving process. For example,

ode5yxx=Fⅆⅆxyx

ode5:=yxx=Fⅆ