Solving first order, first degree differential equations
NCERT Class 12 Mathematics Chapter 9 Section 9.4
Quick answer
NCERT solves first order, first degree equations dy/dx = F(x, y) of three types. If F(x, y) is a function g(x) of x times a function h(y) of y, separate the variables, dy/h(y) = g(x) dx where h(y) ≠ 0, integrate and check any lost constant solutions; if F depends only on y/x (homogeneous), put y = vx; if the equation is linear, dy/dx + Py = Q with P and Q functions of x, multiply both sides by the integrating factor, e to the power ∫P dx, and integrate.
With your textbook
NCERT Mathematics Part II (Class 12), Chapter 9 “Differential Equations”, Section 9.4 “Methods of Solving First Order, First Degree Differential Equations”, pages 306–329.
Open the official NCERT chapter (PDF, 3.4 MB, ncert.nic.in) (opens in a new tab)
Checked against the 2026-27 reprint on .
What are the three methods?
Three methods for first order, first degree equations
In this section we shall discuss three methods of solving first order first degree differential equations.
NCERT Mathematics Part II (Class 12), Section 9.4, page 306
Where its derivative coefficient is nonzero, a first order, first degree equation can be put in the form dy/dx = F(x, y) (page 306). NCERT’s three types:
- Variables separable: F(x, y) is a function of x times a function of y.
- Homogeneous: F(x, y) depends only on the ratio y/x.
- Linear: the equation can be written dy/dx + Py = Q, with P and Q constants or functions of x only.
In plain words: the first step is to check whether the equation is one of these three types. Not every first order equation is; some need another substitution, as Q13 shows. Each method ends in a general solution with one arbitrary constant C; a given condition, such as y = 1 when x = 0, may fix C and give a particular solution. Check that the condition is compatible with the equation and lies in the solution’s domain.
Variables separable
If F(x, y) can be expressed as a product g (x) h(y), where, g(x) is a function of x and h(y) is a function of y, then the differential equation (1) is said to be of variable separable type.
NCERT Mathematics Part II (Class 12), Section 9.4.1, page 307
Separating the variables
dy/h(y) = g(x) dx, where h(y) ≠ 0
integrate both sides: H(y) = G(x) + C
Here H and G are anti derivatives of 1/h and g (NCERT page 307). The constant C goes in when you integrate, once, on one side.
NCERT’s examples (pages 308–310):
- dy/dx = (1 + y2)/(1 + x2): separating gives dy/(1 + y2) = dx/(1 + x2), so tan−1 y = tan−1 x + C (NCERT Example 5).
- dy/dx = −4xy2 with y = 1 when x = 0: −1/y = −2x2 + C, the condition gives C = −1, and y = 1/(2x2 + 1) (NCERT Example 6).
- Money growing continuously at 5% a year: dP/dt = P/20, so P = 1000et/20 for Rs 1000 at t = 0. It doubles when et/20 = 2, that is, after 20 loge 2 ≈ 13.86 years (NCERT Example 9).
Homogeneous equations
Homogeneous functions. A function F(x, y) is homogeneous of degree n if F(λx, λy) = λnF(x, y) for any nonzero constant λ (NCERT Section 9.4.2, page 312). Strictly, λ must be such that F is defined at (λx, λy) and λn is defined, for example λ > 0 when n is a fraction such as ½ (our reasoning, beyond the NCERT definition). NCERT’s examples: y2 + 2xy has degree 2, 2x − 3y degree 1, and cos (y/x) degree 0, while sin x + cos y is not homogeneous. A homogeneous function of degree n can be written xng(y/x) (page 313).
Homogeneous equations. dy/dx = F(x, y) is homogeneous when F is homogeneous of degree zero, that is, F(x, y) = g(y/x) (page 313). The substitution y = vx turns it into a separable equation in v and x:
The substitution y = vx
dy/dx = v + x dv/dx
so x dv/dx = g(v) − v, then separate: dv/(g(v) − v) = dx/x
Work on an interval with x ≠ 0. Before dividing by g(v) − v, check its roots: each permissible constant root v = k gives a straight solution y = kx, which division can lose. At the end, put v = y/x back. NCERT’s Note (page 314): if the equation is dx/dy = h(x/y), put x = vy instead.
NCERT Example 13 (pages 319–320): curves whose tangent slope at (x, y) is (x2 + y2)/(2xy). With y = vx, x dv/dx = (1 − v2)/(2v). Separating and integrating gives (1 − v2)x = C, that is, x2 − y2 = Cx.
Linear equations
dy/dx + Py = Q, where P and Q are constants or functions of x only, is a first order linear equation (NCERT Section 9.4.3, page 322). Examples: dy/dx + y = sin x, and dy/dx + y/x = ex.
Use an interval where P and Q are continuous; singular points split the domain.
The integrating factor. Multiply the equation by g(x) = e∫P dx. Then g′ = Pg, so the left side becomes g dy/dx + g′y, which is the derivative of y × g(x) by the product rule. This g is the integrating factor, I.F. (page 323).
Solving dy/dx + Py = Q (NCERT’s steps, page 324)
I.F. = e∫P dx
y × I.F. = ∫(Q × I.F.) dx + C
NCERT slip (page 323): page 323 opens with “Choose g(x) in such a way that R.H.S. becomes a derivative of y . g (x)”. It is the left side, g(x) dy/dx + Pg(x)y, that becomes this derivative, as the next line and page 323’s own later sentence (“the L.H.S. becomes the derivative”) show. Read “L.H.S.”.
NCERT Example 14 (pages 324–325): for dy/dx − y = cos x, P = −1, so I.F. = e−x. Then ye−x = ∫e−x cos x dx, which comes to e−x(sin x − cos x)/2 + C. So y = (sin x − cos x)/2 + Cex.
Linear in x
Sometimes the equation is linear in x, with y as the independent variable: dx/dy + P1x = Q1, with P1 and Q1 constants or functions of y only (page 322). The same steps work with the letters swapped:
Solving dx/dy + Px = Q (page 324)
I.F. = e∫P₁ dy
x × I.F. = ∫(Q × I.F.) dy + C
NCERT slip (page 324): in the 2026–27 PDF the integrating factor for dx/dy + P1x = Q1 shows as e to the power P1 dy, with no integral sign; the file does not show whether the sign is missing or fails to display. It is e∫P₁ dy, as in step (ii) for P and in NCERT Example 16 (page 326). In an exam, write the integral sign.
NCERT Example 16 (page 326): y dx − (x + 2y2) dy = 0 is not linear in y, but divided by y dy it is dx/dy − x/y = 2y. Here P1 = −1/y, so I.F. = 1/y, and x/y = ∫2 dy = 2y + C. So x = 2y2 + Cy on intervals with y ≠ 0. In the original differential-form equation, the horizontal solution y = 0 must also be checked separately; it cannot be expressed as a function x(y).
Solved examples
Example 1: Separate the variables (NCERT Exercise 9.3, Q7, page 311)
Solve y log y dx − x dy = 0.
The logarithm requires y > 0. Separating first assumes x ≠ 0 and y ≠ 1: dy/(y log y) = dx/x. With t = log y, the left side is dt/t, so log |log y| = log |x| + log |C|, where the constant is written as a logarithm to keep the answer neat.
Answer: log y = Cx, that is, y = eCx. Direct substitution restores the lost solution y = 1 as C = 0; this family also extends smoothly through x = 0 in the original equation.
Example 2: A particular solution (NCERT Exercise 9.3, Q14, page 311)
Solve dy/dx = y tan x, given y = 1 when x = 0.
dy/y = tan x dx gives log |y| = log |sec x| + C, so y = A sec x for a constant A. At x = 0, sec 0 = 1, so A = 1.
Answer: y = sec x on the maximal interval containing the initial point, −π/2 < x < π/2.
Example 3: A homogeneous equation (NCERT Exercise 9.4, Q4, page 321)
Solve (x2 − y2) dx + 2xy dy = 0.
dy/dx = (y2 − x2)/(2xy), and both top and bottom have degree 2, so the equation is homogeneous. Put y = vx: v + x dv/dx = (v2 − 1)/(2v), so x dv/dx = −(1 + v2)/(2v). Separate: 2v dv/(1 + v2) = −dx/x, so log (1 + v2) = −log |x| + log |C|. Then (1 + v2)x = C, and v = y/x gives the answer.
Answer: x2 + y2 = Cx.
Example 4: A homogeneous particular solution (NCERT Exercise 9.4, Q12, page 321)
Solve x2 dy + (xy + y2) dx = 0, given y = 1 when x = 1.
dy/dx = −(v + v2) with y = vx, so x dv/dx = −(2v + v2). Separate and use partial fractions: dv/(v(v + 2)) = ½[1/v − 1/(v + 2)] dv. Integrating, ½ log |v/(v + 2)| = −log |x| + C, so v/(v + 2) = A/x2. With v = y/x this is y/(y + 2x) = A/x2, and x = y = 1 gives A = 1/3.
Answer: 3x2y = y + 2x, or y = 2x/(3x − 1), on the interval x > 1/√3 containing (1, 1). The divided-out straight solutions y = 0 and y = −2x solve the original equation but do not meet this initial condition.
Example 5: A linear equation (NCERT Exercise 9.5, Q1, page 328)
Solve dy/dx + 2y = sin x.
P = 2, so I.F. = e2x, and ye2x = ∫e2x sin x dx. By parts twice (as in NCERT Section 7.6), this integral is e2x(2 sin x − cos x)/5 + C.
Answer: y = (2 sin x − cos x)/5 + Ce−2x.
Example 6: Linear in x (NCERT Exercise 9.5, Q11, page 329)
Solve y dx + (x − y2) dy = 0.
Divide by y dy: dx/dy + x/y = y. This is linear in x with P1 = 1/y, so I.F. = elog y = y (taking y > 0). Then xy = ∫y2 dy = y3/3 + C.
Answer: x = y2/3 + C/y for y ≠ 0. The same formula works on a negative-y interval, using an integrating factor proportional to |y|. The original differential form also admits the horizontal curve y = 0, lost when dividing by y dy.
Example 7: Choose the correct answer (NCERT Exercise 9.5, Q18, page 329)
The integrating factor of x dy/dx − y = 2x2 is (A) e−x; (B) e−y; (C) 1/x; (D) x.
Divide by x first: dy/dx − y/x = 2x, so P = −1/x and I.F. = e−log x = 1/x (for x > 0).
Answer: (C).
Common mistakes to avoid
Common mistake
Reading P before the equation is in standard form
P is the coefficient of y only after dy/dx stands alone. In x dy/dx − y = 2x2 (Example 7), P is −1/x, not −1; in x2 dy/dx + 3xy = 1, divide by x2 first, so P = 3/x.
Common mistake
Adding C at the end
The constant comes from the integration step, so add it there. In y × I.F. = ∫(Q × I.F.) dx + C, adding C only after dividing by the I.F. gives the wrong family: Example 5 needs Ce−2x, not C.
Common mistake
Calling an equation homogeneous because it looks tidy
Every term in the numerator and the denominator must have the same degree. (x + y + 1) dy − (x − y) dx = 0 is not homogeneous, because of the constant 1.
Common mistake
Dividing by something that can be zero
Separating dy/dx = y tan x divides by y. Beyond the NCERT text: the solution y = 0 then has to be checked separately; here it is the case A = 0 of y = A sec x. NCERT separates only where h(y) ≠ 0 (page 307).
Quick revision summary
- First order, first degree: dy/dx = F(x, y). Decide first whether it is separable, homogeneous or linear.
- Separable: write dy/h(y) = g(x) dx and integrate both sides, adding one C.
- Homogeneous (F a function of y/x): put y = vx, so dy/dx = v + x dv/dx, and separate v and x; for dx/dy = h(x/y), put x = vy.
- Linear, dy/dx + Py = Q: the integrating factor is I.F. = e∫P dx, and then y × I.F. = ∫(Q × I.F.) dx + C. For dx/dy + P1x = Q1, swap the roles of x and y.
Formula sheet
- dy/h(y) = g(x) dx for h(y) ≠ 0; check constant solutions h(y) = 0
- homogeneous: y = vx, dy/dx = v + x dv/dx
- linear: I.F. = e to the power ∫P dx; y × I.F. = ∫(Q × I.F.) dx + C
- linear in x: I.F. = e to the power ∫P dy; x × I.F. = ∫(Q × I.F.) dy + C
Questions students ask
Why is no constant of integration added when finding the integrating factor?
No constant is added in the integrating factor because any nonzero constant multiple of an integrating factor is one too: e∫P dx + k is ek × e∫P dx, and the factor ek, multiplying both y × I.F. and ∫(Q × I.F.) dx, divides out, leaving the same family with C/ek as the arbitrary constant. For the same reason the modulus of a logarithm can go: for P = 3/x, e3 log |x| = |x|3 is −x3 for x < 0, so I.F. = x3 serves on either side of 0, each solution holding on an interval without 0.
What is the difference between a homogeneous and a non-homogeneous differential equation?
The word “homogeneous” has two meanings for differential equations: in NCERT, dy/dx = F(x, y) is homogeneous when F is a homogeneous function of degree zero, a function of y/x alone, while beyond the NCERT text a linear equation dy/dx + Py = Q is called homogeneous when Q = 0 and non-homogeneous when Q ≠ 0. The two tests differ: dy/dx + 2y = 0 is a homogeneous linear equation but not homogeneous in NCERT’s sense, since F = −2y has degree 1, while dy/dx = 2y/x + 3 is homogeneous in NCERT’s sense but, written dy/dx − 2y/x = 3, a non-homogeneous linear equation. NCERT uses only the first meaning, the type solved by putting y = vx.
Can a differential equation be both separable and linear?
Yes, a first order equation can be both variable separable and linear: dy/dx + Py = Q separates exactly when one of P and Q is a constant multiple of the other, since Q = kP (k = 0 included) gives dy/dx = P(k − y) and P = 0 gives dy/dx = Q. For dy/dx + 4y = 8, the integrating factor e4x gives ye4x = 2e4x + C, that is y = 2 + Ce−4x; separating as dy/(8 − 4y) = dx, for y ≠ 2, gives the same curves, and the constant solution y = 2 lost by dividing is the case C = 0. Otherwise, as in dy/dx + y = x, the variables cannot be separated and the integrating factor is needed.
What is the difference between a linear and a nonlinear differential equation?
A first order differential equation is linear when it can be written dy/dx + Py = Q with P and Q constants or functions of x only (NCERT page 322): y and dy/dx occur only to the first power, never multiplied together or inside another function. Linearity concerns y, not x: dy/dx = x2y + sin x is linear, while y dy/dx = 2x, dy/dx = y2 + x and dy/dx = sin y are nonlinear, though each has degree 1. Some equations nonlinear in y, such as NCERT Example 16, are linear in x.
What is a Bernoulli differential equation, and how is it made linear?
Beyond the NCERT text, a Bernoulli equation is dy/dx + Py = Qyn, with P and Q functions of x and n ≠ 0, 1; dividing by yn (for y ≠ 0) and putting z = y1−n turns it into a linear equation in z. For dy/dx + y/x = xy2, n = 2 and z = 1/y gives dz/dx − z/x = −x, whose integrating factor is 1/x for x > 0, so z/x = −x + C and y = 1/(Cx − x2), wherever Cx − x2 ≠ 0. The solution y = 0, lost on dividing, has to be added separately.
Practice questions
Try each question first, then open the answer to check your working.
-
Q1. Solve sec2 x tan y dx + sec2 y tan x dy = 0 (NCERT Exercise 9.3, Q4, page 311).
Show answerHide answer
Divide by tan x tan y: (sec2 x/tan x) dx = −(sec2 y/tan y) dy. Integrating, log |tan x| = −log |tan y| + log |C|, so tan x tan y = C. Keep cos x cos y ≠ 0. Direct substitution restores the constant solutions y = kπ, represented by C = 0; a vertical line is not a function y(x).
-
Q2. Solve y′ = (x + y)/x (NCERT Exercise 9.4, Q2, page 321).
Show answerHide answer
With y = vx: v + x dv/dx = 1 + v, so dv = dx/x and v = log |x| + C. So y = x log |x| + Cx.
-
Q3. Solve dy/dx + y/x = x2 (NCERT Exercise 9.5, Q3, page 328).
Show answerHide answer
P = 1/x, so I.F. = elog x = x (for x > 0). Then xy = ∫x3 dx, which is x4/4 + C.
-
Q4. The general solution of dy/dx = ex+y is (A) ex + e−y = C; (B) ex + ey = C; (C) e−x + ey = C; (D) e−x + e−y = C (NCERT Exercise 9.3, Q23, page 312).
Show answerHide answer
ex+y = exey, so e−y dy = ex dx. Integrating, −e−y = ex + K, that is, ex + e−y = C: (A), on intervals where C − e > 0 so that y = −log (C − e) is real.