In mathematics, variation of parameters, also known as variation of constants, is a general method to solve inhomogeneous linear ordinary differential equations.
For first-order inhomogeneous linear differential equations it is usually possible to find solutions via integrating factors or undetermined coefficients with considerably less effort, although those methods leverage heuristics that involve guessing and do not work for all inhomogeneous linear differential equations.
Variation of parameters extends to linear partial differential equations as well, specifically to inhomogeneous problems for linear evolution equations like the heat equation, wave equation, and vibrating plate equation. In this setting, the method is more often known as Duhamel's principle, named after Jean-Marie Duhamel (1797–1872) who first applied the method to solve the inhomogeneous heat equation. Sometimes variation of parameters itself is called Duhamel's principle and vice versa.
The method of variation of parameters was first sketched by the Swiss mathematician Leonhard Euler (1707–1783), and later completed by the Italian-French mathematician Joseph-Louis Lagrange (1736–1813).[1]
A forerunner of the method of variation of a celestial body's orbital elements appeared in Euler's work in 1748, while he was studying the mutual perturbations of Jupiter and Saturn.[2] In his 1749 study of the motions of the earth, Euler obtained differential equations for the orbital elements.[3] In 1753, he applied the method to his study of the motions of the moon.[4]
Lagrange first used the method in 1766.[5] Between 1778 and 1783, he further developed the method in two series of memoirs: one on variations in the motions of the planets[6] and another on determining the orbit of a comet from three observations.[7] During 1808–1810, Lagrange gave the method of variation of parameters its final form in a third series of papers.[8]
Given an ordinary non-homogeneous linear differential equation of order n
Let
y1(x),\ldots,yn(x)
Then a particular solution to the non-homogeneous equation is given by
where the
ci(x)
Starting with, repeated differentiation combined with repeated use of gives
One last differentiation gives
By substituting into and applying and it follows that
The linear system (and) of n equations can then be solved using Cramer's rule yielding
ci'(x)=
Wi(x) | |
W(x) |
, i=1,\ldots,n
where
W(x)
y1(x),\ldots,yn(x)
Wi(x)
(0,0,\ldots,b(x)).
The particular solution to the non-homogeneous equation can then be written as
n | |
\sum | |
i=1 |
yi(x)\int
Wi(x) | |
W(x) |
dx.
Consider the equation of the forced dispersionless spring, in suitable units:
x''(t)+x(t)=F(t).
We can construct the solution physically, as follows. Between times
t=s
t=s+ds
F(s)ds
The homogeneous initial-value problem, representing a small impulse
F(s)ds
t=s
x''(t)+x(t)=0, x(s)=0, x'(s)=F(s)ds.
x(t)=F(s)\sin(t-s)ds
x(t)=
t | |
\int | |
0 |
F(s)\sin(t-s)ds.
To verify that this satisfies the required equation:
t | |
x'(t)=\int | |
0 |
F(s)\cos(t-s)ds
x''(t)=F(t)-
tF(s)\sin(t-s)ds | |
\int | |
0 |
=F(t)-x(t),
The general method of variation of parameters allows for solving an inhomogeneous linear equation
Lx(t)=F(t)
xs
Lx(t)=0, x(s)=0, x'(s)=F(s)ds.
x
t | |
(t)=\int | |
0 |
xs(t)ds,
In practice, variation of parameters usually involves the fundamental solution of the homogeneous problem, the infinitesimal solutions
xs
\sin(t-s)=\sint\coss-\sins\cost
y'+p(x)y=q(x)
y'+p(x)y=0
d | |
dx |
y+p(x)y=0
dy | |
dx |
=-p(x)y
{dy\overy}=-{p(x)dx},
\int
1 | |
y |
dy=-\intp(x)dx
ln|y|=-\intp(x)dx+C
y=\pme-\int=C0e-\int
yc=C0e-\int
y'+p(x)y=q(x)
yp=C(x)e-\int
C'(x)e-\int-C(x)p(x)e-\int+p(x)C(x)e-\int=q(x)
C'(x)e-\int=q(x)
C'(x)=q(x)e\int
C(x)=\intq(x)e\intdx+C1
C1=0
yp=e-\int\intq(x)e\intdx
\begin{align} y&=yc+yp\\ &=C0e-\int+e-\int\intq(x)e\intdx \end{align}
This recreates the method of integrating factors.
Let us solve
y''+4y'+4y=\coshx
We want to find the general solution to the differential equation, that is, we want to find solutions to the homogeneous differential equation
y''+4y'+4y=0.
λ2+4λ+4=(λ+2)2=0
Since
λ=-2
u1=e-2x
u2=xe-2x
W=\begin{vmatrix} e-2x&xe-2x\\ -2e-2x&-e-2x(2x-1)\\ \end{vmatrix}=-e-2xe-2x(2x-1)+2xe-2xe-2x=e-4x.
Because the Wronskian is non-zero, the two functions are linearly independent, so this is in fact the general solution for the homogeneous differential equation (and not a mere subset of it).
We seek functions A(x) and B(x) so A(x)u1 + B(x)u2 is a particular solution of the non-homogeneous equation. We need only calculate the integrals
A(x)=-\int{1\overW}u2(x)b(x)dx, B(x)=\int{1\overW}u1(x)b(x)dx
Recall that for this example
b(x)=\coshx
That is,
A(x)=-\int{1\overe-4x
B(x)=\int{1\overe-4x
where
C1
C2
We have a differential equation of the form
u''+p(x)u'+q(x)u=f(x)
and we define the linear operator
L=D2+p(x)D+q(x)
where D represents the differential operator. We therefore have to solve the equation
Lu(x)=f(x)
u(x)
L
f(x)
We must solve first the corresponding homogeneous equation:
u''+p(x)u'+q(x)u=0
by the technique of our choice. Once we've obtained two linearly independent solutions to this homogeneous differential equation (because this ODE is second-order) — call them u1 and u2 — we can proceed with variation of parameters.
Now, we seek the general solution to the differential equation
uG(x)
uG(x)=A(x)u1(x)+B(x)u2(x).
Here,
A(x)
B(x)
u1(x)
u2(x)
A(x)
B(x)
LuG(x)=0
A'(x)u1(x)+B'(x)u2(x)=0.
Now,
\begin{align} uG'(x)&=\left(A(x)u1(x)+B(x)u2(x)\right)'\\ &=\left(A(x)u1(x)\right)'+\left(B(x)u2(x)\right)'\\ &=A'(x)u1(x)+A(x)u1'(x)+B'(x)u2(x)+B(x)u2'(x)\\ &=A'(x)u1(x)+B'(x)u2(x)+A(x)u1'(x)+B(x)u2'(x)\\ &=A(x)u1'(x)+B(x)u2'(x) \end{align}
Differentiating again (omitting intermediary steps)
uG''(x)=A(x)u1''(x)+B(x)u2''(x)+A'(x)u1'(x)+B'(x)u2'(x).
Now we can write the action of L upon uG as
LuG=A(x)Lu1(x)+B(x)Lu2(x)+A'(x)u1'(x)+B'(x)u2'(x).
Since u1 and u2 are solutions, then
LuG=A'(x)u1'(x)+B'(x)u2'(x).
We have the system of equations
\begin{bmatrix} u1(x)&u2(x)\\ u1'(x)&u2'(x)\end{bmatrix} \begin{bmatrix} A'(x)\\ B'(x)\end{bmatrix}= \begin{bmatrix}0\ f\end{bmatrix}.
Expanding,
\begin{bmatrix} A'(x)u1(x)+B'(x)u2(x)\\ A'(x)u1'(x)+B'(x)u2'(x)\end{bmatrix} =\begin{bmatrix}0\\f\end{bmatrix}.
So the above system determines precisely the conditions
A'(x)u1(x)+B'(x)u2(x)=0.
A'(x)u1'(x)+B'(x)u2'(x)=LuG=f.
We seek A(x) and B(x) from these conditions, so, given
\begin{bmatrix} u1(x)&u2(x)\\ u1'(x)&u2'(x) \end{bmatrix} \begin{bmatrix} A'(x)\\ B'(x)\end{bmatrix}= \begin{bmatrix} 0\\ f\end{bmatrix}
we can solve for (A′(x), B′(x))T, so
\begin{bmatrix}A'(x)\ B'(x)\end{bmatrix}= \begin{bmatrix} u1(x)&u2(x)\\ u1'(x)&
-1 | |
u | |
2'(x) \end{bmatrix} |
\begin{bmatrix}0\ f\end{bmatrix}=
1 | |
W |
\begin{bmatrix} u2'(x)&-u2(x)\\ -u1'(x)&u1(x)\end{bmatrix} \begin{bmatrix}0\ f\end{bmatrix},
where W denotes the Wronskian of u1 and u2. (We know that W is nonzero, from the assumption that u1 and u2 are linearly independent.) So,
\begin{align} A'(x)&=-{1\overW}u2(x)f(x),&B'(x)&={1\overW}u1(x)f(x)\\ A(x)&=-\int{1\overW}u2(x)f(x)dx,&B(x)&=\int{1\overW}u1(x)f(x)dx \end{align}
While homogeneous equations are relatively easy to solve, this method allows the calculation of the coefficients of the general solution of the inhomogeneous equation, and thus the complete general solution of the inhomogeneous equation can be determined.
Note that
A(x)
B(x)
A(x)
B(x)
LuG(x)
L