Skip to main content

Notes for Math 220, Calculus 2

Section 4.5 First-order Linear Equations

References.

Introduction.

A first order differential equation is linear if it has the form \(\displaystyle a(x) \frac{dy}{dx} = d(x) + c(x) y,\) more usually rewritten with \(b(x) = -d(x)\) and putting all the unknown quantities at left
\begin{equation} a(x)\frac{dy}{dx} + b(x) y = c(x)\tag{4.5.1} \end{equation}
where \(a(x)\text{,}\) \(b(x)\) and \(c(x)\) are continuous functions on some interval of \(x\) values.
Note that we already know how to solve such an equation in the special case where \(c(x) = 0\text{;}\) then it is separable and has the differential form
\begin{equation*} \frac{dy}{y} = -\frac{b(x)}{a(x)} dx. \end{equation*}
We will build on this idea, but first, a little simplification.

Standard Form.

The coefficient \(a(x)\) of the derivative can be divided out, giving the standard form
\begin{equation} \frac{dy}{dx} + p(x) y = q(x)\tag{4.5.2} \end{equation}
where \(p(x) = b(x)/a(x)\) and \(q(x) = c(x)/a(x)\text{;}\) again we want these to be continuous functions.
Note: there is a problem if \(a(x) = 0\) at some \(x\)-values in the domain; indeed solution can fail to exist at such points: consider \(\ds x \frac{dy}{dx} = 1\text{,}\) with solutions \(y = C \ln|x|\text{.}\)
As noted above, the special case \(q(x) = 0\) is separable; it is of so-called homogeneous form
\begin{equation} \frac{dy}{dx} + p(x) y = 0\tag{4.5.3} \end{equation}
which gives
\begin{equation*} \frac{1}{y}\frac{dy}{dx} = - p(x) \text{, assuming for now that } y \neq 0. \end{equation*}
Taking \(P(x)\) to be any antiderivative of \(p(x)\text{,}\) integrating gives
\begin{equation*} \ln |y| = -P(x) + k \end{equation*}
and thus the family of solutions
\begin{equation*} y = C e^{-P(x)} \end{equation*}
Here \(C = \pm e^k\text{,}\) so it is strictly non-zero, which goes with the assumption above that \(y \neq 0\text{.}\) However, fortunately we can solve easily in that “forbidden” case, getting the special stationary solution of \(y = 0\) for all \(x\text{,}\) which corresponds to the previously forbidden value \(C=0\text{.}\)
To use this idea for the general case of Equation (4.5.2), start by defining \(\mu(x) = e^{P(x)}\) and note that the quantity \(\mu(x) y\) is constant in that case:
\begin{equation*} \frac{d}{dx}(\mu(x) y) = 0 \end{equation*}
This very simple form suggests that the same transformation might help in the general case (4.5.2), and indeed
\begin{equation*} \frac{d}{dx}(\mu(x) y) = \mu(x) \frac{dy}{dx} + \frac{d\mu}{dx} y = \mu(x) \frac{dy}{dx} + \mu(x) p(x) y = \mu(x) \left( \frac{dy}{dx} + p(x) y \right) = \mu(x) q(x) \end{equation*}
which can be integrated to get
\begin{equation*} \mu(x) y = \int \mu(x) q(x) \, dx + C\text{.} \end{equation*}
Here the constant of integration \(C\) is shown explicitly (even though that is a bit redundant) to show where it appears in the general solution after diving by \(\mu\text{:}\)
\begin{equation} y = \frac{1}{\mu(x)} \int (e^{P(x)} q(x)) dx + C e^{-P(x)}\tag{4.5.4} \end{equation}
However, rather than try to remember this collection of formulas, it is far better to describe a strategy for getting the solutions, using the very useful ideas of integrating factors, particular solutions, and first solving the simpler homogeneous part of the equation.

Integrating Factors.

The key to getting the solution above was multiplying by a function \(\mu(x)\text{,}\) called an integrating factor. There, the choice of \(\mu\) was just stated, but here is a strategy for choosing a suitable function.
The goal is to multiply equation (4.5.2) by \(\mu(x)\) to get the form
\begin{equation} \mu(x) \frac{dy}{dx} + \mu(x) p(x) y = \mu(x) q(x)\tag{4.5.5} \end{equation}
so that the left-hand side is just a derivative of a single quantity, via the product rule; that is, we want
\begin{equation*} \mu(x) \frac{dy}{dx} + \mu(x) p(x) y = \frac{d}{dx}(f(x) g(x)), = \frac{df}{dx} g(x) + f(x) \frac{dg}{dx} \end{equation*}
Firstly, we can get the \(y\) terms by choosing \(f(x) = y\text{,}\) so that we want
\begin{equation*} \mu(x) \frac{dy}{dx} + \mu(x) p(x) y = \frac{d}{dx}(g(x) y), = g(x) \frac{dy}{dx} + \frac{dg}{dx} y \end{equation*}
Then the remaining factors match if \(g(x) = \mu(x)\) and \({dg}/{dx} = \mu(x) p(x)\text{;}\) that is
\begin{equation*} \frac{d\mu}{dx} = p(x) \mu \end{equation*}
This gets us back to a separable equation, solved via \({d\mu}/{\mu} = p(x) dx\text{,}\) so
\begin{equation*} \ln |\mu| = \int p(x) dx = P(x)\text{.} \end{equation*}
We only need any one suitable function \(\mu(x)\text{,}\) not every possibility, so can let \(\mu\) be positive (to avoid the absolute values) and use any one anti-derivative \(P(x)\text{,}\) getting
\begin{equation} \mu(x) = e^{P(x)}\tag{4.5.6} \end{equation}
as above as a suitable choice. Then solving for \(y\) proceeds as above, by integrating the transformed equation
\begin{equation} \frac{d}{dx}(\mu(x) y) = \mu(x) q(x)\tag{4.5.7} \end{equation}
(with constant of integration included this time) and dividing by \(\mu(x)\text{.}\)

Particular Solutions and Solving the Homogeneous Part First.

Note that the general solution (4.5.4) is the sum of two parts; the first is one possible solution; the second is the general solution of the homogeneous part, equation (4.5.3). This gives a convenient strategy for finding the general solution:
  1. Find any one particular solution of the whole equation; here
    \begin{equation*} \frac{1}{\mu(x)} \int (e^{P(x)} q(x)) dx \end{equation*}
  2. Add any multiple \(C\) of any one solution of the homogenous part (4.5.3); here
    \begin{equation*} e^{-P(x)} \end{equation*}
This puts aside any dealing with constants of integration and multiple possible solutions and anti-derivatives until the last step.

Study Guide.

  • the Problem-Solving Strategy,
  • Examples 15–17,
  • Checkpoints 15–17,
  • and one or several exercises from each of the groups 213–217, 218–222 and 223–232.
openstax.org/books/calculus-volume-2/pages/4-5-first-order-linear-equations
openstax.org/books/calculus-volume-2/pages/4-5-first-order-linear-equations