Skip to main content

Section 3.2 The Method of Undetermined Coefficients

In Section 3.1, I presented the method for solving homogeneous SOCCLDEs. Now I want to move on to the non-homogeneous case. Recall, in the interpretation as harmonic systems, that the non-homogeneous term \(f(t)\) is an external force on the system. I understand how a harmonic system wants to act when left on its own, but now I want to understand how it acts when subjet to some external force.
There are two main techniques for solving the non-homogeneous case. This section introduces the first of those techniques: undetermined coefficients. The second method, variation of parameters, is more general, but undetermined coefficients is easier and faster for particular types of non-homogemeous terms. In the spirit of applications to harmonic motion, I will often refer to the non-homogenous part of the SOCCLDE as a forcing term.
Recall, before I start, that if \(Ly = f(t)\) is a non-homogeneous SOCCLDE, I know the structure of the general family of solutions from superposition. I expect two linearly independent solutions, \(y_1\) and \(y_2\text{,}\) for the homogenous equaiton \(Ly = 0\text{.}\) I only need to look for one particular solution \(y_p\) of \(Ly = f(t)\text{.}\) The general solution is the superposition of the particular solution and a linear combination fo the homogeneous solutions.
\begin{equation*} y = y_p + A y_1 + B y_2 \end{equation*}
Undetermined coefficents and variation of parameters try to find this particular solution \(y_p\text{.}\) Ihen I use the homogenous solutions to write the complete family..
The idea of undetermined coefficients is based on the assumption that the forcing term is likely to dominate the system, so eventually the behaviour of the system should mimic the forcing term. Therefore, the particular solution should be the same type of function as the forcing term. If the forcing is polynomial, I look for a polynomial solution; if the forcing is exponential, I look for an exponential solution; and if the foring is sinusoidal, I look for a sinusoidal solution. Undertermined coefficients is going to work well for these three types of forcing terms or forcing terms given by products of functions of these types. However, it doesn’t apply to other types of functions, where I can’t reasonably expect the solution to look like the forcing term.
There is one possible pitfall to the process: sometimes the forcing terms is similar to the homogeneous solutions. In this case, the same type of function will only solve the homogeneous equation, not the non-homogeneous case. The solution here is reminiscent of the case of repeated roots: I multiply by the independent variable \(t\) until we get something new. I’ll show how this works out in examples.
Before I get into examples, here is a useful chart. As I said, I want to guess a similar type of functions to the forcing. What is similar? This chart gives the guesses that are used in the process. The constants \(C_i\) and \(D_j\) need to be determined: these constants are the undetermined coefficients which give the process its name.
\(f(t)\) \(y_p\)
\(ke^{at}\) \(Ce^{at}\)
\(kt^n\) \(C_n t^n + C_{n-1}t^{n-1} + \dots + C_1 t + C_0\)
\(k \cos(at)\) or \(k \sin(at)\) \(C \cos(at) + D\sin(at)\)
\(kt^n e^{at}\) \(e^{at}\left(C_n t^n + C_{n-1}t^{n-1} + \dots + C_1 t + C_0\right)\)
\(k t^n \cos(at)\) or \(k t^n \sin(at)\) \(\left(C_nt^n + \dots +C_0 \right)\cos(at)\)
\(+ \left(D_nt^n + \dots + D_0 \right)\sin(at)\)
\(ke^{at} \cos(bt)\) or \(ke^{at} \sin(bt)\) \(e^{at}\left(C \cos(at) + D\sin(at)\right)\)
\(k t^n e^{at }\cos(bt)\) or \(k t^n e^{at} \sin(bt)\) \(\left(C_nt^n + \dots +C_0 \right)e^{at}\cos(bt)\)
\(+ \left(D_nt^n + \dots + D_0 \right)e^{bt}\sin(bt)\)
With this chart, the algorithm is straightforward (if often lengthy in calculation). I take the appropriate guess from the chart put it into the DE, and try to work out the unknown coefficients.

Example 3.2.1.

