Answer
$y=\dfrac{x^4+2x^2+1}{4x^2}$
Work Step by Step
Here, we have $y'+\dfrac{2}{x} y=x+\dfrac{1}{x}$
The integrating factor is: $I=e^{\int (\dfrac{2}{x}) dx}=x^2$
Now, $x^2[y'+\dfrac{2}{x} y]=(x^2)[x+x^{-1}]$
$\int [x^2y]' =\int (x^3+x) dx $
This implies that
$y=x^{-2}(\dfrac{x^{4}}{4}+\dfrac{x^2}{2}+c)$
Now, apply the initial conditions.
Thus, we have $c=\dfrac{1}{4}$
Then, $y=x^{-2}(\dfrac{x^{4}}{4}+\dfrac{x^2}{2}+c) \implies y=\dfrac{x^{2}}{4}+\dfrac{1}{4x^2}+\dfrac{1}{2}$
or, $y=\dfrac{x^4+2x^2+1}{4x^2}$