<s>[INST] 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.
 [/INST] Call your integral $I_n$ so that the result of your integration by parts is $$I_n=\frac{x}{(x^2+a^2)^n}+2nI_n-2na^2I_{n+1}$$
Now rearrange so that $I_{n+1}$ is the subject of the formula.
Then replace all $n$ with $n-1$ and you have the formula you require.
</s>