Harmony said:
I integrate again as you advised, and eventually this term appear:
...(I skip the part where there is no integrals)...-1/n ∫ 2 cos^n x cos nx - cos^(n-2) x dx
How do I get rid of cos^(n-2) x ?
You will try to find a Recursion Formula for it.
Say, let:
I_{\alpha , \beta} = \int \cos ^ \alpha (x) \cos (\beta x) dx
You seem to have forget some brackets, and some constants in the result you provided..
You'll eventually end up with:
I_{n, n} = \mbox{something} + \mbox{something} \times I_{n, n} + \mbox{something} \times I_{n - 2, n}
After some isolation, and manipulations, you'll find the relation between I
n, n, and I
n - 2, n.
Besides, it's easy to calculate:
I_{0, n} = \int \cos(nx) dx
and:
I_{1, n} = \int \cos(x) \cos(nx) dx, right?
Now, say, you need to calculate: I
7, 7, you start from I
1, 7 (which is easy to calculate, eh?), then, by using the relation between I
n, n, and I
n - 2, n, you'll be able to find I
3, 7, do the same, you'll get I
5, 7, and finally, I
7, 7, as desired.
If you want to calculate I
8, 8, you'll start from I
0, 8..
So, every I
n, n'll eventually boil down to either I
1, n, or I
0, n. This is how Recursion Formula works.
You your final answer will look something like:
\left \{ \begin{array}{l} I_{n, n} = \mbox{something } I_{n - 2, n} \\ I_{0, n} = .. \\ I_{1, n} = ... \end{array} \right.
Is it clear? :)