# Annihilator method

In mathematics, the annihilator method is a procedure used to find a particular solution to certain types of inhomogeneous ordinary differential equations (ODE's). It is similar to the method of undetermined coefficients, but instead of guessing the particular solution in the method of undetermined coefficients, the particular solution is determined systematically in this technique. The phrase undetermined coefficients can also be used to refer to the step in the annihilator method in which the coefficients are calculated.

The annihilator method is used as follows. Given the ODE ${\displaystyle P(D)y=f(x)}$, find another differential operator ${\displaystyle A(D)}$ such that ${\displaystyle A(D)f(x)=0}$. This operator is called the annihilator, thus giving the method its name. Applying ${\displaystyle A(D)}$ to both sides of the ODE gives a homogeneous ODE ${\displaystyle {\big (}A(D)P(D){\big )}y=0}$ for which we find a solution basis ${\displaystyle \{y_{1},\ldots ,y_{n}\}}$ as before. Then the original inhomogeneous ODE is used to construct a system of equations restricting the coefficients of the linear combination to satisfy the ODE.

This method is not as general as variation of parameters in the sense that an annihilator does not always exist.

## Example

Given ${\displaystyle y''-4y'+5y=\sin(kx)}$, ${\displaystyle P(D)=D^{2}-4D+5}$. The simplest annihilator of ${\displaystyle \sin(kx)}$ is ${\displaystyle A(D)=D^{2}+k^{2}}$. The zeros of ${\displaystyle A(z)P(z)}$ are ${\displaystyle \{2+i,2-i,ik,-ik\}}$, so the solution basis of ${\displaystyle A(D)P(D)}$ is ${\displaystyle \{y_{1},y_{2},y_{3},y_{4}\}=\{e^{(2+i)x},e^{(2-i)x},e^{ikx},e^{-ikx}\}.}$

Setting ${\displaystyle y=c_{1}y_{1}+c_{2}y_{2}+c_{3}y_{3}+c_{4}y_{4}}$ we find

{\displaystyle {\begin{aligned}\sin(kx)&=P(D)y\\[8pt]&=P(D)(c_{1}y_{1}+c_{2}y_{2}+c_{3}y_{3}+c_{4}y_{4})\\[8pt]&=c_{1}P(D)y_{1}+c_{2}P(D)y_{2}+c_{3}P(D)y_{3}+c_{4}P(D)y_{4}\\[8pt]&=0+0+c_{3}(-k^{2}-4ik+5)y_{3}+c_{4}(-k^{2}+4ik+5)y_{4}\\[8pt]&=c_{3}(-k^{2}-4ik+5)(\cos(kx)+i\sin(kx))+c_{4}(-k^{2}+4ik+5)(\cos(kx)-i\sin(kx))\end{aligned}}}

giving the system

${\displaystyle i=(k^{2}+4ik-5)c_{3}+(-k^{2}+4ik+5)c_{4}}$
${\displaystyle 0=(k^{2}+4ik-5)c_{3}+(k^{2}-4ik-5)c_{4}}$

which has solutions

${\displaystyle c_{3}={\frac {i}{2(k^{2}+4ik-5)}}}$, ${\displaystyle c_{4}={\frac {i}{2(-k^{2}+4ik+5)}}}$

giving the solution set

{\displaystyle {\begin{aligned}y&=c_{1}y_{1}+c_{2}y_{2}+{\frac {i}{2(k^{2}+4ik-5)}}y_{3}+{\frac {i}{2(-k^{2}+4ik+5)}}y_{4}\\[8pt]&=c_{1}y_{1}+c_{2}y_{2}+{\frac {4k\cos(kx)-(k^{2}-5)\sin(kx)}{(k^{2}+4ik-5)(k^{2}-4ik-5)}}\\[8pt]&=c_{1}y_{1}+c_{2}y_{2}+{\frac {4k\cos(kx)+(5-k^{2})\sin(kx)}{k^{4}+6k^{2}+25}}.\end{aligned}}}

This solution can be broken down into the homogeneous and nonhomogeneous parts. In particular, ${\displaystyle y_{p}={\frac {4k\cos(kx)+(5-k^{2})\sin(kx)}{k^{4}+6k^{2}+25}}}$ is a particular integral for the nonhomogeneous differential equation, and ${\displaystyle y_{c}=c_{1}y_{1}+c_{2}y_{2}}$ is a complementary solution to the corresponding homogeneous equation. The values of ${\displaystyle c_{1}}$ and ${\displaystyle c_{2}}$ are determined usually through a set of initial conditions. Since this is a second-order equation, two such conditions are necessary to determine these values.

The fundamental solutions ${\displaystyle y_{1}=e^{(2+i)x}}$ and ${\displaystyle y_{2}=e^{(2-i)x}}$ can be further rewritten using Euler's formula:

${\displaystyle e^{(2+i)x}=e^{2x}e^{ix}=e^{2x}(\cos x+i\sin x)}$
${\displaystyle e^{(2-i)x}=e^{2x}e^{-ix}=e^{2x}(\cos x-i\sin x)}$

Then ${\displaystyle c_{1}y_{1}+c_{2}y_{2}=c_{1}e^{2x}(\cos x+i\sin x)+c_{2}e^{2x}(\cos x-i\sin x)=(c_{1}+c_{2})e^{2x}\cos x+i(c_{1}-c_{2})e^{2x}\sin x}$, and a suitable reassignment of the constants gives a simpler and more understandable form of the complementary solution, ${\displaystyle y_{c}=e^{2x}(c_{1}\cos x+c_{2}\sin x)}$.