# Countour integration (cosx)^2n

## Homework Statement

Use contour integrals and justify your steps, find $$\int$$ cos2nx dx where the integral is from 0 to 2pi.

## The Attempt at a Solution

My first thought was that this integral would be zero, using the residue theorem with residue 0, as I'm integrating round a closed curve. I think this is wrong but I don't know why.

I then decided to write f(x) = cos 2nx = [eix + e-ix / 2i]2n
I could use the substitution z=eix to get f(z) = [1/2i (z + 1/z)]2n, this would have a singularity at z=0 but as z is an exponential it is never 0.

I thought about using a keyhole contour with f(z) as above, but I'm really not sure.

Related Calculus and Beyond Homework Help News on Phys.org
vela
Staff Emeritus
Homework Helper

## Homework Statement

Use contour integrals and justify your steps, find $$\int$$ cos2nx dx where the integral is from 0 to 2pi.

## The Attempt at a Solution

My first thought was that this integral would be zero, using the residue theorem with residue 0, as I'm integrating round a closed curve. I think this is wrong but I don't know why.

I then decided to write f(x) = cos 2nx = [eix + e-ix / 2i]2n
I could use the substitution z=eix to get f(z) = [1/2i (z + 1/z)]2n, this would have a singularity at z=0 but as z is an exponential it is never 0.

I thought about using a keyhole contour with f(z) as above, but I'm really not sure.
It doesn't matter that the eix is never 0 on the contour. All that matters is that the singularity lies inside the closed contour.

Don't forget to convert dx into dz as well. It'll introduce another factor of z.