$I_n= \int_{-1}^1 (1 − x^2 )^n \cos(ax) \mathrm dx$ I was given this problem in my Analysis class and I'm very stuck.

Fix a non-zero number $a$. For $n = 0, 1, 2, \ldots$ define
  $$I_n= \int_{-1}^1 (1-x^2)^n(\cos(ax)) \mathrm dx$$
  Use integration by parts to show that
  $$I_n = 2n(2n−1)a^{−2}(I_{n−1})−4n(n−1)a^{-2}(I_{n-2})$$
  where $n = 2, 3, 4, \ldots$

I first tried integrating by parts where 
$u=(1-x^2)^n$ and $v=\sin(ax)/a $, but the resulting formula needs to be integrated by parts again and I'm not sure what to choose for my $u$ and $v$ to be. 
 A: Integrate by parts twice, separating the trig function from the polynomial each time. Then remember that $x^2=1-\left(1-x^2\right)$.
$$
\begin{align}
\int_{-1}^1(1−x^2)^n\cos(ax)\,\mathrm{d}x
&=\frac1a\int_{-1}^1(1−x^2)^n\,\mathrm{d}\sin(ax)\\
&=\frac{2n}a\int_{-1}^1x\,(1−x^2)^{n-1}\sin(ax)\,\mathrm{d}x\\
&=-\frac{2n}{a^2}\int_{-1}^1x\,(1−x^2)^{n-1}\,\mathrm{d}\cos(ax)\\
&=\frac{2n}{a^2}\int_{-1}^1\left[(1−x^2)^{n-1}-2(n-1)x^2(1−x^2)^{n-2}\right]\cos(ax)\,\mathrm{d}x\\
&=\frac{2n}{a^2}\int_{-1}^1\left[(2n-1)(1−x^2)^{n-1}-2(n-1)(1−x^2)^{n-2}\right]\cos(ax)\,\mathrm{d}x\\
&=\frac{2n}{a^2}\left[(2n-1)I_{n-1}-(2n-2)I_{n-2}\right]
\end{align}
$$
A: We use the fact that all $n$ are positive integers to write:
$$I_n=\int_{-1}^1 (1-x^2)^n \cos(ax) \mathrm dx= $$$$=\int_{-1}^1 (1-x^2)^{n-1} \cos(ax) \mathrm dx-\int_{-1}^1 x^2(1-x^2)^{n-1} \cos(ax) \mathrm dx$$
The latter integral has a different form, but we can try using integration by parts there with:
$$u= x \cos (ax)$$
$$dv=-x (1-x^2)^{n-1} dx$$
$$du= (\cos (ax) - a x \sin (ax))dx$$
$$v=\frac{1}{2n} (1-x^2)^n$$
We obtain:
$$-\int_{-1}^1 x^2(1-x^2)^{n-1} \cos(ax) \mathrm dx=-\frac{1}{2n} \int_{-1}^1 (1-x^2)^n (\cos (ax) - a x \sin (ax))dx$$
So we have:
$$\left(1+ \frac{1}{2n}\right) I_n=I_{n-1} + \frac{a}{2n} \int_{-1}^1 x(1-x^2)^n \sin (ax) dx$$
We use integration by parts again with:
$$dv=x(1-x^2)^n$$
$$u=\sin (ax)$$
$$v= - \frac{1}{2(n+1)} (1-x^2)^{n+1}$$
$$du=a \cos (ax)$$
So we have:
$$\int_{-1}^1 x(1-x^2)^n \sin (ax) dx= \frac{a}{2(n+1)} \int_{-1}^1  (1-x^2)^{n+1} \cos (ax) dx$$
And we obtain:
$$\left(1+ \frac{1}{2n}\right) I_n=I_{n-1} + \frac{a^2}{4n(n+1)} I_{n+1}$$
Or, rewriting:
$$a^2 I_{n+1}=2(n+1)(2n+1) I_n-4n(n+1) I_{n-1}$$
Shifting the index by $1$:

$$a^2 I_n=2n(2n-1) I_{n-1}-4n(n-1) I_{n-2}$$

A: Well, as you need to get from $I_n$ to $I_{n-1}$ and $I_{n-2}$, and $n$ shows up in the integrand as the exponent to a polynomial, it follows that you're going to have to differentiate the polynomial and integrate the trig function. ILATE would have you do that anyway. You're going to keep doing the same thing: let $u$ be the poly, and $dv$ be the trig plus the $dx$. 
