The solution of the differential equation \((x^2 + xy)dy = (x^2 + y^2)dx\) is
Answer & explanation
Correct answer: option 2
The correct answer is Option (2) → \(\displaystyle\frac{y}{x} + \log_e\left|\displaystyle\frac{(y-x)^2}{x}\right| = c\), (\(c\) is an arbitrary constant)
Dividing by \(x^2 + xy\), and then the numerator and the denominator by \(x^2\):
\( \displaystyle \frac{dy}{dx} = \frac{x^2 + y^2}{x^2 + xy} = \frac{1 + (y/x)^2}{1 + y/x} \)
The right side depends only on \(\frac{y}{x}\), so this is a homogeneous differential equation. Let \(y = vx\), so that \(\frac{dy}{dx} = v + x\frac{dv}{dx}\):
\( \displaystyle v + x\frac{dv}{dx} = \frac{1 + v^2}{1 + v} \)
\( \displaystyle x\frac{dv}{dx} = \frac{1 + v^2 - v - v^2}{1 + v} = \frac{1 - v}{1 + v} \)
Separating the variables:
\( \displaystyle \frac{1 + v}{1 - v}\,dv = \frac{dx}{x} \)
Since \(\frac{1+v}{1-v} = -1 + \frac{2}{1-v}\), integrating both sides gives
\( -v - 2\log_e|1 - v| = \log_e|x| + k \)
\( v + 2\log_e|1 - v| + \log_e|x| = -k \)
\( v + \log_e\big|(1 - v)^2 x\big| = c \), writing c for −k
Putting back \(v = \frac{y}{x}\):
\( \displaystyle (1 - v)^2 x = \frac{(x - y)^2}{x^2} \cdot x = \frac{(y - x)^2}{x} \)
\( \displaystyle \frac{y}{x} + \log_e\left|\frac{(y-x)^2}{x}\right| = c \)
NCERT (2026-27 edition):
Homogeneous Differential Equations
