Answer
$y=\dfrac{x^4+2x^2+1}{4x^2}$
Work Step by Step
The standard form of the given equation is:
$y'+\dfrac{2}{x} y=x+\dfrac{1}{x}$ ....(1)
The integrating factor is: $e^{\int (\dfrac{2}{x}) dx}=x^2$
In order to determine the general solution, multiply equation (1) with the integrating factor and integrate both sides.
$\int [x^2y]' =\int x^3+x dx $
or, $y=x^{-2}(\dfrac{x^{4}}{4}+\dfrac{x^2}{2}+c)$
Applying the initial conditions, we get $c=\dfrac{1}{4}$
Thus, we have
$y=\dfrac{x^{2}}{4}+\dfrac{1}{4x^2}+\dfrac{1}{2}$
Hence, $y=\dfrac{x^4+2x^2+1}{4x^2}$