\begin{equation*} y^{\prime \prime} - 3y^\prime + 2y = t \end{equation*}
The initial values are \(y(0) = \frac{3}{4}\) and \(y^\prime(0) = \frac{3}{2}\text{.}\) The linear differential operator is
\begin{equation*} L = \frac{d^2}{dt^2} + 3 \frac{d}{dt} + 2 \text{.} \end{equation*}
I first solve the homogeneous case using the characteristic equation, finding the roots and writing the general solution.
\begin{align*} Ly \amp = 0 \implies r^2 - 3r + 2 = 0 \\ (r-2)(r-1) \amp = 0 \implies r = 1,2 \\ y_h \amp = A e^{2t} + B e^t \end{align*}
The force term is \(t\text{,}\) which is a polynomial of degree one. The guess for undetermined coefficients is a polynomial of the same degree.
\begin{equation*} y_p = Ct + D \end{equation*}
I’ll need the derivatives of the guess to put it into the differential equation.
\begin{align*} y_p^\prime \amp = C \\ y_p^{\prime \prime} \amp = 0 \end{align*}
I put all the pieces into the non-homogeneous DE.
\begin{equation*} 0 - 3C + 2(Ct + D) = t \implies (2C-1)t + (D-3C) = 0 \end{equation*}
This is an equation of polynomials. It is true only if botht the coefficients on the left are zero. The first coefficient lets me calculate \(C\text{.}\)
\begin{equation*} 2C = 1 \implies C = \frac{1}{2} \end{equation*}
Knowing \(C\text{,}\) I can use the second coefficient to calculate \(D\text{.}\)
\begin{equation*} -3C + 2D = 0 \implies -3 \frac{1}{2} + 2 D = 0 \implies D = \frac{3}{4} \end{equation*}
Now that I have the coefficients, I know the particular solution.
\begin{equation*} y_p = \frac{t}{2} + \frac{3}{4} \end{equation*}
Finally, the general solution is the particular solution plus the homogeneous solution.
\begin{equation*} y = \frac{t}{2} + \frac{3}{4} + A e^{2t} + B e^t \end{equation*}
Now I put in the initial values. First I use the initial value of the function.
\begin{equation*} y(0) = A + B + \frac{3}{4} = \frac{3}{4} \implies A = -B \end{equation*}
Then I use the initial value for the derivative. First I need to calculate the derivative of the full solution.
\begin{equation*} y^\prime = 2Ae^{2t} + Be^t + \frac{1}{2} \end{equation*}
Then I input the initial condition.
\begin{equation*} y^\prime(0) = \frac{3}{2} \implies 2A + B + \frac{1}{2} = \frac{3}{2} \implies 2A + B - 1 = 0 \end{equation*}
Now I have a system of two equations from the two initial conditions. The solution to the system is \(A=1\) and \(B = -1\text{.}\) Finally, I can write the specific solution to the non-homogeneous initial value problem.
\begin{equation*} y = \frac{t}{2} + \frac{3}{4} + e^{2t} - e^t \end{equation*}

Example 3.2.2.

