Integration by parts and coefficients

1. Sep 16, 2008

Somefantastik

$$b_{n} = \frac{1}{\pi}\int^{\pi}_{-\pi}sin\theta sin n\theta d \theta$$

let

$$u = sin \theta, \ du = cos \theta d \theta$$
$$dv = sin n \theta d \theta, \ v = -\frac{1}{n}cosn \theta$$

$$= \left[-\frac{1}{n} sin \theta cos n \theta \right|^{\pi}_{-\pi} + \frac{1}{n} \int^{\pi}_{-\pi} cos \theta cos n \theta d \theta \right]$$

now $$-\frac{1}{n} sin \theta cos n \theta \right|^{\pi}_{-\pi} = 0$$

and

$$u = cos\theta, \ du = -sin \theta d\theta$$

$$dv = -sin\theta d\theta, \ v = \frac{1}{n}sin n \theta$$

$$= \frac{1}{n} \left[\frac{1}{n} cos \theta sin n \theta \right|^{\pi}_{-\pi} + \frac{1}{n} \int^{\pi}_{-\pi} sin \theta sin n\theta \right]$$

I keep getting that to come out to zero but I know it shouldn't. I'm not sure what it should come out to, but it's a Fourier coeff for expanding sin(x). Since sin(x) is an odd function, I know that this coeff should have a value other than 0.

Can someone help me?

2. Sep 16, 2008

dimeking

You have to do "integration by parts" twice to get the answer. You are correct - it's not zero.

3. Sep 16, 2008

Somefantastik

well I did, and got zero. The second integration by parts is the last line. What am I missing here?

4. Sep 16, 2008

dimeking

I don't have time to go through your entire calculation, but one of the denominators should be n-squared and not n. Then the terms don't cancel. I hope this helps.

5. Sep 16, 2008

Somefantastik

Ok thanks for looking. I'll keep trying.

6. Sep 16, 2008

Somefantastik

$$b_{n} = \frac{1}{\pi}\int^{\pi}_{-\pi}sin\theta sin n\theta d \theta$$

let

$$u = sin \theta, \ du = cos \theta d \theta$$
$$dv = sin n \theta d \theta, \ v = -\frac{1}{n}cosn \theta$$

$$= \left[-\frac{1}{n} sin \theta cos n \theta \right]^{\pi}_{-\pi} + \left[\frac{1}{n} \int^{\pi}_{-\pi} cos \theta cos n \theta d \theta \right]$$

now $$\left[-\frac{1}{n} sin \theta cos n \theta \right]^{\pi}_{-\pi} = 0$$

and

$$u = cos\theta, \ du = -sin \theta d\theta$$

$$dv = -sin\theta d\theta, \ v = \frac{1}{n}sin n \theta$$

$$= \frac{1}{n} \left[\frac{1}{n} cos \theta sin n \theta \right]^{\pi}_{-\pi} + \frac{1}{n} \left[\frac{1}{n} \int^{\pi}_{-\pi} sin \theta sin n\theta \right]$$

since $$\frac{1}{n} \left[\frac{1}{n}cos\theta sin n \theta \right]^{\pi}_{-\pi} = 0$$

Then

$$\frac{1}{\pi}\int^{\pi}_{-\pi}sin\theta sin n\theta d \theta = \frac{1}{n^{2}}\int^{\pi}_{-\pi}sin\theta sin n\theta d \theta$$

That still looks like zero to me. ??? :(

7. Sep 17, 2008

dimeking

Sorry - yesterday I never actually evaluated my answer.

After reconsidering the problem, I realize that because the integrand is the sine of theta - an odd function - times the sine of (n times theta) - another odd function - the integrand is an even function. Therefore integrating over limits that are symmetrical to theta = zero will yield an answer of zero.

I verified this by evaluating my answer from negative pi to pi.