Ordinary differential equation



In mathematics, an ordinary differential equation (ODE) is a differential equation (DE) dependent on only a single independent variable. As with other DE, its unknown(s) consists of one (or more) function(s) and involves the derivatives of those functions. The term "ordinary" is used in contrast with partial differential equations (PDEs) which may be with respect to one independent variable, and, less commonly, in contrast with stochastic differential equations (SDEs) where the progression is random.

Differential equations
A linear differential equation is a differential equation that is defined by a linear polynomial in the unknown function and its derivatives, that is an equation of the form
 * $$a_0(x)y +a_1(x)y' + a_2(x)y'' +\cdots +a_n(x)y^{(n)}+b(x)=0,$$

where $a_0(x)$, ..., $a_n(x)$ and $b(x)$ are arbitrary differentiable functions that do not need to be linear, and $y', \ldots, y^{(n)}$ are the successive derivatives of the unknown function $y$ of the variable $x$.

Among ordinary differential equations, linear differential equations play a prominent role for several reasons. Most elementary and special functions that are encountered in physics and applied mathematics are solutions of linear differential equations (see Holonomic function). When physical phenomena are modeled with non-linear equations, they are generally approximated by linear differential equations for an easier solution. The few non-linear ODEs that can be solved explicitly are generally solved by transforming the equation into an equivalent linear ODE (see, for example Riccati equation).

Some ODEs can be solved explicitly in terms of known functions and integrals. When that is not possible, the equation for computing the Taylor series of the solutions may be useful. For applied problems, numerical methods for ordinary differential equations can supply an approximation of the solution.

Background
Ordinary differential equations (ODEs) arise in many contexts of mathematics and social and natural sciences. Mathematical descriptions of change use differentials and derivatives. Various differentials, derivatives, and functions become related via equations, such that a differential equation is a result that describes dynamically changing phenomena, evolution, and variation. Often, quantities are defined as the rate of change of other quantities (for example, derivatives of displacement with respect to time), or gradients of quantities, which is how they enter differential equations.

Specific mathematical fields include geometry and analytical mechanics. Scientific fields include much of physics and astronomy (celestial mechanics), meteorology (weather modeling), chemistry (reaction rates), biology (infectious diseases, genetic variation), ecology and population modeling (population competition), economics (stock trends, interest rates and the market equilibrium price changes).

Many mathematicians have studied differential equations and contributed to the field, including Newton, Leibniz, the Bernoulli family, Riccati, Clairaut, d'Alembert, and Euler.

A simple example is Newton's second law of motion&mdash;the relationship between the displacement x and the time t of an object under the force F, is given by the differential equation


 * $$m \frac{\mathrm{d}^2 x(t)}{\mathrm{d}t^2} = F(x(t))\,$$

which constrains the motion of a particle of constant mass m. In general, F is a function of the position x(t) of the particle at time t. The unknown function x(t) appears on both sides of the differential equation, and is indicated in the notation F(x(t)).

Definitions
In what follows, y is a dependent variable representing an unknown function y = f(x) of the independent variable x. The notation for differentiation varies depending upon the author and upon which notation is most useful for the task at hand. In this context, the Leibniz's notation ($dy⁄dx$, $d^{2}y⁄dx^{2}$, …, $d^{n}y⁄dx^{n}$) is more useful for differentiation and integration, whereas Lagrange's notation (y′, y′′, …, y(n)) is more useful for representing higher-order derivatives compactly, and Newton's notation $$(\dot y, \ddot y, \overset{...}{y})$$ is often used in physics for representing derivatives of low order with respect to time.

