The given differential equation is:
\[ \frac{dy}{dx} + \frac{y}{1+x^2} = \frac{e^{\tan^{-1}x}}{1+x^2}. \]
Integrating factor (I.F.):
\[ \text{I.F.} = e^{\int \frac{1}{1+x^2} dx} = e^{\tan^{-1}x}. \]
Multiply through by I.F.:
\[ y \cdot e^{\tan^{-1}x} = \int e^{\tan^{-1}x} \cdot \frac{e^{\tan^{-1}x}}{1+x^2} dx + C. \]
Simplify:
\[ y \cdot e^{\tan^{-1}x} = \int e^{2\tan^{-1}x} \cdot \frac{1}{1+x^2} dx + C. \]
Substitute:
\[ \tan^{-1}x = z, \quad \frac{1}{1+x^2} dx = dz. \]
Thus:
\[ y \cdot e^{\tan^{-1}x} = \frac{e^{2z}}{2} + C. \]
Apply initial condition: \( y(1) = 0 \), \( \tan^{-1}(1) = \frac{\pi}{4} \):
\[ 0 = \frac{e^{\pi/2}}{2} + C \implies C = -\frac{e^{\pi/2}}{2}. \]
Finally:
\[ y \cdot e^{\tan^{-1}x} = \frac{e^{2\tan^{-1}x}}{2} - \frac{e^{\pi/2}}{2}. \]
At \( x = 0 \), \( \tan^{-1}(0) = 0 \):
\[ y(0) = \frac{1}{2} \left( 1 - e^{-\pi/2} \right). \]