Logo Computer scientist,
engineer, and educator
• Articles • Articles for students

Integrating factors from the ground up

The use of an integrating factor is a powerful method for solving differential equations (DEs) or, at least, simplifying their solution. A large class of first-order DEs are readily amenable to solution this way, and this article describes, step-by-step and from first principles — why that is so, and how to do it.

Despite its power, the use of an integrating factor is a somewhat obscure procedure, which rests on some rather fiddly theory, and can be awkward to remember. The theory is usually explained in textbooks in a highly abstract way, assuming a level of background knowledge that readers often don't have. My goal in this article is to explain the subject step-by-step, using specific examples to illustrate the theory, and documenting the procedure in the form of an algorithm.

I'll start by describing how a specific kind of first-order DE can be rewritten in such a way that one side is expressed as just the derivative of a product, so that only integration of the other side is needed to get a solution. I'll show how this analysis leads to a simple formula that will allow a certain class of first order DEs to be solved systematically. Although limited in scope, the method is conceptually straightforward, and does not require any use of partial differentiation.

I then explain in more detail what is meant by an exact DE, and show how to solve an exact DE in the general case, by integration and the solution of a subsidiary (hopefully simpler) DE. Finally, I explain how to find an integrating factor that will make a first-order DE exact in the general case.

This article assumes at least basic familiarity with differential equations and calculus.

Comments and corrections are welcome; please send them to the usual place.

Contents

An example from first principles
Deriving a formula to solve certain first-order DEs
Using the integrating factor formula to solve a DE directly
A more general approach to exact differential equations
Finding an integrating factor in the general case; summary

Overview

Consider this rather ugly-looking, non-linear differential equation (DE): $$ y' - \frac{y \, tan x}{2} = \frac{x}{2y \, cos x} $$ On the face of it, it looks pretty difficult to solve — it does to me, anyway. However, if we are fortunate enough to have a sudden flash of insight, it's almost trivially simple. The insight is to recognize that this DE can, with nothing more than high-school algebra — be rearranged to look like this: $$ 2y \, y' \, cos x - y^2 sin x = x $$ If you're wondering why that's an improvement, that's certainly understandable. The trick, however, lies in spotting that $$ 2y \, y' \, cos x - y^2 sin x = \frac{d}{dx} y^2 \, cos x$$ To see that this is so, apply the product rule and the chain rule to the right-hand side, and you'll see that it gives the left-hand side.

What this means is that the rather ugly DE we started with can be rewritten in a much simpler form: $$ \frac{d}{dx} y^2 \, cos x = x$$ If we integrate both sides we get $$ y^2 \, cos x = \int x dx = \frac{x^2}{2} + C $$ and this we can rearrange to give an expression for y, again using no more than high-school algebra.

Solving this equation required a certain amount of inspiration. Much as I'd like to be the kind of person who is prone to such mathematical epiphanies, I'm not, and I suspect few people are — I knew the answer because I started with the answer and worked back to the question. Since in real science and engineering problems we usually can't do that, the question arises whether there is some systematic way in which we can transform an arbitrary DE into one that can be expressed in the form $$ \frac{d}{dx} f(x,y) = g(x)$$ If the DE can be expressed in this form — which is an example of what is known in the math trade as an exact equation — then the DE reduces to an integration problem.

There are two distinct problems tangled up here. The first is recognizing when a diferential equation is, in fact, exact — it's often not obvious (I suspect the example I gave above was not obvious to most people). The second is handling a situation where the equation is not exact, and no amount of shuffling the terms about with algebra changes that. For many first-order DEs, both these problems can be solved by the use of an integrating factor. By multiplying all terms in the DE by the integrating factor — which we have to determine first — we transform the DE into an exact equation, that can be solved by integration.

In practice, finding an integrating factor is often difficult. Moreover, having found one we frequently find that we've transformed an intractable DE into an equally intractable integration puzzle. Sometimes, however, we get lucky.

Next

Copyright © 1994-2013 Kevin Boone. Updated Oct 04 2013