General definition
Given F, a function of x, y, and derivatives of y. Then an equation of the form


 * $$F\left (x,y,y',\ldots, y^{(n-1)} \right )=y^{(n)}$$

is called an explicit ordinary differential equation of order n.

More generally, an implicit ordinary differential equation of order n takes the form:


 * $$F\left(x, y, y', y'',\ \ldots,\ y^{(n)}\right) = 0$$

There are further classifications:

Autonomous:A differential equation is autonomous if it does not depend on the variable $x$. Linear:A differential equation is linear if $F$ can be written as a linear combination of the derivatives of $y$; that is, it can be rewritten as
 * $y^{(n)} = \sum_{i=0}^{n - 1} a_i(x) y^{(i)} + r(x)$

where $ai(x)$ and $r(x)$ are continuous functions of $x$.

The function r(x) is called the source term, leading to further classification.

Homogeneous:A linear differential equation is homogeneous if $r(x) = 0$. In this case, there is always the "trivial solution" $y = 0$. Nonhomogeneous (or inhomogeneous):A linear differential equation is nonhomogeneous if $r(x) ≠ 0$.

Non-linear:A differential equation that is not linear.

System of ODEs
A number of coupled differential equations form a system of equations. If y is a vector whose elements are functions; y(x) = [y1(x), y2(x),..., ym(x)], and F is a vector-valued function of y and its derivatives, then


 * $$\mathbf{y}^{(n)} = \mathbf{F}\left(x,\mathbf{y},\mathbf{y}',\mathbf{y}'',\ldots, \mathbf{y}^{(n-1)} \right)$$

is an explicit system of ordinary differential equations of order n and dimension m. In column vector form:


 * $$\begin{pmatrix}

y_1^{(n)} \\ y_2^{(n)} \\ \vdots \\ y_m^{(n)} \end{pmatrix} =

\begin{pmatrix} f_1 \left (x,\mathbf{y},\mathbf{y}',\mathbf{y}'',\ldots, \mathbf{y}^{(n-1)} \right ) \\ f_2 \left (x,\mathbf{y},\mathbf{y}',\mathbf{y}'',\ldots, \mathbf{y}^{(n-1)} \right ) \\ \vdots \\ f_m \left (x,\mathbf{y},\mathbf{y}',\mathbf{y}'',\ldots, \mathbf{y}^{(n-1)} \right) \end{pmatrix}$$

These are not necessarily linear. The implicit analogue is:


 * $$\mathbf{F} \left(x,\mathbf{y},\mathbf{y}',\mathbf{y}'',\ldots, \mathbf{y}^{(n)} \right) = \boldsymbol{0}$$

where 0 = (0, 0, ..., 0) is the zero vector. In matrix form


 * $$\begin{pmatrix}

f_1(x,\mathbf{y},\mathbf{y}',\mathbf{y}'',\ldots, \mathbf{y}^{(n)}) \\ f_2(x,\mathbf{y},\mathbf{y}',\mathbf{y}'',\ldots, \mathbf{y}^{(n)}) \\ \vdots \\ f_m(x,\mathbf{y},\mathbf{y}',\mathbf{y}'',\ldots, \mathbf{y}^{(n)}) \end{pmatrix}=\begin{pmatrix} 0\\ 0\\ \vdots\\ 0 \end{pmatrix}$$

For a system of the form $$\mathbf{F} \left(x,\mathbf{y},\mathbf{y}'\right) = \boldsymbol{0}$$, some sources also require that the Jacobian matrix $$\frac{\partial\mathbf{F}(x,\mathbf{u},\mathbf{v})}{\partial \mathbf{v}}$$ be non-singular in order to call this an implicit ODE [system]; an implicit ODE system satisfying this Jacobian non-singularity condition can be transformed into an explicit ODE system. In the same sources, implicit ODE systems with a singular Jacobian are termed differential algebraic equations (DAEs). This distinction is not merely one of terminology; DAEs have fundamentally different characteristics and are generally more involved to solve than (nonsingular) ODE systems. Presumably for additional derivatives, the Hessian matrix and so forth are also assumed non-singular according to this scheme, although note that any ODE of order greater than one can be (and usually is) rewritten as system of ODEs of first order, which makes the Jacobian singularity criterion sufficient for this taxonomy to be comprehensive at all orders.

The behavior of a system of ODEs can be visualized through the use of a phase portrait.

Solutions
Given a differential equation
 * $$F\left(x, y, y', \ldots, y^{(n)} \right) = 0$$

a function u: I ⊂ R → R, where I is an interval, is called a solution or integral curve for F, if u is n-times differentiable on I, and
 * $$F(x,u,u',\ \ldots,\ u^{(n)})=0 \quad x \in I.$$

Given two solutions u: J ⊂ R → R and v: I ⊂ R → R, u is called an extension of v if I ⊂ J and
 * $$u(x) = v(x) \quad x \in I.\,$$

A solution that has no extension is called a maximal solution. A solution defined on all of R is called a global solution.

A general solution of an nth-order equation is a solution containing n arbitrary independent constants of integration. A particular solution is derived from the general solution by setting the constants to particular values, often chosen to fulfill set 'initial conditions or boundary conditions'. A singular solution is a solution that cannot be obtained by assigning definite values to the arbitrary constants in the general solution.

In the context of linear ODE, the terminology particular solution can also refer to any solution of the ODE (not necessarily satisfying the initial conditions), which is then added to the homogeneous solution (a general solution of the homogeneous ODE), which then forms a general solution of the original ODE. This is the terminology used in the guessing method section in this article, and is frequently used when discussing the method of undetermined coefficients and variation of parameters.

Solutions of finite duration
For non-linear autonomous ODEs it is possible under some conditions to develop solutions of finite duration, meaning here that from its own dynamics, the system will reach the value zero at an ending time and stays there in zero forever after. These finite-duration solutions can't be analytical functions on the whole real line, and because they will be non-Lipschitz functions at their ending time, they are not included in the uniqueness theorem of solutions of Lipschitz differential equations.

As example, the equation:
 * $$y'= -\text{sgn}(y)\sqrt{|y|},\,\,y(0)=1$$

Admits the finite duration solution:
 * $$y(x)=\frac{1}{4}\left(1-\frac{x}{2}+\left|1-\frac{x}{2}\right|\right)^2$$

Singular solutions
The theory of singular solutions of ordinary and partial differential equations was a subject of research from the time of Leibniz, but only since the middle of the nineteenth century has it received special attention. A valuable but little-known work on the subject is that of Houtain (1854). Darboux (from 1873) was a leader in the theory, and in the geometric interpretation of these solutions he opened a field worked by various writers, notably Casorati and Cayley. To the latter is due (1872) the theory of singular solutions of differential equations of the first order as accepted circa 1900.

Reduction to quadratures
The primitive attempt in dealing with differential equations had in view a reduction to quadratures. As it had been the hope of eighteenth-century algebraists to find a method for solving the general equation of the nth degree, so it was the hope of analysts to find a general method for integrating any differential equation. Gauss (1799) showed, however, that complex differential equations require complex numbers. Hence, analysts began to substitute the study of functions, thus opening a new and fertile field. Cauchy was the first to appreciate the importance of this view. Thereafter, the real question was no longer whether a solution is possible by means of known functions or their integrals, but whether a given differential equation suffices for the definition of a function of the independent variable or variables, and, if so, what are the characteristic properties.

Fuchsian theory
Two memoirs by Fuchs inspired a novel approach, subsequently elaborated by Thomé and Frobenius. Collet was a prominent contributor beginning in 1869. His method for integrating a non-linear system was communicated to Bertrand in 1868. Clebsch (1873) attacked the theory along lines parallel to those in his theory of Abelian integrals. As the latter can be classified according to the properties of the fundamental curve that remains unchanged under a rational transformation, Clebsch proposed to classify the transcendent functions defined by differential equations according to the invariant properties of the corresponding surfaces f = 0 under rational one-to-one transformations.

Lie's theory
From 1870, Sophus Lie's work put the theory of differential equations on a better foundation. He showed that the integration theories of the older mathematicians can, using Lie groups, be referred to a common source, and that ordinary differential equations that admit the same infinitesimal transformations present comparable integration difficulties. He also emphasized the subject of transformations of contact.

Lie's group theory of differential equations has been certified, namely: (1) that it unifies the many ad hoc methods known for solving differential equations, and (2) that it provides powerful new ways to find solutions. The theory has applications to both ordinary and partial differential equations.

A general solution approach uses the symmetry property of differential equations, the continuous infinitesimal transformations of solutions to solutions (Lie theory). Continuous group theory, Lie algebras, and differential geometry are used to understand the structure of linear and non-linear (partial) differential equations for generating integrable equations, to find its Lax pairs, recursion operators, Bäcklund transform, and finally finding exact analytic solutions to DE.

Symmetry methods have been applied to differential equations that arise in mathematics, physics, engineering, and other disciplines.

Sturm–Liouville theory
Sturm–Liouville theory is a theory of a special type of second-order linear ordinary differential equation. Their solutions are based on eigenvalues and corresponding eigenfunctions of linear operators defined via second-order homogeneous linear equations. The problems are identified as Sturm–Liouville problems (SLP) and are named after J. C. F. Sturm and J. Liouville, who studied them in the mid-1800s. SLPs have an infinite number of eigenvalues, and the corresponding eigenfunctions form a complete, orthogonal set, which makes orthogonal expansions possible. This is a key idea in applied mathematics, physics, and engineering. SLPs are also useful in the analysis of certain partial differential equations.

Existence and uniqueness of solutions
There are several theorems that establish existence and uniqueness of solutions to initial value problems involving ODEs both locally and globally. The two main theorems are


 * {| class="wikitable"

! Theorem ! Assumption ! Conclusion
 * Peano existence theorem
 * F continuous
 * local existence only
 * Picard–Lindelöf theorem
 * F Lipschitz continuous
 * local existence and uniqueness
 * }
 * local existence and uniqueness
 * }
 * }

In their basic form both of these theorems only guarantee local results, though the latter can be extended to give a global result, for example, if the conditions of Grönwall's inequality are met.

Also, uniqueness theorems like the Lipschitz one above do not apply to DAE systems, which may have multiple solutions stemming from their (non-linear) algebraic part alone.

Local existence and uniqueness theorem simplified
The theorem can be stated simply as follows. For the equation and initial value problem: $$ y' = F(x,y)\,,\quad y_0 = y(x_0)$$ if F and ∂F/∂y are continuous in a closed rectangle $$R = [x_0-a,x_0+a] \times [y_0-b,y_0+b]$$ in the x-y plane, where a and b are real (symbolically: $a, b ∈ R$) and $×$ denotes the Cartesian product, square brackets denote closed intervals, then there is an interval $$I = [x_0-h,x_0+h] \subset [x_0-a,x_0+a]$$ for some $h ∈ R$ where the solution to the above equation and initial value problem can be found. That is, there is a solution and it is unique. Since there is no restriction on F to be linear, this applies to non-linear equations that take the form F(x, y), and it can also be applied to systems of equations.

Global uniqueness and maximum domain of solution
When the hypotheses of the Picard–Lindelöf theorem are satisfied, then local existence and uniqueness can be extended to a global result. More precisely:

For each initial condition (x0, y0) there exists a unique maximum (possibly infinite) open interval


 * $$I_{\max} = (x_-,x_+), x_\pm \in \R \cup \{\pm \infty\}, x_0 \in I_{\max}$$

such that any solution that satisfies this initial condition is a restriction of the solution that satisfies this initial condition with domain $$I_\max$$.

In the case that $$x_\pm \neq \pm\infty$$, there are exactly two possibilities


 * explosion in finite time: $$\limsup_{x \to x_\pm} \|y(x)\| \to \infty$$
 * leaves domain of definition: $$\lim_{x \to x_\pm} y(x)\ \in \partial \bar{\Omega}$$

where Ω is the open set in which F is defined, and $$\partial \bar{\Omega}$$ is its boundary.

Note that the maximum domain of the solution


 * is always an interval (to have uniqueness)
 * may be smaller than $$\R$$
 * may depend on the specific choice of (x0, y0).


 * Example.


 * $$y' = y^2$$

This means that F(x, y) = y2, which is C1 and therefore locally Lipschitz continuous, satisfying the Picard–Lindelöf theorem.

Even in such a simple setting, the maximum domain of solution cannot be all $$\R$$ since the solution is


 * $$y(x) = \frac{y_0}{(x_0-x)y_0+1}$$

which has maximum domain:


 * $$\begin{cases}\R & y_0 = 0 \\[4pt] \left (-\infty, x_0+\frac{1}{y_0} \right ) & y_0 > 0 \\[4pt] \left (x_0+\frac{1}{y_0},+\infty \right ) & y_0 < 0 \end{cases}$$

This shows clearly that the maximum interval may depend on the initial conditions. The domain of y could be taken as being $$\R \setminus (x_0+ 1/y_0),$$ but this would lead to a domain that is not an interval, so that the side opposite to the initial condition would be disconnected from the initial condition, and therefore not uniquely determined by it.

The maximum domain is not $$\R$$ because


 * $$\lim_{x \to x_\pm} \|y(x)\| \to \infty,$$

which is one of the two possible cases according to the above theorem.

Reduction of order
Differential equations are usually easier to solve if the order of the equation can be reduced.

Reduction to a first-order system
Any explicit differential equation of order n,


 * $$F\left(x, y, y', y'',\ \ldots,\ y^{(n-1)}\right) = y^{(n)}$$

can be written as a system of n first-order differential equations by defining a new family of unknown functions


 * $$y_i = y^{(i-1)}.\!$$

for i = 1, 2, ..., n. The n-dimensional system of first-order coupled differential equations is then


 * $$\begin{array}{rcl}

y_1'&=&y_2\\ y_2'&=&y_3\\ &\vdots&\\ y_{n-1}'&=&y_n\\ y_n'&=&F(x,y_1,\ldots,y_n). \end{array} $$

more compactly in vector notation:


 * $$\mathbf{y}'=\mathbf{F}(x,\mathbf{y})$$

where
 * $$\mathbf{y}=(y_1,\ldots,y_n),\quad \mathbf{F}(x,y_1,\ldots,y_n)=(y_2,\ldots,y_n,F(x,y_1,\ldots,y_n)).$$

Summary of exact solutions
Some differential equations have solutions that can be written in an exact and closed form. Several important classes are given here.

In the table below, $P(x)$, $Q(x)$, $P(y)$, $Q(y)$, and $M(x,y)$, $N(x,y)$ are any integrable functions of $x$, $y$; $b$ and $c$ are real given constants; $C_{1}, C_{2}, ...$ are arbitrary constants (complex in general). The differential equations are in their equivalent and alternative forms that lead to the solution through integration.

In the integral solutions, λ and ε are dummy variables of integration (the continuum analogues of indices in summation), and the notation $∫^{x} F(λ) dλ$ just means to integrate $F(λ)$ with respect to $λ$, then after the integration substitute $λ = x$, without adding constants (explicitly stated).

The guessing method
When all other methods for solving an ODE fail, or in the cases where we have some intuition about what the solution to a DE might look like, it is sometimes possible to solve a DE simply by guessing the solution and validating it is correct. To use this method, we simply guess a solution to the differential equation, and then plug the solution into the differential equation to validate if it satisfies the equation. If it does then we have a particular solution to the DE, otherwise we start over again and try another guess. For instance we could guess that the solution to a DE has the form: $$y = Ae^{\alpha t}$$ since this is a very common solution that physically behaves in a sinusoidal way.

In the case of a first order ODE that is non-homogeneous we need to first find a solution to the homogeneous portion of the DE, otherwise known as the associated homogeneous equation, and then find a solution to the entire non-homogeneous equation by guessing. Finally, we add both of these solutions together to obtain the general solution to the ODE, that is:

$$\text{general solution} = \text{general solution of the associated homogeneous equation} + \text{particular solution}$$

Software for ODE solving

 * Maxima, an open-source computer algebra system.
 * COPASI, a free (Artistic License 2.0) software package for the integration and analysis of ODEs.
 * MATLAB, a technical computing application (MATrix LABoratory)
 * GNU Octave, a high-level language, primarily intended for numerical computations.
 * Scilab, an open source application for numerical computation.
 * Maple, a proprietary application for symbolic calculations.
 * Mathematica, a proprietary application primarily intended for symbolic calculations.
 * SymPy, a Python package that can solve ODEs symbolically
 * Julia (programming language), a high-level language primarily intended for numerical computations.
 * SageMath, an open-source application that uses a Python-like syntax with a wide range of capabilities spanning several branches of mathematics.
 * SciPy, a Python package that includes an ODE integration module.
 * Chebfun, an open-source package, written in MATLAB, for computing with functions to 15-digit accuracy.
 * GNU R, an open source computational environment primarily intended for statistics, which includes packages for ODE solving.