A first order linear differential equation has the shape
dxdy+Py=Q
where P and Q are constants or functions of x only. Examples: dxdy+y=sinx; dxdy+x1y=ex; dxdy+xlogxy=x1. Note what linearity requires: y and y′ appear to the first power, never multiplied together, never inside another function.
Where the integrating factor comes from
Multiply the equation by an unknown function g(x) and demand that the left side become the derivative of the product yg(x):
g(x)dxdy+Pg(x)y=dxd[yg(x)]=g(x)dxdy+yg′(x)
Comparing forces Pg(x)=g′(x), i.e. gg′=P. Integrating: logg=∫Pdx, so
g(x)=e∫Pdx=the Integrating Factor (I.F.)
With it, the equation collapses to dxd(y⋅I.F.)=Q⋅I.F., and one integration finishes:
y⋅(I.F.)=∫Q⋅(I.F.)dx+C

The three exam steps
- Standardise: rewrite as dxdy+Py=Q — divide through by any coefficient of dxdy first, then read off P and Q.
- Compute I.F.=e∫Pdx (no constant needed in this integral).
- Write the solution y(I.F.)=∫Q(I.F.)dx+C and evaluate the right-side integral.
Key Point: The simplification elogf(x)=f(x) is the daily workhorse: P=x2 gives I.F.=e2logx=x2; P=cotx gives I.F.=elogsinx=sinx; P=−x1 gives x1. Most integrating factors are one log-collapse away.
[JEE Tip] An I.F. speed-table worth memorising: P=xa⇒I.F.=xa; P=tanx⇒secx; P=cotx⇒sinx; P=−x-type ⇒e−x2/2. JEE asks for the I.F. alone often enough that these four pay for themselves.
Some equations are hopeless as dxdy=… but perfectly linear the other way round:
dydx+P1x=Q1
with P1,Q1 functions of y only. Then I.F.=e∫P1dy and
x⋅(I.F.)=∫Q1⋅(I.F.)dy+C
Recognition cue: terms like x+2y2 or x−y2 multiplying dy, with a lone ydx — solve for dydx and watch the equation become linear in x. Example: ydx−(x+2y2)dy=0 rearranges to dydx−yx=2y, with I.F.=e−logy=y1, giving yx=2y+C, i.e. x=2y2+Cy.
Habits that save marks
- Standard form before reading P: in xdxdy−y=2x2, dividing by x gives P=−x1 (not −1) — the I.F. is x1, and skipping the division is the top error on I.F. questions.
- The right-side integral is Chapter 7: ∫Q⋅I.F.dx routinely needs by parts (∫e−xcosxdx loop-back), log integrals, or a lucky product-rule cancellation (as in ∫(2xsinx+x2cosx)dx=x2sinx).
- Apply conditions at the very end, in the y⋅I.F.=…+C form or after isolating y — either is accepted.
- Check linearity honestly: y2 terms, yy′, or siny mean not linear — reconsider separable or homogeneous.
Key Point: The decision tree of the chapter is now complete: product structure → separable; degree-zero ratio → homogeneous (y=vx); y and y′ appearing linearly → linear (I.F.). One of the three fits every equation in the syllabus — classify first, compute second.
[JEE Tip] When both orientations look plausible, count where the nonlinearity lives: (x+3y2)dxdy=y has y2 — fatal for y-linearity but harmless for x: rewrite as dydx=yx+3y, linear in x. The variable that appears only to the first power is the one to solve for.
Solved Examples
Example 1: A loop-back right side
Find the general solution of dxdy−y=cosx.
Solution:
- Read off: P=−1, Q=cosx; I.F.=e−x.
- Solution form: ye−x=∫e−xcosxdx+C.
- The by-parts loop: ∫e−xcosxdx=2(sinx−cosx)e−x.
- Isolate y:
Final Answer: y=2sinx−cosx+Cex.
Example 2: Divide through first
Find the general solution of xdxdy+2y=x2 (with x=0).
Solution:
- Standardise: dxdy+x2y=x, so P=x2, Q=x.
- I.F.: e∫x2dx=e2logx=x2.
- Solve: yx2=∫x⋅x2dx+C=4x4+C.
Final Answer: y=4x2+Cx−2.
Example 3: Linear in x
Find the general solution of ydx−(x+2y2)dy=0.
Solution:
- Rearrange for dydx: dydx−yx=2y — linear in x with P1=−y1, Q1=2y.
- I.F.: e−∫ydy=e−logy=y1.
- Solve: x⋅y1=∫2y⋅y1dy+C=2y+C.
Final Answer: x=2y2+Cy.
Example 4: A cotangent coefficient with a condition
Find the particular solution of dxdy+ycotx=2x+x2cotx (with x=0), given y=0 when x=2π.
Solution:
- I.F.: e∫cotxdx=elogsinx=sinx.
- Solve: ysinx=∫(2xsinx+x2cosx)dx+C — the integrand is exactly dxd(x2sinx), so ysinx=x2sinx+C.
- Apply the condition: 0=4π2⋅1+C, so C=−4π2.
Final Answer: ysinx=x2sinx−4π2, i.e. y=x2−4sinxπ2 (for sinx=0).
Takeaway: Before grinding ∫Q⋅I.F.dx by parts, check whether the integrand is a ready-made product-rule derivative — exam setters plant these gifts deliberately.
Example 5: A curve through a point
Find the equation of the curve through (0,1) whose tangent slope at (x,y) equals the sum of the abscissa and the product of abscissa and ordinate.
Solution:
- Translate: dxdy=x+xy, i.e. dxdy−xy=x — linear with P=−x, Q=x.
- I.F.: e∫(−x)dx=e−x2/2.
- Solve: ye−x2/2=∫xe−x2/2dx+C=−e−x2/2+C (substitute t=−2x2).
- Isolate and apply (0,1): y=−1+Cex2/2; 1=−1+C gives C=2.
Final Answer: y=2ex2/2−1.
Example 6: The cleanest I.F. exercise
Find the general solution of dxdy+xy=x2.
Solution:
- Read off: P=x1; I.F.=elogx=x.
- Solve: yx=∫x⋅x2dx+C=4x4+C.
Final Answer: xy=4x4+C.
Example 7: Tangent coefficient with a condition
Find the particular solution of dxdy+2ytanx=sinx, given y=0 when x=3π.
Solution:
- I.F.: e2∫tanxdx=e2logsecx=sec2x.
- Solve: ysec2x=∫sinxsec2xdx+C=∫secxtanxdx+C=secx+C.
- Apply the condition: at x=3π: 0=sec3π+C=2+C, so C=−2.
- Isolate: y=cosx−2cos2x.
Final Answer: y=cosx−2cos2x.
Takeaway: e2logsecx=sec2x — the log-collapse works with any coefficient: ealogf=fa. Squares and reciprocals of the speed-table entries appear constantly.