# Question involving integration and cosine

1. Dec 1, 2011

### pc2-brazil

1. The problem statement, all variables and given/known data
Show that, if n is an odd number, $\int_0^\pi \cos^nx dx = 0$

2. Relevant equations

3. The attempt at a solution

$$\int_0^\pi \cos^nx dx = \int_0^\pi \cos^{n-1}(x)\cos (x) dx =$$
$$= \int_0^\pi (\cos^2x)^{\frac{n-1}{2}} \cos x dx = \int_0^\pi (1 - \sin^2x)^{\frac{n-1}{2}} \cos x dx$$
Now the next step would be to expand the term $(1 - \sin^2x)^{\frac{n-1}{2}}$. Then, I would be able to use u = sin(x) and du = cos(x) dx to eliminate the term cos(x).
It seems to make sense to expand $(1 - \sin^2x)^{\frac{n-1}{2}}$ with the binomial theorem, but it would get very complicated. Is there a better way?

Thank you in advance.

2. Dec 1, 2011

### Dick

Look for relation between the integral from 0 to pi/2 and the integral from pi/2 to pi. Sketch a graph.

3. Dec 1, 2011

### pc2-brazil

I see what you mean. For the function y = cos x, the integral from π/2 to π is minus the integral from 0 to π/2 (because $\cos(\frac{\pi}{2} + x) = -\cos(\frac{\pi}{2} - x)$, if x is a real number and $0\leq x\leq\frac{\pi}{2}$). So, the integral from 0 to π is zero.
For the function cosnx, as long as n is odd, this relation will be maintained.
Is this correct? Is there a more formal way of showing it?

Last edited: Dec 1, 2011
4. Dec 1, 2011

### Dick

Sure, split it into two integrals and do a change of variable like x=pi-u on the second one. Use some trig, like cos(pi-u)=(-1)*cos(u).