Calculus Integral from Partial Fractions When you have an irreducible quadratic factor repeated you can get integrals that look like $\int \dfrac{dx}{(x^2+a)^m}$, where $m>1$, integer, and $a>0$.  What is the best way to integrate this function?  Is there more than one way?
 A: Let:
$$ I_m = \int \frac{dt}{(1+t^2)^m}.$$
We have $I_0=t, I_1 = \arctan t$ and:
$$ I_{m+1}=\int \frac{(1+t^2)-t^2}{(1+t^2)^{m+1}}\,dt = I_m-\int \frac{t}{2}\cdot\frac{2t}{(1+t^2)^{m+1}}\,dt$$
hence, through integration by parts:
$$ I_{m+1} = I_m+\frac{t}{2m}\cdot\frac{1}{(1+t^2)^m}+\frac{I_m}{2m} $$
and we have the recursive formula:

$$ I_{m+1} = \frac{2m+1}{2m}\,I_m + \frac{1}{2m}\cdot\frac{t}{(1+t^2)^m}. $$

A: Since $a > 0$, let $a = b^2$. Then let
$$x = b\tan\theta$$
$$dx = b\sec^2\theta\,d\theta$$
so that
$$
\int \dfrac{dx}{(x^2+b^2)^m} =
\int \dfrac{b\sec^2\theta\,d\theta}{b^{2m}\sec^{2m}\theta} =
b^{1-2m}\int \cos^{2(m-1)}\theta\,d\theta
$$
This can now be integrated by parts repeatedly.
A: The recurrence relation derived by Jack D'Aurizio in his answer above can actually be solved explicitly for $I_m$. First let me quote it below, but changing the recurrence index to $n$:

$$
I_{n+1} = \frac{2n+1}{2n}\,I_{n} + f_n(t)
\qquad (n \ge 1) \qquad (1)
$$
  where
  $$
\begin{align}
I_0 &= t \\[0.05in]
I_1 &= \arctan(t) \\[0.05in]
f_n(t) &\equiv \frac{1}{2n}\frac{t}{(1+t^2)^n} \qquad (n \ge 1)
\end{align}
$$

Now define the quantity

$$
P_{n} \equiv \prod_{k\,=\,1}^{n} \left(\frac{2k+1}{2k}\right)
           = \prod_{k\,=\,1}^{n} \left(1 + \frac{1}{2k}\right)
$$

Then, dividing (1) by $P_n$, we find
$$
\frac{I_{n+1}}{P_{n}} - \left(\frac{2n+1}{2n}\right)\frac{I_{n}}{P_{n}} = \frac{f_n}{P_{n}}
$$
Since
$$
P_{n} = \left(\frac{2n+1}{2n}\right)P_{n-1}
$$
we have
$$
\frac{I_{n+1}}{P_{n}} - \frac{I_{n}}{P_{n-1}} = \frac{f_n}{P_{n}}
$$
Now sum both sides on $n$:
$$
\sum_{n\,=\,2}^{m-1} \left( \frac{I_{n+1}}{P_{n}} - \frac{I_{n}}{P_{n-1}} \right)= \sum_{n\,=\,2}^{m-1} \frac{f_n}{P_{n}}
$$
The LHS telescopes, so
$$
\frac{I_{m}}{P_{m-1}} - \frac{I_{2}}{P_{1}} = \sum_{n\,=\,2}^{m-1} \frac{f_n}{P_{n}}
$$
and
$$
I_{m} = P_{m-1} \left(
\frac{I_{2}}{P_{1}} + \sum_{n\,=\,2}^{m-1} \frac{f_n}{P_{n}} \right) = P_{m-1} \left(
\frac{I_{2}}{P_{1}} - \frac{f_1}{P_{1}} + \sum_{n\,=\,1}^{m-1} \frac{f_n}{P_{n}} \right) = P_{m-1} \left(
I_1 + \sum_{n\,=\,1}^{m-1} \frac{f_n}{P_{n}} \right)
$$
where (1) was used in the last equality to remove $I_2$.
Hence,

$$
I_{m} = P_{m-1} \left(
\arctan(t) + \sum_{n\,=\,1}^{m-1} \frac{t\,(1+t^2)^{-n}}{2n\,P_{n}} \right)
\qquad (m \ge 2)
$$

A: Hint: Evaluate $I(a)=\displaystyle\int\frac{dx}{x^2+a}$ , and then differentiate both sides $m-1$ times with regard to a.