This example lacks initial values. I’ve skipped over some of the algebra for the sake of brevity.
\begin{equation*} y^{\prime \prime} + 8 y^\prime + 3y = e^{-2t} \cos 2t \end{equation*}
The linear differential operator is
\begin{equation*} L = \frac{d^2}{dt^2} + 8 \frac{d}{dt} + 3\text{.} \end{equation*}
I first solve the homogeneous case using the characteristic equation, finding the roots and writing the general solution.
\begin{align*} Ly \amp = 0 \implies r^2 + 8r + 3 = 0\\ r \amp = -4 \pm \sqrt{13}\\ y_h \amp = Ae^{(-4+\sqrt{13})t} + B e^{(-4-\sqrt{13})t} \end{align*}
The force term is \(e^{-2t} \cos (2t)\text{,}\) which is a product of an exponential and a sinuosoidal term one. The guess for undetermined coefficients has the same pattern.
\begin{equation*} y_p = e^{-2t} (C \cos 2t + D \sin 2t) \end{equation*}
I’ll need the derivatives of the guess to put it into the differential equation.
\begin{align*} y^\prime \amp = e^{-2t} ( (-2C + 2D) \cos 2t + (-2D -2C)\sin 2t)\\ y^{\prime\prime} \amp = e^{-2t} ( (-8D) \cos 2t + (8C)\sin 2t) \end{align*}
I put all the pieces into the non-homogeneous DE.
\begin{equation*} L y_p = e^{-2t} ((8D-13C) \cos 2t + (-8C -13D) \sin 2t) = e^{-2t} \cos 2t \end{equation*}
I need to compare coefficients. There is a cosine term on the right with coefficient \(1\text{.}\) There is no sine term on the right, so that coefficient has to be \(0\text{.}\) This gives a system of two equations.
\begin{align*} 8D - 13 C \amp = 1\\ -8C - 13 D \amp = 0 \end{align*}
First I use the second equation to isolate \(D\text{.}\)
\begin{equation*} D = \frac{-8C}{13} \end{equation*}
Then I substitute the value of \(D\) in the first equation and solve for \(C\text{.}\) Once I know \(C\text{,}\) I can use the previous equation to find \(D\) as well.
\begin{equation*} C = \frac{-13}{233} \implies D = \frac{8}{233} \end{equation*}
Now that I have the coefficients, I know the particular solution.
\begin{equation*} y_p = e^{-2t} \left( \frac{-13}{233} \cos 2t + \frac{8}{233} \sin 2t \right) \end{equation*}
Finally, the general solution is the particular solution plus the homogeneous solution.
\begin{equation*} y = Ae^{(-4+\sqrt{13})t} + B e^{(-4-\sqrt{13})t} + e^{-2t} \left( \frac{-13}{233} \cos 2t + \frac{8}{233} \sin 2t \right) \end{equation*}
It is useful to go back to the harmonic system interpretation to understand these solutions. There are no oscillations in the homogeneous case here: sufficient friction gives exponential decay. However, there is oscillating forcing, though the forcing is also undering going exponential decay. This forcing is enough to add sinusoidal behaviour to the full solutions, but the decaying forcing terms means that the sinusoidal term will also decay over time. The amplitude of this combination of waves is given by the pythagorean combination: \(\frac{\sqrt{13^2 + 8^2}}{233} = \frac{1}{\sqrt{233}}\text{.}\)

Example 3.2.3.

In this example, the forcing term is similar to one of the homogeneous solutions. I multiplied by \(t\) in the guess for the particular solution to account for this. Again, I’ve skipped some of the algebra in this example, particularly omitting the long derivatives and calculation of \(Ly_p\text{.}\)
\begin{equation*} y^{\prime \prime} + 2y^\prime + 2y = f(t) = 4e^{-t} \sin t \end{equation*}
First I solve the homogeneous case via the characteristic equation.
\begin{equation*} r^2 + 2r + 2 = 0 \implies r = -1 \pm \imath \end{equation*}
The complex roots of the characteristic equation lead to exponentially damped sinusoidal solutions. This is the full homogeneous solution.
\begin{equation*} y_h = e^{-t} (A \sin t + B \cos t) \end{equation*}
Here is my guess for the particular solution.
\begin{equation*} y_p = te^{-t} (C \sin t + D \cos t ) \end{equation*}
I need its derivatives to put into the differential equation.
\begin{equation*} y_p^{\prime} = e^{-t} (C \sin t + D \cos t) + te^{-t}((-C-D)\sin t + (-D+C)\cos t) \end{equation*}
\begin{equation*} y_p^{\prime\prime} = e^{-t} ((-2C-2D) \sin t + (-2D+2C) \cos t) + te^{-t}((2D)\sin t + (-2C)\cos t) \end{equation*}
I put the guess and its derivative into the DE.
\begin{equation*} L y_p = e^{-t} ((-2D) \sin t + (2C) \cos t) = 4e^{-t} \sin t \end{equation*}
Comparing the coefficients of sine and cosine on the left and the right produces a system of two equation. The first equation gives the value of \(D\text{.}\)
\begin{equation*} -2D = 4 \implies D = -2 \end{equation*}
The second equation gives the value of \(C\text{.}\)
\begin{equation*} 2C = 0 \implies C = 0 \end{equation*}
I use the coefficients to write the particular solution.
\begin{equation*} y_p = -2te^{-t} \cos t \end{equation*}
The general solution is the particular solution added to the homogeneous solution.
\begin{equation*} y = -2te^{-t} \cos t + e^{-t} (A \sin t + B \cos t) \end{equation*}
In this result, the full solution still has exponential decay, since the exponential is asymptotically dominant in the \(te^{-t}\) term. However, the trajectory and behaviour of the decay differs, particular for small \(t\text{,}\) from the behavour of the homogeneous solution by itself.