Answer
$y(x) = \tan{(\frac{\pi}{4}-\tan^{-1}{x})}$
Work Step by Step
Given the equation
$$(x^2+1)y'+y^2=-1$$
with an initial value $$y(0)=1$$
Rewrite $y'$ as $\frac{dy}{dx}$ and isolate variables to each side:
$$(x^2+1)\frac{dy}{dx}=-y^2-1$$
$$\frac{dy}{-y^2-1}=\frac{dx}{x^2+1}$$
$$-\frac{dy}{y^2+1}=\frac{dx}{x^2+1}$$
Integrate both sides:
$$-\int{\frac{dy}{y^2+1}}=\int{\frac{dx}{x^2+1}}$$
$$-\tan^{-1}{y}=\tan^{-1}{x}+C$$
Plug in initial values and solve for $C$:
$$-\tan^{-1}{(1)}=\tan^{-1}{(0)}+C$$
$$-\frac{\pi}{4}=0+C$$
$$C=-\frac{\pi}{4}$$
Solve the equation for $y$:
$$-\tan^{-1}{y}=\tan^{-1}{x}-\frac{\pi}{4}$$
$$\tan^{-1}{y}=\frac{\pi}{4}-\tan^{-1}{x}$$
$$y=\tan{\left(\frac{\pi}{4}-\tan^{-1}{x}\right)}$$