Answer
$y = 1+\frac{1}{(x^2+1)^{3/2}}$
Work Step by Step
A first-order linear differential equation is one that can be put into the form:
$\frac{dy}{dx} + P(x)~y = Q(x)$
We can consider the given equation:
$(x^2+1)\frac{dy}{dx} + 3x(y-1) = 0$
$\frac{dy}{dx} + \frac{3x}{x^2+1}~y = \frac{3x}{x^2+1}$
Let $P(x) = \frac{3x}{x^2+1}$
Let $Q(x) = \frac{3x}{x^2+1}$
We can find the integrating factor:
$I(x) = e^{\int \frac{3x}{x^2+1}~dx} = e^{\frac{3}{2}ln~(x^2+1)} = e^{ln~(x^2+1)^{3/2}} = (x^2+1)^{3/2}$
We can multiply by the integrating factor:
$(x^2+1)^{3/2}~\frac{dy}{dx}+3x\sqrt{x^2+1}~y = 3x\sqrt{x^2+1}$
$\frac{d}{dx}[(x^2+1)^{3/2}~y] = 3x\sqrt{x^2+1}$
We can integrate both sides of the equation:
$(x^2+1)^{3/2}~y = \int 3x\sqrt{x^2+1}~dx$
$(x^2+1)^{3/2}~y = (x^2+1)^{3/2}+C$
$y = 1+\frac{C}{(x^2+1)^{3/2}}$
We can use the initial condition to find $C$:
$y(0) = 2$
$1+\frac{C}{((0)^2+1)^{3/2}} = 2$
$1+\frac{C}{(1)^{3/2}} = 2$
$1+C = 2$
$C = 1$
We can write the solution:
$y = 1+\frac{1}{(x^2+1)^{3/2}}$