TITLE: Computing $\int\frac{7x^{13}+5x^{15}}{(x^7+x^2+1)^3}\,dx$
QUESTION [8 upvotes]: Compute the indefinite integral
$$
\int\frac{7x^{13}+5x^{15}}{(x^7+x^2+1)^3}\,dx
$$

My Attempt:
$$
\int\frac{7x^{13}+5x^{15}}{x^{21}(x^{-7}+x^{-5}+1)^3}\,dx = \int\frac{7x^{-8}+5x^{-6}}{(x^{-7}+x^{-5}+1)^3}\,dx
$$
Let $t=(x^{-7}+x^{-5}+1)$ such that
$$
\begin{align}
dt&=(-7x^{-8}-5x^{-6})\,dx\\
-dt&=(7x^{-8}+5x^{-6})\,dx
\end{align}
$$
We can change the variables of the integral  to get
$$
\begin{align}
-\int \frac{1}{t^3}\,dt &=\frac{1}{2}\cdot\frac{1}{t^2}+C\\
&= \frac{1}{2}.\frac{1}{(x^{-7}+x^{-5}+1)^2}+C\\
&= \frac{x^{14}}{2.(1+x^2+x^7)^2}+C
\end{align}
$$
I'd prefer to compute the integral using methods of differentiation rather than integration, i.e.
$$\frac{7x^{13}+5x^{15}}{(x^7+x^2+1)^3} = \frac{d}{dx} \left(\frac{ax^2+bx+c}{(x^7+x^2+1)^2}\right)
$$
but I could not get the same answer as above.

REPLY [2 votes]: Your first computation is correct.
If $P$ is a polynomial of degree $n$, then
$$
\frac{d}{dx} \Biggl(\frac{P(x)}{(x^7+x^2+1)^2}\Biggr)=\frac{Q(x)}{(x^7+x^2+1)^3}
$$
where 
$$
Q(x)=(x^7+x^2+1)P'(x)-2(7\,x^6+2\,x)P(x)
$$
is a polynomial of degree $\le n+6$. To get $x^{15}$ in the numerator you need $n\ge9$ (in fact, in this case $n=14$).