College Math Teaching

October 15, 2010

Elementary Differential Equations: the method of undetermined coefficients

Filed under: applied mathematics, differential equations — collegemathteaching @ 1:45 am

Just a brief review: if we have a second order linear differential equation with constant coefficients y^{''} + by' + ay = f(t) we obtain the solution in the following manner: first we solve the related homogeneous differential equation y^{''} + by' + ay = 0 to obtain y_{h} Then, if f is the “right” kind of function, one can make a guess at what a particular solution y_{p} would be up to a constant multiple. One then inserts their candidate for the particular solution into the differential equation to solve for the constant.

What is the “right” kind of function? Basically these are the classes of functions that form a closed class under differentiation. Examples of such closed classes would be exponential functions, sines and cosines (together), polynomials, and possibly multiples of these.

Here is an example to refresh your memory: suppose y^{''}+y =e^{t}  Then y_{h} = Asin(t)+Bcos(t) and we assume y_{p} = De^{t}
Then putting back into the differential equation we obtain 2De^{t}=e^{t} which implies y_{p}=(1/2)e^{t} So it follows that the general solution is y = Asin(t)+Bcos(t) +(1/2)e^{t}

Trouble arises when the forcing function is itself part of the homogeneous solution; example y^{''}+y = sin(t)
We usually tell our students to multiply a candidate for the particular solution by t and try again; e. g. in this example we’d attempt y_{p} = t((r)cos(t)+(s)sin(t)) which works out to y_{p}=(1/2)tcos(t) . But when does this work?

Let’s see: Suppose we have y^{''} + by' + ay = y_{h1} and we attempt y_{p} = Aty_{1} + Bty_{2} where y_{1} and y_{2} are two linearly independent homogeneous solutions. Put these into the differential equation and do some algebra and we obtain:
2Ay'_{1} +2By'_{2} +aAy_{1}+aBy_{2} = y_{h1}

Case One: y_{h}=\alpha e^{rt}\cos (wt) + \beta e^{rt}\sin (wt)
(note: we can let r=0 if needed)

So y_{1}=Ate^{rt}\cos (wt),y_{2}=Bte^{rt}\sin (wt) and then 2y_{h}^{\prime }+ay_{h} becomes:

((2r+a)B-2wA)e^{rt}\sin (wt)+(2wB+(2r+a)A)e^{rt}\cos (wt). Equating
coefficients with the forcing function can lead to a matrix system whose
left hand side is:

\left[ \begin{array}{cc}-2w & 2r+a \\ 2r+a & 2w\end{array}\right] \left[ \begin{array}{c}A \\ B\end{array}\right] The coefficient matrix has rank 2 even if r=0 and a=0. Hence
the system can always be solved.

Case Two y_{h}=ae^{r_{1}t}+be^{r_{2}t},r_{1} \neq r_{2}
Then y_{1}=Ate^{r_{1}t},y_{2}=Bte^{r_{2}t} and then 2y'_{h}+ay_{h} becomes:
A(2 r_{1}+a)e^{r_{1}t} + B(2 r_{2} + a)e^{r_{2}t} which is always solvable unless 2r_{1}+a=0 or 2r_{2}+a=0. In either case, this implies that y_{1} or y_{2} are themselves part of the homogeneous solution. This puts us in

Case Three: y_{h}=ae^{rt}+bte^{rt}
Here: ty_{h} will NOT work as the first term is part of the homogeneous solution. This is the only case where t^2y_{h} is required.
So attempt y_{p}=t^2y_{h}=t^2(A+tB)e^{rt}
Putting into the differential equation we end up with 2(at+1)y_{h}+4ty'_{h}
which upon substituting y_{h}=t^2(A+tB)e^{rt} , becomes:
e^{rt}(B(2a+4r)t^2+(2aA+4Ar+6B)t+2A) .
But remember that 2r=-a as we were in the “real repeated root situation” so this becomes:
Which, of course, can always be solved. Note that r plays no role in the coefficients.

Example: if y^{''}+2ry^{'} + r^{2}y = e^{-rt}+te^{-rt} Then one can easily check that a particular solution is given by y_{p} =(1/2)t^{2}e^{-rt}+(1/6)t^3e^{-rt}

Blog at