I assumed that it would be straightforward to find the partial fraction decomposition over the reals of the rational function $$f(x) = \frac{1}{(x^2 +1)^2}.$$ However, when I try what I thought would be the usual method of writing it as $$\frac{1}{(x^2+1)^2} = \frac{Ax + B}{x^2 + 1} + \frac{Cx + D}{(x^2+1)^2},$$ I find that the only choice of constants is $A = B = C = 0$, and $D = 1$, simply reproducing what I started with. Typically, one might think that this would be a logical approach to finding the indefinite integral of $f(x)$, but it seems to fail here. Could someone explain why this happens, or where I have made a mistake?
For the record, the integral is elementary using the substitution $x = \tan \theta$ and a trig identity in the result.
The method didn't "fail". Partial Fractions had already reached the point that you want it to reach, namely one in which you have to do integrals all of which are of one of the following forms:
The corresponding reduction formula, $$\int\frac{dw}{(w^2+b^2)^n} = \frac{1}{2b^2(n-1)}\left(\frac{w}{(w^2+b^2)^{n-1}} + (2n-3)\int\frac{dw}{(w^2+b^2)^{n-1}}\right)$$ gives $$F(x) = \int \frac{dx}{(x^2+1)^2} = \frac{x}{2(x^2+1)} + \frac{1}{2}\int\frac{dx}{x^2+1}= \frac{x}{2(x^2+1)} + \frac{1}{2}\arctan(x) + C.$$ (See the long discussion here; the case of an irreducible quadratic denominator raised to some power with constant numerator is item 5 towards the end).
You can verify this holds by differentiation: $$ F'(x) = \frac{1}{2}\left( \frac{(x^2+1) - 2x^2}{(x^2+1)^2} + \frac{1}{x^2+1}\right) = \frac{1}{2}\left(\frac{1-x^2+x^2+1}{(x^2+1)^2}\right) = \frac{1}{(x^2+1)^2}.$$