# Homework Help: Trigonometric Integration

1. Feb 22, 2008

### Harmony

1. The problem statement, all variables and given/known data
Integrate cos^n x cos nx

2. Relevant equations
Integration by part equations, trigonometric integrals

3. The attempt at a solution
I was given the hint that this integration involves integration by part and trigonometry integrals. I tried integration by part, by assigning v=cos^n x and du/dx=cos nx, but that failed. I thought of converting the cos nx, so that the term cos x may appear and enables me to integrate cos^n x, but so far all my attempt have failed.

2. Feb 22, 2008

### Gib Z

Well, why not try to express cos (nx) in terms of of cos(x) and sin(x). To do that, use Eulers Identity: $$e^{ix} = \cos x + i \sin x$$, so that $$\cos (nx) + i\sin (nx) = (\cos x + i \sin x)^n$$, expand the RHS using the binomial theorem and separate real and imaginary coefficients.

3. Feb 23, 2008

### VietDao29

Apart from Gib Z's approach, I have the feeling that you can also do it via Integration by Parts (twice, I think). Perhaps, you wouldn't mind showing us your work, and where you got stuck, so that we can help, or check the steps for you, would you? :)

4. Feb 23, 2008

### Gib Z

Try VietDao29's solution, much simpler, should try that first =] Mine takes ages :(

5. Feb 23, 2008

### Harmony

∫ cos^n x cos nx = (sin nx cos^n x)/n + ∫ sin nx sin x cos^(n-1) x dx

I got stuck here. Converting sin nx sin x into [cos (n-1)x - cos (n+1)x]/2 didn't help.

6. Feb 23, 2008

### VietDao29

Nah, just continue Integrating by Parts by choosing u = sin(x) cosn - 1(x), and dv = sin(nx) dx (later on, you'll find that this is a very common method to solve many Integration by Parts problems).

Just try it, and see if you get stuck any more. :)

7. Feb 24, 2008

### Harmony

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 ?

8. Feb 24, 2008

### VietDao29

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 In, n, and In - 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: I7, 7, you start from I1, 7 (which is easy to calculate, eh?), then, by using the relation between In, n, and In - 2, n, you'll be able to find I3, 7, do the same, you'll get I5, 7, and finally, I7, 7, as desired.

If you want to calculate I8, 8, you'll start from I0, 8..

So, every In, n'll eventually boil down to either I1, n, or I0, n. This is how Recursion Formula works.

$$\left \{ \begin{array}{l} I_{n, n} = \mbox{something } I_{n - 2, n} \\ I_{0, n} = .. \\ I_{1, n} = ... \end{array} \right.$$