Evaluate: $\int \frac{dx}{(x^2+x+1)^2},$ without using any kind of substitutions. I know there exists a reduction formula for the integral: $$\int\frac1{(ax^2+bx+c)^n}\,dx.$$ But this uses substitutions. So for the integral in question, let:
\begin{align}
I&=\int\frac{dx}{(x^2+x+1)^2}\\\\
&=\int\frac{dx}{\{(x-\omega)(x-\omega^2)\}^2}\\\\
&=\int\frac{dx}{(x-\omega)^2(x-\omega^2)^2},
\end{align}
Where, $\omega$ is one of the complex cube roots of unity. According to me, resolving $\dfrac1{(x-\omega)^2(x-\omega^2)^2}$ into partial fractions, would serve our purpose. Is this a proper way to approach? Thanks in advance. 
 A: \begin{align}
I=\int \frac{dx}{(x^2+x+1)^2}&=\frac{1}{B}\int \frac{1}{2x+1}d(A-\frac{B}{x^2+x+1}) \\
&=\frac{1}{B}\left[ \frac{1}{2x+1}(A-\frac{B}{x^2+x+1})+\int (A-\frac{B}{x^2+x+1})\frac{2}{(2x+1)^2}dx \right] \\
\end{align}
Note
\begin{align}
&(A-\frac{B}{x^2+x+1})\frac{2}{(2x+1)^2} \\
&=\frac{Ax^2+Ax+A-B}{x^2+x+1} \frac{2}{4x^2+4x+1}
\end{align}
So,we can let
$$ A=4,A-B=1\Rightarrow A=4,B=3 $$
Thus
\begin{align}
I&=\frac{1}{3}\left[ \frac{2x+1}{x^2+x+1}+2\int \frac{1}{x^2+x+1} dx \right] \\
&=\frac{1}{3}\left[ \frac{2x+1}{x^2+x+1}+2\int \frac{1}{(x+\frac{1}{2})^2+\frac{3}{4}} dx \right] \\
&=\frac{1}{3}\left[ \frac{2x+1}{x^2+x+1}+\frac{4}{\sqrt{3}}\arctan \frac{2x+1}{\sqrt{3}} \right]+C \\
\end{align}
A: If your condition is integration without substitutions, using partial fractions is a proper approach but not easy in this case because computing the arbitrary constants $A, B, C, D$ is a bit laborious.
$$\frac{1}{(x-\omega)^2(x-\omega^2)^2}=\frac{A}{(x-\omega)}+\frac{B}{(x-\omega)^2}+\frac{C}{(x-\omega^2)}+\frac{D}{(x-\omega^2)^2}$$ 
Once constant are found, the integration without substitution is quit simple
$$\int \frac{1}{(x-\omega)^2(x-\omega^2)^2}dx$$$$=A\int\frac{dx}{(x-\omega)}+B\int\frac{dx}{(x-\omega)^2}+C\int \frac{dx}{(x-\omega^2)}+D\int \frac{dx}{(x-\omega^2)^2}$$
$$=A\ln|x-\omega|-\frac{B}{x-\omega}+C\ln|x-\omega^2|-\frac{D}{x-\omega^2}$$ 
Alternatively, one of easiest ways is to use reduction formula:$\int \frac{dx}{(x^2+a)^n}=\frac{x}{(2n-2)(x^2+a)^{n-1}}+\frac{2n-3}{2n-2}\int \frac{dx}{(x^2+1)^{n-1}}$  as follows 
$$\int\frac{dx}{(x^2+x+1)^2}$$$$=\int\frac{d\left(x+\frac12\right)}{\left(\left(x+\frac12\right)^2+\frac34\right)^2}$$
Using reduction formula:
$$=\frac{x+\frac12}{(2\cdot 2-2)\left(\left(x+\frac{1}{2}\right)^2+\frac34\right)}+\frac{2\cdot 2-3}{(2\cdot 2-2)}\int \frac{d\left(x+\frac12\right)}{\left(x+\frac{1}{2}\right)^2+\frac34}$$
$$=\frac{2x+1}{4\left(x^2+x+1\right)}+\frac{1}{2}\frac{1}{\sqrt{3}/2}\tan^{-1}\left(\frac{x+\frac12}{\sqrt3/2}\right)+C$$
$$=\frac{2x+1}{4\left(x^2+x+1\right)}+\frac{1}{\sqrt{3}}\tan^{-1}\left(\frac{2x+1}{\sqrt3}\right)+C$$
