Step 1: Convert the differential equation into standard linear form.
Given equation is
\[
(x^2+1)\frac{dy}{dx}+xy=x^3
\]
Dividing throughout by
\[
x^2+1,
\]
we get
\[
\frac{dy}{dx}+\frac{x}{x^2+1}y=\frac{x^3}{x^2+1}
\]
This is of the form
\[
\frac{dy}{dx}+Py=Q
\]
where
\[
P=\frac{x}{x^2+1}
\]
Step 2: Use the formula for integrating factor.
For a linear differential equation,
\[
\frac{dy}{dx}+Py=Q,
\]
the integrating factor is
\[
I.F.=e^{\int P\,dx}
\]
So,
\[
I.F.=e^{\int \frac{x}{x^2+1}\,dx}
\]
Step 3: Evaluate the integral.
Let
\[
u=x^2+1
\]
Then,
\[
du=2x\,dx
\]
So,
\[
\int \frac{x}{x^2+1}\,dx
=
\frac{1}{2}\log(x^2+1)
\]
Therefore,
\[
I.F.=e^{\frac{1}{2}\log(x^2+1)}
\]
\[
I.F.=(x^2+1)^{\frac{1}{2}}
\]
\[
I.F.=\sqrt{1+x^2}
\]
Step 4: Final conclusion.
Hence, the integrating factor is
\[
\boxed{\sqrt{1+x^2}}
\]