# Fourier integration help

1. Oct 14, 2007

### nicksauce

We're doing fourier series in PDEs, and I am left with needing to integrate:

$$\int_0^{\pi}\cos{nx}\sin{x}dx$$

I completely forget how to integrate this, and I don't have a calculus textbook anymore. Can someone give me a bump in the right direction? I could use maple for the integration, but I would like to know how to integrate it if it came up on an exam.

2. Oct 14, 2007

### Hurkyl

Staff Emeritus
Convert it into exponentials.

3. Oct 14, 2007

### nicksauce

I have not taken a class in complex vars yet, So I am guessing here. Is this correct?

$$\cos{nx}\sin{x} = Im(e^{inx}e^{ix}) - cos(x)sin(nx)$$

4. Oct 14, 2007

### rock.freak667

Well I have not done anything on Fourier integration but when I had to do $$\int sinNxcosMx dx$$

You had to use the fact that $$sin(A+B)+sin(A-B)=2sinAcosB$$

5. Oct 14, 2007

### nicksauce

Ah, of course.

6. Oct 14, 2007

### Hurkyl

Staff Emeritus
If you don't already know the exponential form of the trig functions, then practice deriving trig identities on the spot will probably be more fruitful than trying to memorize (or practice deriving) the exponential forms.

But, in case you're curious:

$$\cos x = \frac{e^{ix} + e^{-ix}}{2}$$

$$\sin x = \frac{e^{ix} - e^{-ix}}{2i}$$