On this page
Most Class 12 students practise one linear form, dy/dx + Py = Q, until it is automatic. Then a paper gives you (x + y) dy/dx = 1: not separable, not homogeneous, not linear in y. The way out is to treat x as the unknown function and y as the variable.
When should you write a differential equation as dx/dy?
Write it as dx/dy when the equation is linear in x: x and dx/dy appear only to the first power and are never multiplied together. The NCERT Class 12 Mathematics textbook (Chapter 9, Differential Equations) gives this second form directly: if the equation is dx/dy + P₁x = Q₁, where P₁ and Q₁ are constants or functions of y only, then I.F. = e^(∫P₁ dy) and the solution is x · (I.F.) = ∫(Q₁ × I.F.) dy + C (NCERT Class 12 Mathematics, Chapter 9, page 324).
This is not a new method. A first-order differential equation is linear if it can be written as a(x)y′ + b(x)y = c(x) (OpenStax Calculus Volume 2, section 4.5). Swap x and y in that sentence and the same integrating-factor argument works with y as the independent variable. Flipping dy/dx is safe wherever dy/dx is not zero; our explainer on whether dy/dx is a fraction shows why.
How do you spot an equation that is linear in x?
Run this four-question check before you pick a method:
Is it linear in y as written? Look for y², √y, sin y, e^y, or y multiplied by dy/dx. Any one of these rules out the dy/dx + Py = Q form.
Rewrite it with dx/dy. Divide through by dy, or turn a fraction upside down.
Does x now appear only as plain x, never squared, never inside a function, and never multiplied by dx/dy?
Can you collect it as dx/dy + P₁x = Q₁ with P₁ and Q₁ depending on y alone? If yes, use the integrating factor in y.
For more on step 1, see our guide on how to check whether a differential equation is linear.
Equations in differential form are the other common disguise. NCERT's Example 16, y dx − (x + 2y²) dy = 0, becomes dx/dy − x/y = 2y, so P₁ = −1/y, the integrating factor is 1/y, and the general solution is x = 2y² + Cy (NCERT Chapter 9, page 326).
How do you solve (x + y) dy/dx = 1?
This is Question 10 of Exercise 9.5 in the same NCERT chapter.
As given, dy/dx = 1/(x + y). This is not linear in y, because y sits in the denominator.
Flip it: dx/dy = x + y.
Standard form: dx/dy − x = y, so P₁ = −1 and Q₁ = y.
Integrating factor: e^(∫−1 dy) = e^(−y).
Solution: x e^(−y) = ∫ y e^(−y) dy + C.
Integrate by parts: ∫ y e^(−y) dy = −y e^(−y) − e^(−y).
So x e^(−y) = −y e^(−y) − e^(−y) + C. Multiply through by e^y to get x = Ce^y − y − 1.
Check it: from the answer, dx/dy = Ce^y − 1, and x + y = Ce^y − y − 1 + y = Ce^y − 1. The two sides match; our post on verifying a solution of a differential equation explains this check.
The diagram at the top plots this family of curves. Every horizontal line meets each curve once, so x is a function of y; a vertical line can meet one curve twice, so y is not a single function of x.
Where do students lose marks with the dx/dy form?
Integrating P₁ with respect to x. In this form the integrating factor is e^(∫P₁ dy).
Writing y · (I.F.) on the left out of habit. Here the left side is x · (I.F.).
Reading P₁ before moving every x term to the left. In dx/dy = x + y, P₁ is −1, not +1.
Forgetting that multiplying by e^y turns the constant C into Ce^y.
Rearranging for y at the end. x = Ce^y − y − 1 is already a complete general solution.
Can you try one yourself?
Solve dy/dx = 1/(x + y²). Flipping gives dx/dy − x = y², so the integrating factor is again e^(−y), and you will need integration by parts twice.
Answer to check against: x = Ce^y − y² − 2y − 2. From it, dx/dy = Ce^y − 2y − 2, which equals x + y², so it works. After that, Questions 11 and 12 of NCERT Exercise 9.5 use the same flip, and Question 19 is already written in dx/dy form.
If you get stuck partway, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer. If the integrating factor is the shaky part, the Fermi Concept Library gives each mathematics concept its own lesson.



