# The Method of Undetermined Coefficients

fact
Undetermined Coefficients is a method best suited to constant coefficient differential equations of the form: $$y'' + A_1y' + A_2y = g(t)$$ Where $$A_1$$ and $$A_2$$ are constants.
fact
Undetermined coefficients will work only for a small number of $$g(t)$$'s however these are commonly found and when it can be used undetermined coefficients is an excellent, and simple, method.
fact
The idea behind undetermined coefficients is that the "form" of our solution $$y_p(t)$$ will be similar, and based off of, the form of $$g(t)$$. By guessing a solution of the right "form" (to be defined later) we can solve for some constants and end up with a complete $$y_p$$.
fact
The method works as follows:
1. Find the complementary solutions to the equation (set $$g(t) = 0$$ and solve)
2. Use some simple rules to guess at $$y_p$$ from $$g_t$$
3. If our $$y_p$$ is in our complementary solution multiply it by $$t$$
4. Plug $$y_p$$ into the equation and solve for the constants
example

Find a particular solution to: $$y'' - 4y' - 12y = 3e^{5t}$$

First we'll find the complementary solution, so: $$r^2 - 4r - 12 = 0 \implies (r-6)(r+2)=0 \implies r = 6, r = -2$$ So $$y_c(t) = c_1e^{6t} + c_2e^{-2t}$$ Now we figure that since $$g(t) = 3e^{5t}$$ our solution will look a little something like $$y_p(t) = Ae^{5t}$$ Plugging this in we'll get: $$25Ae^{5t} - 20Ae^{5t} - 12Ae^{5t} = 3e^{5t}$$ $$-7A = 3 \implies A = \frac{-3}{7}$$ Which means: $$y_p(t) = \frac{-3}{7}e^{5t}$$ And our total solution will be given by: $$y(t) = c_1e^{6t} + c_2e^{-2t} - \frac{3}{7}e^{5t}$$ If we were given some initial conditions we would then use this equation to solve for $$c_1$$ and $$c_2$$.
fact
The following is a table of good guesses for $$y_p(t)$$ given some $$g(t)$$.
$$g(t)$$ $$y_p(t)$$
$$Ce^{ax}$$ $$Ae^{ax}$$
$$C\cos(at)$$ or $$C\sin(at)$$ $$A\cos(at) + B\sin(at)$$
$$C_1\cos(at) + C_2\sin(at)$$ $$A\cos(at) + B\sin(at)$$
$$n^{th}$$ degree polynomial $$A_nt^n + A_{n-1}t^{n-1} + \cdots + A_1t + A_0$$
fact
If $$g(t)$$ is a linear combination of some of the above examples take a combination of the example $$y_p(t)$$'s. E.G. for $$g(t) = t + e^t$$ guess $$y_p(t) = At + B + Ce^t$$
example

Find a particular solution to $$y'' - 4y' - 12y = 2t^3 - t + 3$$

We found the homogeneous solutions previously, they are: $$y_h = c_1e^{-2t} + c_2e^{6t}$$ Now with those standing by let's use our $$y_p$$ table above to guess at our particular solution. Since $$g(t) = 2t^3 - t + 3$$ we're dealing with a polynomial so our solution will look like: $$y_p(t) = At^3 + Bt^2 + Ct + D$$ For a polynomial our $$y_p(t)$$ will have the same degree and will have all powers below that degree even if they aren't in $$g(t)$$, which is why we have a $$t^2$$ term in our $$y_p$$ even though $$g$$ doesn't have one. Now we need $$y_p'(t)$$ and $$y_p''(t)$$: $$y_p'(t) = 3At^2 + 2Bt + C$$ $$y_p''(t) = 6At + 2B$$ Plugging them into our differential equation: $$6At + 2B - 4(3At^2 + 2B + C) - 12(At^3 + Bt^2 + Ct + D) = 2t^3 - t + 3$$ $$-12At^3 +(-12A -12B)t^2 + (6A -8B -12C)t + 2B - 4C - 12D = 2t^3 - t + 3$$ Setting the coefficients from each side of the $$t^3$$ term, $$t^2$$ term, etc... equal we get our system of equations: $$-12A = 2 \implies A = -\frac{1}{6}$$ $$-12A - 12B = 0 \implies B = \frac{1}{6}$$ $$6A - 8B - 12C = 1 \implies C = -\frac{1}{9}$$ $$2B - 4C - 12D = 3 \implies D = -\frac{5}{27}$$ Our particular solution is then: $$y_p(t) = -\frac{1}{6}t^3 + \frac{1}{6}t^2 - \frac{1}{9}t - \frac{5}{27}$$
practice problems