dsolve
solve ordinary differential equations (ODEs)
Calling Sequence
Parameters
Description
Examples
Details
dsolve(ODE)
dsolve(ODE, y(x), options)
dsolve({ODE, ICs}, y(x), options)
ODE
-
ordinary differential equation, or a set or list of ODEs
y(x)
any indeterminate function of one variable, or a set or list of them, representing the unknowns of the ODE problem
ICs
initial conditions of the form y(a)=b, D(y)(c)=d, ..., where {a, b, c, d} are constants with respect to the independent variable
options
(optional) depends on the type of ODE problem and method used, for example, series or method=laplace. (See the Examples section.)
As a general ODE solver, dsolve handles different types of ODE problems. These include the following.
- Computing closed form solutions for a single ODE (see dsolve/ODE) or a system of ODEs, possibly including anti-commutative variables (see dsolve/system).
- Solving ODEs or a system of them with given initial conditions (boundary value problems). See dsolve/ICs.
- Computing formal power series solutions for a linear ODE with polynomial coefficients. See dsolve/formal_series.
- Computing formal solution for a linear ODE with polynomial coefficients. See dsolve/formal_solution.
- Computing solutions using integral transforms (Laplace and Fourier). See dsolve/integral_transform.
- Computing numerical (see dsolve/numeric) or series solutions (see dsolve/series) for ODEs or systems of ODEs.
The ODE Analyzer Assistant is a point-and-click interface to the ODE solver routines. Using the assistant, you can compute numeric and exact solutions and plot the solutions. For more information, see dsolve[interactive] and worksheet/interactive/dsolve.
To define a derivative, use the diff command or one of the notations explained in Derivative Notation.
Solving an ODE
Define a simple ODE.
ode≔diffyx,x,x=2yx+1
ode≔ⅆ2ⅆx2yx=2yx+1
Solve the ODE, ode.
dsolveode
yx=ⅇ2xc__2+ⅇ−2xc__1−12
Define initial conditions.
ics≔y0=1,Dy0=0
Solve ode subject to the initial conditions ics.
dsolveics,ode
yx=3ⅇ2x4+3ⅇ−2x4−12
Laplace Transform Method
Compute the solution using the Laplace transform method.
sol≔dsolveics,ode,yx,method=laplace
sol≔yx=−12+3cosh2x2
Test whether the ODE solution satisfies the ODE and the initial conditions (see odetest).
odetestsol,ode,ics
0,0,0
Computing a Series Solution
Find a series solution for the same problem.
series_sol≔dsolveics,ode,yx,series
series_sol≔yx=1+32x2+14x4+Ox6
odetestseries_sol,ode,ics,series
Solving an ODE System
Define a system of ODEs.
sys_ode≔diffyt,t=xt,diffxt,t=−xt
sys_ode≔ⅆⅆtyt=xt,ⅆⅆtxt=−xt
If the unknowns are not specified, all differentiated indeterminate functions in the system are treated as the unknowns of the problem.
dsolvesys_ode
xt=c__2ⅇ−t,yt=−c__2ⅇ−t+c__1
ics≔x0=1,y1=0
Solve the system of ODEs subject to the initial conditions ics.
dsolvesys_ode,ics
xt=ⅇ−t,yt=−ⅇ−t+ⅇ−1
For detailed information on the dsolve command, see dsolve/details.
See Also
DEtools
diff
dsolve/algorithms
dsolve/details
dsolve/education
dsolve/formal_series
dsolve/formal_solution
dsolve/hypergeometric
dsolve/ICs
dsolve/integrating_factors
dsolve/integrating_factors_for_LODEs
dsolve/inttrans
dsolve/Lie
dsolve/linear
dsolve/numeric
dsolve/piecewise
dsolve/references
dsolve/series
dsolve/system
ODE Analyzer Assistant
odeadvisor
odeadvisor/types
PDEtools
pdsolve
Download Help Document