integrating factor
/ IN-tuh-gray-ting FAK-ter /
An integrating factor is a clever multiplier you apply to a whole linear equation to make it suddenly easy. The left side of y' + p(x) y = q(x) is almost — but not quite — the derivative of a product. The integrating factor is the exact function you multiply through by so that the left side collapses into a single neat derivative, after which the equation is trivial to integrate.
Here is the engineering of it. You set mu(x) = e^(integral of p(x) dx). Multiply every term of y' + p(x) y = q(x) by this mu(x). The left side becomes mu y' + mu p y, and because mu was built so that mu' = mu p (that is what e^(integral p) does — its derivative is p times itself), this is exactly the product-rule expansion of (mu y)'. So the equation becomes (mu(x) y)' = mu(x) q(x): the left side is now a plain derivative of mu times y. Integrate both sides, divide by mu, and you have y. The factor mu is engineered precisely to undo the product rule.
The integrating factor is the heart of the first-order linear method and one of the most satisfying tricks in elementary ODEs, because it converts a whole family of equations into a single integration. A couple of honest notes: you may drop the constant of integration when forming integral p dx (any antiderivative works, since a constant multiple of mu cancels out), but you must keep the constant when you integrate mu q at the end — that is where the arbitrary constant of the general solution lives. And the same name 'integrating factor' is reused for a related-but-different device that rescues non-exact equations; the formulas differ.
For y' + (1/x) y = x: here p = 1/x, so mu = e^(integral (1/x) dx) = e^(ln x) = x. Multiply through: x y' + y = x^2, whose left side is (x y)'. So (x y)' = x^2, integrate to x y = x^3/3 + C, hence y = x^2/3 + C/x.
mu = x is chosen so the left side becomes the exact derivative (x y)' — then one integration finishes the job.
The integrating factor only works after the equation is in standard form y' + p(x) y = q(x), with the coefficient of y' equal to 1. If you start from a(x) y' + b(x) y = c(x), divide by a(x) FIRST, or you will use the wrong p.