Section 15.8 Constant Coefficients, Inhomogeneous
Form of the equation.
An \(n\)th order linear differential equation with constant coefficients is inhomogeneous if it has a nonzero “source” or “forcing function,” i.e. if it has a term that does NOT involve the unknown function. We will call this source \(b(x)\text{.}\) The form of these equations is:
In the second form for these equations, we have rewritten all the messy derivative information as a linear differential operator \(\LL\) so that it is easier to see the important steps of the algebra below.
Strategy.
The following theorem explains how you will know when you have the most general solution of these equations. The proof is simple and illustrative, it's worth reading.
Theorem 15.14.
An inhomogeneous \(n\)th-order ordinary differential equation with constant coefficients admits exactly \(n\) linearly-independent solutions. The general solution of the inhomogeneous equation is the sum of the general solution of the homogeneous equation \(y_h\) PLUS any one solution to the inhomogeneous equation, called a particular solution \(y_p\text{.}\)
Proof.
The general solution of the homogeneous equation satisfies \(\LL y_h=0\) and the particular solution satisfies \(\LL y_p=b(x)\text{.}\) Since the differential operator \(\LL\) is linear (see Section 14.6), it is straightforward to see that:
This theorem is telling us first to solve the homogeneous equation, which we know has \(n\) linearly independent solutions. The general solution will have \(n\) undetermined coefficients. Then we find one particular solution and add this and we're done.
Method/Simple Examples.
So how do we find a particular solution to an inhomogenous ODE with constant coefficients? The general case is difficult and beyond the scope of this book. But it is easy to find particular solutions for the special cases that come up most often in physics. We will illustrate the method with examples.
Consider the ODE
Since derivatives of exponential functions are proportional to themselves, we choose an ansatz of the form
Notice that in this ansatz we are solving for the constant coefficient \(C\text{,}\) not the exponent as in section 15.6. The exponent is determined by the form of the inhomogeneous term.
Substituting (15.8.4) into (15.8.3), we obtain
which we can solve for \(C\text{,}\) yielding \(C=1/24\text{.}\) Putting our particular solution (15.8.4) together with the general homogenous solution derived in Section 15.6, the general solution of (15.8.3) is
Source terms that are trigonometric functions are similar, again recalling Euler's formula. Consider the ODE
The trick here is to recognize that \(\sin(3x)\) involves both of \(e^{\pm3ix}\text{,}\) so we had better incorporate both into our ansatz. However, we can do so by using trigonometric functions, rather than exponentials. Thus, we try a particular solution of the form
which results in
Collecting terms, and setting the coefficients of the linearly independent functions \(\sin(3x)\) and \(\cos(3x)\) separately to zero results in
so that \(A=-1/5\text{,}\) \(B=0\) and our general solution is
Typically, the particular solution will involve both sines and cosines. (Why doesn't that happen here?)
More General Cases.
The method above will work for any single inhomogeneous term of the form \(x^m e^{\alpha x} \cos{\beta x}\) or \(x^m e^{\alpha x} \sin{\beta x}\text{,}\) where \(m\) is a non-negative integer and \(\alpha\) and \(\beta\) are real numbers, including possibly zero, with one caveat: since, in the differential equation, you will be taking derivatives of the proposed solution in the ansatz, the proposed solution should also contain terms of the same form as the derivatives, each with its own unknown constant. For example, if the inhomogeneous term is \(x^2 \cos{3x}\text{,}\) the proposed solution should be
and you will need to solve for all of the constants \(\left\{A, B, C, D, E, F\right\}\text{.}\) (Keep differentiating until you don't get any terms with a new form.)
It is also possible to solve equations with more complicated inhomogeneous terms as long as the inhomogeneous term can be written as a linear combination of terms of the types above \(b(x)=b_1(x)+b_2(x)+\dots\text{.}\) We just solve an inhomogeneous equation for each of the terms \(b_i\) separately and add the solutions \(y_p=y_{p_1}+y_{p_2}+\dots\text{.}\) Notice how the linearity of the differential operator \(\LL\) guarantees that this method works in the following simple proof: Suppose \(\LL y_{p_i} = b_i\) for several values of the index \(i\text{.}\) Then:
Relationship to Fourier Series and Power Series.
If the inhomogeneous term is a periodic function, then we can expand it in a Fourier series (see Chapter 16). Once you learn to do Fourier Series, the method you have just learned becomes much more general, it applies to any periodic “source” or “forcing function”. Similarly, if the inhomogeneous term can be expanded in a power series (see Chapter 13), then this method will also work. So, we see that the method is actually quite general. Of course, if you only use a few terms of the Fourier or power series, then you will only get an approximate solution of the differential equation.