Integrating factor and its application to first-order linear ordinary differential equations

In this post, I introduce the method of the integrating factor for solving first-order linear ordinary differential equations (ODEs).

Suppose that there is a first-order linear ODE given below

dx(t)/dt +p(t) x(t) = q(t), \tag{1}

where x(t) is a state variable as a function of time t .

One of the ways to solve (1) is to use the integrating factor.

Let us multiply both sides of (1) by a function r(t) , then we obtain

\frac{dx(t)}{dt} r(t) +p(t)r(t) x(t) = r(t) q(t). \tag{2}

We can assume that (2) has the form

\frac{d}{dt} (x(t) r(t)) = r(t) q(t). \tag{3}

It must be that r^\prime(t) = r(t) p(t) so that (2) and (3) are the same.

We can set r(t) = \exp\left( \int_{0}^t p(s) ds \right) so that they are the same.

Integrating (3) with the choice of r(t), we can obtain the solution of ODE (1).

Leave a Comment