In mathematics, the method of undetermined coefficients is an approach to finding a particular solution to certain nonhomogeneous ordinary differential equations and recurrence relations. It is closely related to the annihilator method, but instead of using a particular kind of differential operator (the annihilator) in order to find the best possible form of the particular solution, an ansatz or 'guess' is made as to the appropriate form, which is then tested by differentiating the resulting equation. For complex equations, the annihilator method or variation of parameters is less time-consuming to perform.
Undetermined coefficients is not as general a method as variation of parameters, since it only works for differential equations that follow certain forms.[1]
Consider a linear non-homogeneous ordinary differential equation of the form
n | |
\sum | |
i=0 |
ciy(i)+y(n+1)=g(x)
where
y(i)
y
ci
x
The method of undetermined coefficients provides a straightforward method of obtaining the solution to this ODE when two criteria are met:[2]
ci
e\alpha
\sin{\betax}
\cos{\betax}
{\alpha}
{\beta}
The method consists of finding the general homogeneous solution
yc
n | |
\sum | |
i=0 |
ciy(i)+y(n+1)=0,
and a particular integral
yp
g(x)
y
y=yc+yp.
If
g(x)
h(x)+w(x)
y | |
p1 |
h(x)
y | |
p2 |
w(x)
yp
yp=
y | |
p1 |
+
y | |
p2 |
.
In order to find the particular integral, we need to 'guess' its form, with some coefficients left as variables to be solved for. This takes the form of the first derivative of the complementary function. Below is a table of some typical functions and the solution to guess for them.
Function of x | Form for y | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
kea | Cea | |||||||||||||||||||||||||
kxn, n=0,1,2,\ldots |
Kixi | |||||||||||||||||||||||||
k\cos(ax)ork\sin(ax) | K\cos(ax)+M\sin(ax) | |||||||||||||||||||||||||
kea\cos(bx)orkea\sin(bx) | ea(K\cos(bx)+M\sin(bx)) | |||||||||||||||||||||||||
kixi\right)\cos(bx)
kixi\right)\sin(bx) |
Qixi\right)\cos(bx)+
Rixi\right)\sin(bx) | |||||||||||||||||||||||||
kixi\right)ea\cos(bx)or
kixi\right)ea\sin(bx) | ea
Qixi\right)\cos(bx)+
Rixi\right)\sin(bx)\right) |
If a term in the above particular integral for y appears in the homogeneous solution, it is necessary to multiply by a sufficiently large power of x in order to make the solution independent. If the function of x is a sum of terms in the above table, the particular integral can be guessed using a sum of the corresponding terms for y.[1]
Find a particular integral of the equation
y''+y=t\cost.
The right side t cos t has the form
Pne\alpha\cos{\betat}
with n = 2, α = 0, and β = 1.
Since α + iβ = i is a simple root of the characteristic equation
λ2+1=0
we should try a particular integral of the form
\begin{align} yp&=t\left[F1(t)e\alpha\cos{\betat}+G1(t)e\alpha\sin{\betat}\right]\\ &=t\left[F1(t)\cost+G1(t)\sint\right]\\ &=t\left[\left(A0t+A1\right)\cost+\left(B0t+B1\right)\sint\right]\\ &=\left(A0t2+A1t\right)\cost+\left(B0t2+B1t\right)\sint. \end{align}
Substituting yp into the differential equation, we have the identity
\begin{align} t\cost&=yp''+yp\\ &=\left[\left(A0t2+A1t\right)\cost+\left(B0t2+B1t\right)\sint\right]''+\left[\left(A0t2+A1t\right)\cost+\left(B0t2+B1t\right)\sint\right]\\ &=\left[2A0\cost+2\left(2A0t+A1\right)(-\sint)+\left(A0t2+A1t\right)(-\cost)+2B0\sint+2\left(2B0t+B1\right)\cost+\left(B0t2+B1t\right)(-\sint)\right]\\ & +\left[\left(A0t2+A1t\right)\cost+\left(B0t2+B1t\right)\sint\right]\\ &=[4B0t+(2A0+2B1)]\cost+[-4A0t+(-2A1+2B0)]\sint. \end{align}
Comparing both sides, we have
\begin{cases}1=4B0\\ 0=2A0+2B1\\ 0=-4A0\\ 0=-2A1+2B0 \end{cases}
which has the solution
A0=0, A1=B0=
1 | |
4 |
, B1=0.
We then have a particular integral
yp=
1 | |
4 |
t\cost+
1 | |
4 |
t2\sint.
Consider the following linear nonhomogeneous differential equation:
dy | |
dx |
=y+ex.
This is like the first example above, except that the nonhomogeneous part (
ex
c1ex
Here our guess becomes:
yp=Axex.
By substituting this function and its derivative into the differential equation, one can solve for A:
d | |
dx |
\left(Axex\right)=Axex+ex
Axex+Aex=Axex+ex
A=1.
So, the general solution to this differential equation is:
y=c1ex+xex.
Find the general solution of the equation:
dy | |
dt |
=t2-y
t2
yp=At2+Bt+C,
Plugging this particular function into the original equation yields,
2At+B=t2-(At2+Bt+C),
2At+B=(1-A)t2-Bt-C,
(A-1)t2+(2A+B)t+(B+C)=0.
which gives:
A-1=0, 2A+B=0, B+C=0.
Solving for constants we get:
yp=t2-2t+2
To solve for the general solution,
y=yp+yc
where
yc
yc=c1e-t
y=t2-2t+2+c1e-t