There are a number of integral reduction formulas from basic calculus, including several involving trigonometric or exponential functions. These are of the form where some term in an integrand is raised to the $n$th power then gets expressed as constants or other terms but with the same form integral with the power now "reduced" to $n-1$.
Here is one such integral reduction formula:
$$\int \frac{1}{(1 + x^2)^n}\ dx = \frac{x}{(2 n - 2)(x^2 + 1)^{n-1}} + \frac{2 n - 3}{2 n - 2} \int \frac{1}{(1 + x^2)^{n - 1}}\ dx$$
I'd like to derive this reduction formula computationally.
The obvious first step is to simply compute the integral:
Assuming[n \[Element] Integers,
Integrate[1/(x^2 + 1)^n, x]]
which yields:
$$x \, _2F_1\left(\frac{1}{2},n;\frac{3}{2};-x^2\right) ,$$
where $\mbox{}_2F_1 (\cdot)$ is the Hypergeometric function. This means we can immediately write down the integral which has power $n-1$ in the denominator by replacing $n \to n-1$ in the solution formula above.
But how to take these results to compute the reduction relation?
One step might be to perform the integral for $n=1$, which yields $\tan^{-1} x$ and try to form a recursion formula up to higher $n$ this way:
f[1, x] = ArcTan[x];
f[n_Integer, x_Real] := x f[n - 1, x]
(I don't understand why this code won't evaluate f[2,x]
properly.)
I've tried expanding each result and subtracting to find the difference, or some form of recursion relation, but without success.
Or might there be another approach?