$\int\frac{1+x^2}{x^4+3x^3+3x^2-3x+1}dx$ $$\int\frac{1+x^2}{x^4+3x^3+3x^2-3x+1}dx$$
I tried to solve it.
$$\int\frac{1+x^2}{x^4+3x^3+3x^2-3x+1}dx=\int\frac{1+x^2}{(x^2+1)^2+3x^3+x^2-3x+1}dx=\int\frac{1+x^2}{(x^2+1)^2+3x(x^2-1)+x^2+1}dx$$
But this does not seem to be solving.Please help.

Using Hermite reduction and the Rothstein-Trager Algorithm for integration of rational functions I get
$$\frac{2}{\sqrt{11}}\left(\arctan\left(\frac{3}{\sqrt{11}}+\frac{2}{\sqrt{11}}x\right)-\arctan\left(\frac{3}{\sqrt{11}}-\frac{8}{\sqrt{11}}x-\frac{6}{\sqrt{11}}x^2-\frac{2}{\sqrt{11}}x^3\right)\right)
$$
which seems correct after differentiating. Its strange that Wolfram Alpha doesn't get this result.
Here some details:
Let $A = x^2+1$ and $D = x^4+3x^3+3x^2-3x+1$, so that we want to find $\int{\frac{A}{D}}{dx}$
Since $D$ is square free (contains no multiple factors) and $\deg(A) < \deg(D)$, we can apply the Rothstein-Trager method described in the paper below to compute this integral:
First we compute the resultant 
\begin{align}
\text{res}_x(D, A-t\frac{d}{dx}D) &= \text{res}_x(x^4+3x^3+3x^2-3x+1,-4tx^3+(1-9t)x^2-6tx+3t+1)\\ &= 37(1+11t)^2 =: R(t)
\end{align}
It has two distinct roots $t_1 = \frac{i}{\sqrt{11}}$ and $t_2 = -\frac{i}{\sqrt{11}} = -t_1$ 
We now can express the integral as a sum of complex logarithms:
\begin{align}
\int{\frac{A}{D}}{dx} &= \sum_{t|R(t) = 0}t\log\left(\gcd\left(D, A-t\frac{d}{dx}D\right)\right)\\ &= \sum_{t|R(t) = 0}t\log\left(-1+\left(\frac{3}{2}+\frac{11}{2}t\right)x+x^2\right) \\ &= \frac{i}{\sqrt{11}}\log\left(-1+\left(\frac{3}{2}+\frac{\sqrt{11}}{2}i\right)x+x^2\right)-\frac{i}{\sqrt{11}}\log\left(-1+\left(\frac{3}{2}-\frac{\sqrt{11}}{2}i\right)x+x^2\right)
\end{align}
Note that the GCD inside the logs was taken over $\mathbb{Q}(t_1)[x]$, rather than just over $\mathbb{Q}[x]$.
Having expressed the integral as a sum of logarithms, the only thing that we have to do, is to convert them to inverse tangents. For this, there also exist algorithms. 
See for this "Symbolic Integration I: Transcendental Functions" by Manuel Bronstein.
