- Linear differential equation
In

mathematics , a**linear differential equation**is adifferential equation of the form: $Ly\; =\; f\; ,$

where the

differential operator "L" is alinear operator , "y" is the unknown function, and theright hand side ƒ is a given function (called the**source term**). The linearity condition on "L" rules out operations such as taking the square of thederivative of "y"; but permits, for example, taking the second derivative of "y". Therefore a fairly general form of such an equation would be: $a\_n(x)\; D^n\; y(x)\; +\; a\_\{n-1\}(x)D^\{n-1\}\; y(x)\; +\; cdots\; +\; a\_1(x)\; D\; y(x)\; +\; a\_0(x)\; y(x)\; =f(x)$

where "D" is the differential operator "d/dx" (i.e. "Dy = y' ", "D"

^{2}"y = y",... "), and the "a_{i}" are given functions. Such an equation is said to have**order**"n", the index of the highest derivative of "y" that is involved. (Assuming a possibly existing coefficient "a_{n}" of this derivative to be non zero, it is eliminated by dividing through it. In case it can become zero, different cases must be considered separately for the analysis of the equation.)If "y" is assumed to be a function of only one variable, one speaks about an

ordinary differential equation , else the derivatives and their coefficients must be understood as (contracted) vectors, matrices ortensor s of higher rank, and we have a (linear)partial differential equation .The case where ƒ = 0 is called a

**homogeneous equation**and its solutions are called**complementary functions**. It is particularly important to the solution of the general case, since any complementary function can be added to a solution of the inhomogeneous equation to give another solution (by a method traditionally called "particular integral and complementary function"). When the "a_{i}" are numbers, the equation is said to have "constant coefficients ".**Homogeneous equations with constant coefficients**The first method of solving linear ordinary differential equations with constant coefficients is due to

Euler , who realized that solutions have the form $e^\{z\; x\}$, for possibly-complex values of $z$. The exponential function is one of the few functions that keep its shape even after differentiation. In order for the sum of multiple derivatives of a function to sum up to zero, the derivatives must cancel each other out and the only way for them to do so is for the derivatives to have the same form as the initial function. Thus, to solve:$frac\; \{d^\{n\}y\}\; \{dx^\{n\; +\; A\_\{1\}frac\; \{d^\{n-1\}y\}\; \{dx^\{n-1\; +\; cdots\; +\; A\_\{n\}y\; =\; 0$

we set $y=e^\{z\; x\}$, leading to

:$z^n\; e^\{zx\}\; +\; A\_1\; z^\{n-1\}\; e^\{zx\}\; +\; cdots\; +\; A\_n\; e^\{zx\}\; =\; 0.$

Division by "e"

^{ "zx"}gives the "n"th-order polynomial:$F(z)\; =\; z^\{n\}\; +\; A\_\{1\}z^\{n-1\}\; +\; cdots\; +\; A\_n\; =\; 0.,$

This equation "F"("z") = 0, is the "characteristic" equation considered later by

Monge andCauchy .Formally, the terms

:$frac\; \{d^\{k\}y\}\; \{dx^\{kquadquad(k\; =\; 1,\; 2,\; dots,\; n).$

of the original differential equation are replaced by "z"

^{"k"}. Solving the polynomial gives "n" values of "z", "z"_{1}, ..., "z"_{"n"}. Substitution of any of those values for "z" into "e"^{ "zx"}gives a solution "e"^{ "z""i""x"}. Since homogeneous linear differential equations obey thesuperposition principle , anylinear combination of these functions also satisfies the differential equation.When these roots are all distinct, we have "n" distinct solutions to the differential equation. It can be shown that these are

linearly independent , by applying theVandermonde determinant , and together they form a basis of the space of all solutions of the differential equation.ExampleSidebar|35%

:$y$**'-2y**+2y"-2y'+y=0 , has the characteristic equation: $z^4-2z^3+2z^2-2z+1=0.\; ,$

This has zeroes, "i", −"i", and 1 (multiplicity 2). The solution basis is then

: $e^\{ix\}\; ,,\; e^\{-ix\}\; ,,\; e^x\; ,,\; xe^x\; ,.$

This corresponds to the real-valued solution basis

: $cos\; x\; ,,\; sin\; x\; ,,\; e^x\; ,,\; xe^x\; ,.$

The preceding gave a solution for the case when all zeros are distinct, that is, each has multiplicity 1. For the general case, if "z" is a (possibly complex) zero (or root) of "F"("z") having multiplicity "m", then, for $kin\{0,1,dots,m-1\}\; ,$, $y=x^ke^\{zx\}\; ,$ is a solution of the ODE. Applying this to all roots gives a collection of "n" distinct and linearly independent functions, where "n" is the degree of "F"("z"). As before, these functions make up a basis of the solution space.

If the coefficients "A

_{i}" of the differential equation are real, then real-valued solutions are generally preferable. Since non-real roots "z" then come in conjugate pairs, so do their corresponding basis functions nowrap|"x"^{"k"}exp^{"zx"}, and the desired result is obtained by replacing each pair with their real-valuedlinear combination s Re("y") and Im("y"), where "y" is one of the pair.A case that involves complex roots can be solved with the aid of

Euler's formula .**Examples**Given $y"-4y\text{\'}+5y=0\; ,$. The characteristic equation is $z^2-4z+5=0\; ,$ which has zeroes 2+"i" and 2−"i". Thus the solution basis $\{y\_1,y\_2\}$ is $\{e^\{(2+i)x\},e^\{(2-i)x\}\}\; ,$. Now "y" is a solution

iff $y=c\_1y\_1+c\_2y\_2\; ,$ for $c\_1,c\_2inmathbb\; C$.Because the coefficients are real,

*we are likely not interested in the complex solutions

*our basis elements are mutual conjugatesThe linear combinations:$u\_1=mbox\{Re\}(y\_1)=frac\{y\_1+y\_2\}\{2\}=e^\{2x\}cos(x)\; ,$ and

:$u\_2=mbox\{Im\}(y\_1)=frac\{y\_1-y\_2\}\{2i\}=e^\{2x\}sin(x)\; ,$

will give us a real basis in $\{u\_1,u\_2\}$.

**Simple harmonic oscillator**The second order differential equation

:$D^2\; y\; =\; -k^2\; y,$

which represents a simple

harmonic oscillator , can be restated as:$(D^2\; +\; k^2)\; y\; =\; 0.$

The expression in parenthesis can be factored out, yielding

:$(D\; +\; i\; k)\; (D\; -\; i\; k)\; y\; =\; 0,$

which has a pair of linearly independent solutions, one for

:$(D\; -\; i\; k)\; y\; =\; 0$

and another for

:$(D\; +\; i\; k)\; y\; =\; 0.$

The solutions are, respectively,

:$y\_0\; =\; A\_0\; e^\{i\; k\; x\}$

and

:$y\_1\; =\; A\_1\; e^\{-i\; k\; x\}.$

These solutions provide a basis for the two-dimensional "solution space" of the second order differential equation: meaning that linear combinations of these solutions will also be solutions. In particular, the following solutions can be constructed

:$y\_\{0\text{'}\}\; =\; \{A\_0\; e^\{i\; k\; x\}\; +\; A\_0\; e^\{-i\; k\; x\}\; over\; 2\}\; =\; A\_0\; cos\; (k\; x)$

and

:$y\_\{1\text{'}\}\; =\; \{A\_1\; e^\{i\; k\; x\}\; -\; A\_1\; e^\{-i\; k\; x\}\; over\; 2\; i\}\; =\; A\_1\; sin\; (k\; x).$

These last two trigonometric solutions are linearly independent, so they can serve as another basis for the solution space, yielding the following general solution:

:$y\_H\; =\; A\_0\; cos\; (k\; x)\; +\; A\_1\; sin\; (k\; x).$

**Damped harmonic oscillator**Given the equation for the damped

harmonic oscillator ::$left(D^2\; +\; \{b\; over\; m\}\; D\; +\; omega\_0^2\; ight)\; y\; =\; 0,$

the expression in parentheses can be factored out: first obtain the characteristic equation by replacing "D" with λ. This equation must be satisfied for all "y", thus:

:$lambda^2\; +\; \{b\; over\; m\}\; lambda\; +\; omega\_0^2\; =\; 0.$

Solve using the

quadratic formula ::$lambda\; =\; \{-b/m\; pm\; sqrt\{b^2\; /\; m^2\; -\; 4\; omega\_0^2\}\; over\; 2\}.$

Use these data to factor out the original differential equation:

:$left(D\; +\; \{b\; over\; 2\; m\}\; -\; sqrt$b^2 over 4 m^2} - omega_0^2} ight) left(D + {b over 2m} + sqrtb^2 over 4 m^2} - omega_0^2} ight) y = 0.

This implies a pair of solutions, one corresponding to

:$left(D\; +\; \{b\; over\; 2\; m\}\; -\; sqrt$b^2 over 4 m^2} - omega_0^2} ight) y = 0

and another to

:$left(D\; +\; \{b\; over\; 2m\}\; +\; sqrt$b^2 over 4 m^2} - omega_0^2} ight) y = 0

The solutions are, respectively,

:$y\_0\; =\; A\_0\; e^\{-omega\; x\; +\; sqrt\{omega^2\; -\; omega\_0^2\}\; x\}\; =\; A\_0\; e^\{-omega\; x\}\; e^\{sqrt\{omega^2\; -\; omega\_0^2\}\; x\}$

and

:$y\_1\; =\; A\_1\; e^\{-omega\; x\; -\; sqrt\{omega^2\; -\; omega\_0^2\}\; x\}\; =\; A\_1\; e^\{-omega\; x\}\; e^\{-sqrt\{omega^2\; -\; omega\_0^2\}\; x\}$

where ω = "b" / 2"m". From this linearly independent pair of solutions can be constructed another linearly independent pair which thus serve as a basis for the two-dimensional solution space:

:$y\_H\; (A\_0,\; A\_1)\; (x)\; =\; left(A\_0\; sinh\; sqrt\{omega^2\; -\; omega\_0^2\}\; x\; +\; A\_1\; cosh\; sqrt\{omega^2\; -\; omega\_0^2\}\; x\; ight)\; e^\{-omega\; x\}.$

However, if |ω| < |ω

_{0}| then it is preferable to get rid of the consequential imaginaries, expressing the general solution as:$y\_H\; (A\_0,\; A\_1)\; (x)\; =\; left(A\_0\; sin\; sqrt\{omega\_0^2\; -\; omega^2\}\; x\; +\; A\_1\; cos\; sqrt\{omega\_0^2\; -\; omega^2\}\; x\; ight)\; e^\{-omega\; x\}.$

This latter solution corresponds to the underdamped case, whereas the former one corresponds to the overdamped case: the solutions for the underdamped case oscillate whereas the solutions for the overdamped case do not.

**Nonhomogeneous equation with constant coefficients**To obtain the solution to the

**non-homogeneous equation**(sometimes called**inhomogeneous equation**), find a particular solution "y"_{"P"}("x") by either themethod of undetermined coefficients or themethod of variation of parameters ; the general solution to the linear differential equation is the sum of the general solution of the related homogeneous equation and the particular solution.Suppose we face

:$frac\; \{d^\{n\}y\}\; \{dx^\{n$ + A_{1}frac {d^{n-1}y} {dx^{n-1 + cdots + A_{n}y = f(x).

For later convenience, define the characteristic polynomial

:$P(v)=v^n+A\_1v^\{n-1\}+cdots+A\_n.$

We find the solution basis $\{y\_1,y\_2,ldots,y\_n\}$ as in the homogeneous ("f"=0) case. We now seek a

**particular solution**"y_{p}" by the**variation of parameters**method. Let the coefficients of the linear combination be functions of "x"::$y\_p=u\_1y\_1+u\_2y\_2+cdots+u\_ny\_n.$

Using the "operator" notation $D=d/dx$ and a broad-minded use of notation, the ODE in question is $P(D)y=f$; so

:$f=P(D)y\_p=P(D)(u\_1y\_1)+P(D)(u\_2y\_2)+cdots+P(D)(u\_ny\_n).$

With the constraints

:$0=u\text{'}\_1y\_1+u\text{'}\_2y\_2+cdots+u\text{'}\_ny\_n$:$0=u\text{'}\_1y\text{'}\_1+u\text{'}\_2y\text{'}\_2+cdots+u\text{'}\_ny\text{'}\_n$:$cdots$:$0=u\text{'}\_1y^\{(n-2)\}\_1+u\text{'}\_2y^\{(n-2)\}\_2+cdots+u\text{'}\_ny^\{(n-2)\}\_n$

the parameters commute out, with a little "dirt":

:$f=u\_1P(D)y\_1+u\_2P(D)y\_2+cdots+u\_nP(D)y\_n+u\text{'}\_1y^\{(n-1)\}\_1+u\text{'}\_2y^\{(n-1)\}\_2+cdots+u\text{'}\_ny^\{(n-1)\}\_n.$

But $P(D)y\_j=0$, therefore

:$f=u\text{'}\_1y^\{(n-1)\}\_1+u\text{'}\_2y^\{(n-1)\}\_2+cdots+u\text{'}\_ny^\{(n-1)\}\_n.$

This, with the constraints, gives a linear system in the $u\text{'}\_j$. This much can always be solved; in fact, combining

Cramer's rule with theWronskian ,:$u\text{'}\_j=(-1)^\{n+j\}frac\{W(y\_1,ldots,y\_\{j-1\},y\_\{j+1\}ldots,y\_n)\_\{0\; choose\; f${W(y_1,y_2,ldots,y_n)}.

The rest is a matter of integrating $u\text{'}\_j.$

The particular solution is not unique; $y\_p+c\_1y\_1+cdots+c\_ny\_n$ also satisfies the ODE for any set of constants "c

_{j}".**Example**Suppose $y"-4y\text{\'}+5y=sin(kx)$. We take the solution basis found above $\{e^\{(2+i)x\},e^\{(2-i)x\}\}$.:

Using the

list of integrals of exponential functions :(Notice that "u"

_{1}and "u"_{2}had factors that canceled "y"_{1}and "y"_{2}; that is typical.)For interest's sake, this ODE has a physical interpretation as a driven damped

harmonic oscillator ; "y_{p}" represents the steady state, and $c\_1y\_1+c\_2y\_2$ is the transient.**Equation with variable coefficients**A linear ODE of order "n" with variable coefficients has the general form:$p\_\{n\}(x)y^\{(n)\}(x)\; +\; p\_\{n-1\}(x)\; y^\{(n-1)\}(x)\; +\; cdots\; +\; p\_0(x)\; y(x)\; =\; r(x).$

**Examples**A particular simple example is the

Cauchy-Euler equation often used in engineering:$x^n\; y^\{(n)\}(x)\; +\; a\_\{n-1\}\; x^\{n-1\}\; y^\{(n-1)\}(x)\; +\; cdots\; +\; a\_0\; y(x)\; =\; 0.$

**First order equation**ExampleSidebar|35%|$-3y"+4y\text{\'}=5\; ,$ with the initial condition

: $fleft(0\; ight)=2.\; ,$

Using the general solution method:

: $f=e^\{-3x\}left(int\; 2\; e^\{3x\},\; dx\; +\; kappa\; ight).\; ,$

The integration is done from 0 to x, giving:

: $f=e^\{-3x\}left(2/3left(\; e^\{3x\}-e^0\; ight)\; +\; kappa\; ight).\; ,$

Then we can reduce to:

: $f=2/3left(1-e^\{-3x\}\; ight)\; +\; e^\{-3x\}kappa.\; ,$

where "κ" is 2 from the initial condition.A linear ODE of order 1 with variable coefficients has the general form

:$Dy(x)\; +\; f(x)\; y(x)\; =\; g(x).$

Equations of this form can be solved by multiplying the

integrating factor :$e^\{int\; f(x),dx\}$

throughout to obtain

:$Dy(x)e^\{int\; f(x),dx\}+f(x)y(x)e^\{int\; f(x),dx\}=g(x)e^\{int\; f(x)\; ,\; dx\},$

which simplifies due to the

product rule to: $D\; (y(x)e^\{int\; f(x),dx\})=g(x)e^\{int\; f(x),dx\}$

which, on integrating both sides, yields

: $y(x)e^\{int\; f(x),dx\}=int\; g(x)e^\{int\; f(x),dx\}\; ,dx+c\; ~,$

: $y(x)\; =\; \{int\; g(x)e^\{int\; f(x),dx\}\; ,dx+c\; over\; e^\{int\; f(x),dx\; ~.$

In other words: The solution of a first-order linear ODE

: $y\text{'}(x)\; +\; f(x)\; y(x)\; =\; g(x),$

with coefficients that may or may not vary with "x", is:

:$y=e^\{-a(x)\}left(int\; g(x)\; e^\{a(x)\},\; dx\; +\; kappa\; ight)$

where "$kappa$" is the constant of integration, and

: $a(x)=int\{f(x),dx\}.$

**Examples**Consider a first order differential equation with

constant coefficients ::$frac\{dy\}\{dx\}\; +\; b\; y\; =\; 1.$

This equation is particularly relevant to first order systems such as

RC circuit s and mass-damper systems.In this case, "p"("x") = b, "r"("x") = 1.

Hence its solution is

:$y(x)\; =\; e^\{-bx\}\; left(\; e^\{bx\}/b+\; C\; ight)\; =\; 1/b\; +\; C\; e^\{-bx\}\; .$

**ee also***

Laplace transform

*Fourier transform

*Wikimedia Foundation.
2010.*