Differential Equations for EngineersXYZ Homework Edition

⇩ Download ▾

1.4 Linear equations and the integrating factor

One of the most important types of equations we will learn how to solve are the so-called linear equations. In fact, the majority of the course is about linear equations. In this lecture we focus on the first order linear equation. A first order equation is linear if we can put it into the form:

y + p ( x ) y = f ( x ) . \label{eq:1}y' + p(x)y = f(x).

(1.4.1)

Here the word “linear” means linear in yy and yy'; no higher powers nor functions of yy or yy' appear. The dependence on xx can be more complicated.

Solutions of linear equations have nice properties. For example, the solution exists wherever p(x)p(x) and f(x)f(x) are defined, and has the same regularity (read: it is just as nice). But most importantly for us right now, there is a method for solving linear first order equations. The trick is to rewrite the left hand side of (1.4.1) as a derivative of a product of yy with another function. To this end we find a function r(x)r(x) such that

r ( x ) y + r ( x ) p ( x ) y = d d x [ r ( x ) y ] r(x)y' + r(x)p(x)y = \frac{d}{dx}\left[r(x)y\right] \nonumber

This is the left hand side of (1.4.1) multiplied by r(x)r(x). So if we multiply (1.4.1) by r(x)r(x), we obtain

d d x [ r ( x ) y ] = r ( x ) f ( x ) \frac{d}{dx}\left[r(x)y\right] = r(x)f(x) \nonumber

Now we integrate both sides. The right hand side does not depend on yy and the left hand side is written as a derivative of a function. Afterwards, we solve foryy. The function r(x)r(x) is called the integrating factor and the method is called the integrating factor method.

We are looking for a function r(x)r(x), such that if we differentiate it, we get the same function back multiplied by p(x)p(x). That seems like a job for the exponential function! Let

r ( x ) = e p ( x ) d x r(x) = e^{\int p(x)dx} \nonumber

We compute:

y + p ( x ) y = f ( x ) , e p ( x ) d x y + e p ( x ) d x p ( x ) y = e p ( x ) d x f ( x ) , d d x [ e p ( x ) d x y ] = e p ( x ) d x f ( x ) , e p ( x ) d x y = e p ( x ) d x f ( x ) d x + C , y = e p ( x ) d x ( e p ( x ) d x f ( x ) d x + C ) . \begin{align}\begin{aligned} y' + p(x)y &= f(x), \\ e^{\int p(x)dx}y' + e^{\int p(x)dx}p(x)y &= e^{\int p(x)dx}f(x), \\ \frac{d}{dx}\left[e^{\int p(x)dx}y\right] &= e^{\int p(x)dx}f(x), \\ e^{\int p(x)dx}y &= \int e^{\int p(x)dx}f(x)dx + C, \\ y &= e^{-\int p(x)dx}\left( \int e^{\int p(x)dx}f(x)dx + C \right).\end{aligned}\end{align} \nonumber

Of course, to get a closed form formula for yy, we need to be able to find a closed form formula for the integrals appearing above.

Since we cannot always evaluate the integrals in closed form, it is useful to know how to write the solution in definite integral form. A definite integral is something that you can plug into a computer or a calculator. Suppose we are given

y+p(x)y=f(x),y(x0)=y0y' + p(x)y = f(x), \quad y(x_0) = y_0 \nonumber

. Look at the solution and write the integrals as definite integrals.

y(x)=ex0xp(s)ds(x0xex0tp(s)dsf(t)dt+y0)\label{eq:17}y(x) = e^{\int-_{x_0}^x p(s)ds} \left(\int_{x_0}^x e^{\int_{x_0}^t p(s)ds} f(t) dt + y_0 \right)

(1.4.2)
You should be careful to properly use dummy variables here. If you now plug such a formula into a computer or a calculator, it will be happy to give you numerical answers.

Adapted from Differential Equations for Engineers by Jiří Lebl (https://www.jirka.org/diffyqs/), © Jiří Lebl, licensed under CC BY-SA 4.0. Changes were made. License: CC-BY-SA-4.0.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or ADA Title II. Every page is built against an automated accessibility gate, and the published editions will meet ADA Title II requirements when they release in late September 2026. If something is unusable, please tell us.