Integrating Factor Method
Some first-order differential equations refuse to separate — you cannot get all the y's on one side and all the x's on the other. The integrating factor method is the standard trick for a special (and very common) family of these: the linear first-order equation. The idea is beautifully simple: multiply the whole equation by one cleverly chosen function, and the messy left-hand side collapses into a single derivative that we can integrate directly.
The Standard Form
An equation is linear of first order if it can be written as
dxdy+Py=Q
where P and Q are functions of x alone (or constants). Notice y and dxdy appear only to the first power, and never multiplied together — that is what "linear" means here.
Always rearrange into this exact shape first. The coefficient of dxdy must be 1 before you read off P and Q.
The Integrating Factor
The magic multiplier is
I.F.=e∫Pdx.
Why this one? Multiply the equation by e∫Pdx:
e∫Pdxdxdy+Pe∫Pdxy=Qe∫Pdx.
By the product rule, the left-hand side is exactly dxd(y⋅e∫Pdx), because the derivative of e∫Pdx is Pe∫Pdx. So the equation becomes
dxd(y⋅I.F.)=Q⋅I.F.
The left side is now a single derivative — that is the whole point of choosing this factor.
The Solution
Integrate both sides with respect to x:
y⋅I.F.=∫(Q⋅I.F.)dx+C.
This is the general solution. In words: (solution) × (integrating factor) = integral of (Q × integrating factor), plus a constant.
A Quick Illustration
For dxdy+x1y=x, we read P=x1, Q=x. Then ∫Pdx=logx, so I.F.=elogx=x. The solution is
y⋅x=∫x⋅xdx+C=3x3+C.
The Same Idea the Other Way Round
If an equation is linear in x instead — that is, dydx+Px=Q with P,Q functions of y — the method is identical with the roles of x and y swapped: I.F.=e∫Pdy and x⋅I.F.=∫Q⋅I.F.dy+C.
Don't add a constant of integration when computing ∫Pdx for the I.F. — any one antiderivative works, and the single constant C at the final integration captures the whole family of solutions.
The integrating factor method for linear first-order differential equations is one of the highest-weightage techniques in the NCERT Class 12 Differential Equations chapter, and "integrating factor formula and examples" is a top search term among CBSE and JEE Main aspirants. Getting comfortable converting an equation into the standard dy/dx + Py = Q form is the single most useful skill for this whole topic.