Also verify whether the equation is exact before solving. (JEE Main 2024 pattern)
Solution — Step by Step
Write the equation in standard form Mdx+Ndy=0:
M=2xy+y2,N=x2+2xy
We treat M as the coefficient of dx and N as the coefficient of dy. This identification is the only thing that matters before testing exactness.
Compute the partial derivatives:
∂y∂M=∂y∂(2xy+y2)=2x+2y∂x∂N=∂x∂(x2+2xy)=2x+2y
Since ∂y∂M=∂x∂N, the equation is exact. We can now integrate directly.
We need a function F(x,y) where:
∂x∂F=M=2xy+y2
Integrate with respect to x, treating y as constant:
F=∫(2xy+y2)dx=x2y+xy2+g(y)
The g(y) here is not just a constant — it can depend on y. This is the step most students skip, and it costs them marks.
Differentiate F with respect to y:
∂y∂F=x2+2xy+g′(y)
Set this equal to N=x2+2xy:
x2+2xy+g′(y)=x2+2xyg′(y)=0⟹g(y)=C1 (a constant)
The solution to an exact equation is F(x,y)=C:
x2y+xy2=C
This can also be written as xy(x+y)=C.
Why This Works
When we say an equation Mdx+Ndy=0 is exact, we mean there exists some function F(x,y) such that dF=Mdx+Ndy. So the equation is literally saying dF=0, which means F=constant.
The condition ∂y∂M=∂x∂N is the mathematical test for this. It comes from Clairaut’s theorem — mixed partials of F must be equal: Fxy=Fyx.
Once you know the equation is exact, the integration procedure is systematic and guaranteed to work. No guesswork, no integrating factors needed.
Alternative Method — Inspection / Grouping
Sometimes you can spot the exact differential directly by grouping terms. Rewrite:
2xydx+2xydy+y2dx+x2dy=0
Notice that x2dy+y2dx is notd(x2y) — but x2dy+2xydx=d(x2y) and y2dx+2xydy=d(xy2).
Same answer, and in JEE this method is often faster once you recognise the standard exact differentials.
Standard exact differentials worth memorising for JEE:
d(xy)=xdy+ydx
d(x2y)=2xydx+x2dy
d(yx)=y2ydx−xdy
d(lnyx)=xyydx−xdy
Common Mistake
Forgetting that g(y) is a function, not a constant.
When you integrate M with respect to x, the “constant of integration” can depend on y. Students write g(y)=C immediately without checking — then get the wrong F, and the condition ∂y∂F=N fails.
Always differentiate your F with respect to y, compare with N, and then solve for g′(y). If g′(y) still contains x, that means you made an arithmetic error somewhere — go back and recheck.
Want to master this topic?
Read the complete guide with more examples and exam tips.