Reduction formula for $\int\frac{dx}{(x^2+a^2)^n}$ How can I use integration by parts to write $$\int\frac{dx}{(x^2+a^2)^n} = \frac{x}{2a^2(n-1)(x^2+a^2)^{n-1}}+\frac{2n-3}{2a^2(n-1)}\int\frac{dx}{(x^2+a^2)^{n-1}}?$$
I would try $$u=\frac{1}{(x^2+a^2)^n},du=\frac{-2nx}{(x^2+a^2)^{n+1}}dx; dv=dx,v=x.$$ Integration by parts implies $$\int\frac{dx}{(x^2+a^2)^n}=\frac{x}{(x^2+a^2)^n}+2n\int\frac{x^2}{(x^2+a^2)^{n+1}}\\=\frac{x}{(x^2+a^2)^n}+2n\int\frac{(x^2+a^2)-a^2}{(x^2+a^2)^{n+1}}\\=\frac{x}{(x^2+a^2)^n}+2n\int\frac{1}{(x^2+a^2)^{n}}-2na^2\int\frac{dx}{(x^2+a^2)^{n+1}}$$ but I don't think I'm doing this correctly since the power of the denominator $(x^2+a^2)$ is not decreasing.

hint
$$\frac {1}{(x^2+a^2)^n}=\frac {1}{a^2}\frac {a^2+x^2-\frac {2x}{2}x}{(a^2+x^2)^n} $$
