Find the general solution of the differential equation $x \frac{dy}{dx} + 2y = x^2 \quad (x \neq 0)$
Answer & explanation
Correct answer: option 2
The correct answer is Option (2) → $y = \frac{x^2}{4} + Cx^{-2}$ ##
The given differential equation is
$x \frac{dy}{dx} + 2y = x^2 \quad \dots(1)$
Dividing both sides of equation (1) by $x$, we get
$\frac{dy}{dx} + \frac{2}{x}y = x$
which is a linear differential equation of the type $\frac{dy}{dx} + Py = Q$, where $P = \frac{2}{x}$ and $Q = x$.
So, $\text{I.F.} = e^{\int \frac{2}{x} \, dx} = e^{2 \log x} = e^{\log x^2} = x^2 \quad [\text{as } e^{\log f(x)} = f(x)]$
Therefore, solution of the given equation is given by
$y \cdot x^2 = \int (x)(x^2) \, dx + C = \int x^3 \, dx + C$
$\text{or } y = \frac{x^2}{4} + Cx^{-2}$
which is the general solution of the given differential equation.