# Ngô Quốc Anh

## February 16, 2010

### ODE: The method of undetermined coefficients

Filed under: PDEs — Ngô Quốc Anh @ 12:59

Happy Lunar New  Year!

This method is more limited in scope; it applies only to the special case of

$\displaystyle y'+p(t)y=g(t)$

where $p(t)$ is a constant and $g(t)$ has some special form. The advantage of the method is that it does not require any integrations and is therefore quick to use. The homogeneous equation

$\displaystyle y'+\lambda y=0$

has the solution

$\displaystyle y_h=Ce^{-\lambda t}$.

To solve the inhomogeneous equation

$\displaystyle y'+\lambda y=g(t)$,

it suffices to find one particular solution $y_p(t)$. If $y_p(t)$ is any particular solution, then the general solution is

$\displaystyle y(t)=y_p(t)+Ce^{-\lambda t}$.

The idea behind the method of undetermined coefficients is to look for $y_p(t)$ which is of a form like that of $g(t)$. This is possible only for special functions $g(t)$, but these special cases arise quite frequently in applications.

Case 1. We start with the case where $g(t)$ is an exponential

$\displaystyle g(t)=A e^{\alpha t}$.

We look for $y(t)$ in a similar form

$\displaystyle y(t)=a e^{\alpha t}$.

$\displaystyle y'=a\alpha e^{\alpha t}, \quad y'+\lambda y=(\alpha+\lambda)ae^{\lambda t}$.

So the differential equation becomes

$\displaystyle (\alpha+\lambda)ae^{\lambda t} = Ae^{\alpha t}$.

We can solve this to find

$\displaystyle a=\frac{A}{\alpha+\lambda}$.

This leads to the particular solution

$\displaystyle {y_p}(t) = \frac{A}{{\alpha + \lambda }}{e^{\alpha t}}$,

and the general solution

$\displaystyle y(t) = \frac{A}{{\alpha +\lambda }}{e^{\alpha t}} + C{e^{ - \alpha t}}$.

Case 2. If $y$ is a polynomial of degree $n$, then $y'$ is a polynomial of degree $n-1$. If $g$ is a polynomial, we can therefore look for polynomial solutions. Consider

$\displaystyle y'+2y=t^2$.

The right hand side is a polynomial of degree $2$, so we look for a solution in the same form $y=at^2+bt+c$. This leads to $y'=2at+b$, and

$\displaystyle y'+2y=2at^2+(2a+2b)t+b+2c=t^2$.

To satisfy this, we want to set

$\displaystyle 2a=1, \quad 2a+2b=0, \quad b+2c=0$.

This leads to $a=\frac{1}{2}$, $b=-\frac{1}{2}$, $c=\frac{1}{4}$. So a particular solution is

$\displaystyle y_p=\frac{t^2}{2}-\frac{t}{2}+\frac{1}{4}$.

The general solution is

$\displaystyle y=\frac{t^2}{2}-\frac{t}{2}+\frac{1}{4}+Ce^{-2t}$.

We note that the solution

$\displaystyle y(t) = \frac{A}{{\alpha +\lambda }}{e^{\alpha t}} + C{e^{ - \alpha t}}$

breaks down if $\alpha=-\lambda$, since it would involve a division by zero. More generally, if the equation reads

$\displaystyle y'+\lambda y=g(t)$,

and $g(t)=e^{\alpha t}P_n(t)$, with $P_n(t)$ an nth degree polynomial, then we can find a particular solution

$\displaystyle y_p(t)=e^{\alpha t} Q_n(t)$,

where $Q_n(t)$ is some other nth degree polynomial as long as $\alpha \ne -\lambda$. If, on the other hand, $\alpha=-\lambda$, we have to modify the procedure. The modification is simply to include an extra factor $t$ in the solution. That is, instead of setting

$\displaystyle y_p(t)=e^{\alpha t} Q_n(t)$,

you set

$\displaystyle y_p(t)=t e^{\alpha t} Q_n(t)$.