You are here: start » book » linalg » constinhomo
- §1. Definitions and Notation
- §2. First Order: Notation and Theorems
- §3. First Order: Separable
- §4. First Order: Exact
- §5. The Word "Linear"
- §6. Homogeneous (Const Coeff)
- §7. Linear Independence
- §8. Inhomogeneous (Const Coeff)
- §9. Linear, Series Solutions: Theorems
- §10. Linear, Series Solutions: Method
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)$. The form of these equations is: \begin{align} \frac{d^ny}{dx^n} + a_{n-1} \frac{d^{n-1}y}{dx^{n-1}} + … + a_0 y &= b(x)\\ \cal{L} y&=b(x) \label{inhomo} \end{align} In the second form for these equations, we have rewritten all the messy derivative information as a linear differential operator $\cal{L}$ so that it is easier to see the important steps of the algebra below.
The following theorem will suggest a strategy for solving this differential equation.
Theorem: 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 any one solution to the inhomogeneous equation, called a particular solution $y_p$, PLUS the general solution of the homogeneous equation $y_h$.
Important Simple Proof: The particular solution satisfies $\cal{L} y_p=b(x)$ and the general solution of the homogeneous equation satisfies $\cal{L} y_h=0$. Since the differential operator $\cal{L}$ is linear (see the section What does linear mean?), it is straightforward to see that: \begin{align} \cal{L} (y_p+y_h) &=\cal{L} y_p + \cal{L} y_h \nonumber\\ &= b(x)+0 \nonumber\\ &= b(x) \end{align}
This theorem is telling us 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/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 \begin{equation} \frac{d^2y}{dx^2} + \frac{dy}{dx} - 6 y = e^{5x} . \label{ExI1} \end{equation} Since derivatives of exponential functions are proportional to themselves, we guess a solution of the form \begin{equation} y_p = C e^{5x} . \label{ExI1G} \end{equation} Substituting (\ref{ExI1G}) into (\ref{ExI1}), we obtain \begin{equation} (25 C + 5 C - 6C) \, e^{5x} = e^{5x} \end{equation} which we can solve for $C$, yielding $C=1/24$. Be careful when implementing this method, as we are here solving for the constant coefficient, not the exponent as before. Putting our particular solution (\ref{ExI1G}) together with the general homogenous solution derived in the previous section, the general solution of (\ref{ExI1}) is \begin{equation} y = \frac{1}{24} e^{5x} + C_1 e^{-3x} + C_2 e^{2x} \end{equation}
Source terms that are trig functions are similar, again recalling Euler's formula. Consider the ODE \begin{equation} \frac{d^2y}{dx^2} + 4y = \sin(3x) . \label{ExI3} \end{equation} The trick here is to recognize that $\sin(3x)$ involves both of $e^{\pm3ix}$, so we had better incorporate both into our Ansatz. However, we can do so by using trig functions, rather than exponentials. Thus, we try a particular solution of the form \begin{equation} y_p = A \sin(3x) + B \cos(3x) \end{equation} which results in \begin{equation} -9A \sin(3x) -9B \cos(3x) + 4A \sin(3x) + 4B \cos(3x) = \sin(3x) . \end{equation} Collecting terms, and setting the coefficients of $\sin(3x)$ and $\cos(3x)$ separately to zero results in \begin{align} -9A + 4A &= 1 \\ -9B + 4B &= 0 \end{align} so that $A=-1/5$, $B=0$ and our general solution is \begin{equation} y = -\frac15\sin(3x) + C_1 \cos(2x) + C_2 \sin(2x) . \end{equation} Typically, the particular solution will involve both sines and cosines. (Why doesn't that happen here?)
Relationship to Fourier Series
It is easy to solve equations with more complicated inhomogeneous terms as long as the inhomogeneous term can be written as a sum of terms of this simple type $b(x)=b_1(x)+b_2(x)+\dots$. We just solve an inhomogeneous equation for each of the terms $g_i$ separately and add the $y=y_1+y_2+\dots$. Notice how the linearity of the differential operator $\cal{L}$ guarantees that this method works in the following simple proof: Suppose $\cal{L} y_i = b_i$ for several values of the index $i$. Then: \begin{align} \cal{L}&= \cal{L} (y_1 + y_2 +\dots)\\ &=\cal{L} y_1 +\cal{L} y_2 + \dots\\ &= b_1(x) + b_2(x) =\dots\\ &=b(x) \end{align}
If the inhomogeneous term is a periodic function, then we can expand it in a Fourier Series. Once you learn to do Fourier Series, the method you have just learned becomes much more general, it applies to any period “source” or “forcing function”.