The general solution of the differential equation \(x\displaystyle\frac{dy}{dx} = y\left(\log y - \log x + 2\right)\), \(x \gt 0\), \(y \gt 0\), is (C is an arbitrary constant)
Answer & explanation
Correct answer: option 2
The correct answer is Option (2) → \(\log\left(\displaystyle\frac{y}{x}\right) + 1 = Cx\)
Since \(\log y - \log x = \log\frac{y}{x}\), the equation is
\( \displaystyle \frac{dy}{dx} = \frac{y}{x}\left(\log\frac{y}{x} + 2\right) \)
a homogeneous equation. Let \(y = vx\):
\( \displaystyle v + x\frac{dv}{dx} = v(\log v + 2) \)
\( \displaystyle x\frac{dv}{dx} = v(\log v + 1) \)
\( \displaystyle \frac{dv}{v(\log v + 1)} = \frac{dx}{x} \)
With \(t = \log v + 1\), \(dt = \frac{dv}{v}\):
\( \log|\log v + 1| = \log x + \log|C| \)
\( \log v + 1 = Cx \)
So \(\log\left(\frac{y}{x}\right) + 1 = Cx\).
Why the other options are incorrect
Option (1) \(\log\left(\frac{y}{x}\right) + 2 = Cx\) — Incorrect. This forgets to subtract v from both sides; it solves \(x\frac{dv}{dx} = v(\log v + 2)\), not \(v(\log v + 1)\).
Option (3) \(\log\left(\frac{y}{x}\right) - 1 = Cx\) — Incorrect. It solves \(x\frac{dv}{dx} = v(\log v - 1)\); subtracting v from \(v(\log v + 2)\) leaves \(v(\log v + 1)\).
Option (4) \(\log\left(\frac{y}{x}\right) + 1 = \frac{C}{x}\) — Incorrect. It gives \(x\frac{dv}{dx} = -v(\log v + 1)\), the wrong sign.