I thought it was interesting that $\frac{u^2+1}{(u^2-2u-1)^2}$ has the very simple integral $-\frac{u}{u^2-2u-1}$ but both of $\frac{u^2}{(u^2-2u-1)^2}$ and $\frac{1}{(u^2-2u-1)^2}$ are very complicated (the transcendental parts cancel each other though).
So my question is how do I check by looking at a rational function whether or not it's a derivative of a rational function?
For example $\frac{1}{(x^2+1)^2}$ isn't but $\frac{x}{(x^2+1)^2}$ is. How can we tell in general?