Question
Solve the differential equation:
Find the general solution.
Solution — Step by Step
This is a linear first-order ODE of the form .
Here, and . The moment we see this form, the integrating factor method is our go-to weapon.
The integrating factor is .
We multiply both sides of the ODE by this factor. Why? Because it turns the left side into an exact derivative — specifically, .
Multiplying both sides by :
The left side is exactly . This is the whole point of the integrating factor — it makes the left side a perfect derivative.
Integrating both sides with respect to :
Don’t forget the constant of integration — in board exams and JEE both, missing costs you marks.
Divide throughout by :
General solution:
Why This Works
The integrating factor trick is built on one key observation: if you have , this is almost the result of the product rule applied to . Multiplying by completes that pattern and collapses the messy left side into a single derivative.
After that, everything reduces to plain integration. The equation goes from “ugly ODE” to “just integrate this function” — that’s why the method works every single time for linear first-order equations.
For this specific question, the right side integrates cleanly, giving a tidy answer. In JEE problems, they usually engineer this neatness — if your integral on the right looks horrible, double-check your IF.
Alternative Method (Variation of Parameters)
We can also get the particular integral by assuming for some constant .
Substituting into the ODE: .
The complementary solution is found from , giving .
So the general solution is — same answer, different route.
For JEE Main, the integrating factor method is faster and more reliable. Use variation of parameters only when the right side is a polynomial or trig function — for exponentials, IF gets you there in fewer steps.
Common Mistake
The classic error is computing (forgetting to divide by 2). After multiplying both sides by the IF , the right side becomes , not . Students who rush through write and end up with becoming — off by a factor of 2, wrong answer.
Always slow down on the integration step: .