# Trigonemtric Integral

1. Jun 17, 2008

### Calcotron

If f(x) = $$\sum a_{n}sin nx = a_{1}sin x + a_{2}sin 2x+...+ a_{N}sin Nx$$

show that the mth coefficient $$a_{m}$$ is given by the formula $$a_{m} = \frac{1}{\pi}\int f(x) sinmx dx$$

I am really stumped by this one. I have not seen a problem like this anywhere in the trig integral section so far. I want a push in the right direction to get me started.
Also, since I don't know how to format it, the integral has limits of -pi to pi. What am I missing?

2. Jun 18, 2008

### Defennder

Have you learnt Fourier series yet? It becomes readily apparent when you know it.

3. Jun 18, 2008

### Dick

You want to use the orthogonality of sin(nx) and sin(mx) when m is not equal to n. I think for the tex thing you want to do something like int_{-\pi}^{\pi}. As I recall.

4. Jun 18, 2008

### Defennder

Ok, here's what you can do:

$$f(x) = a_0 + a_1 sin (x) + \ \mbox{...} \ a_k sin (kx)$$ The integral you gave should be expressed as a definite integral with of 0 to 2pi instead right?

$$\frac{1}{\pi} \int^{2\pi}_0 f(x) \sin (mx) \ dx = \frac{1}{\pi} \sum^n_{k=0} \int^{2\pi}_0 a_k \sin (kx) \sin (mx) \ dx = \frac{1}{\pi} \sum^n_{k=0} \int^{2\pi}_0 \frac{a_k}{2} \cos(k-m)x - \cos (k+m)x \ dx$$

What happens when $$k=m$$ or if it does not equal m?

5. Jun 18, 2008

### Calcotron

No I have not done Fourier series yet. I'm working through the textbook Single Variable Calculus Early Transcendentals right now by James Stewart and I have not encountered Fourier series yet, nor can I find it in the index. Is knowledge of it needed for this question?

6. Jun 18, 2008

### Defennder

No I don't think it's required. It just so happens that this is something which will come up when you learn Fourier series.

7. Jun 18, 2008

### Dick

You haven't shown integral of sin(nx)*sin(mx) over -pi to pi is zero unless n=m? Defennder is outlining a proof of that along with how to find the value if n does equal m. You don't need to know Fourier series, you just need to know how to integrate. This is a step in learning Fourier series.

8. Jun 18, 2008

### Calcotron

Alright I see that if they are not equal you can only get 0. However, if they are equal, when you integrate, would you not end up with fractions that have zero in the denominator?

9. Jun 18, 2008

### Defennder

Why would that be the case? If k=m, then the integral in the 2nd step becomes $$\frac{1}{\pi} \sum^n_{k=0} \int^{2\pi}_0 a_k \sin^2 (kx) dx$$. This evaluates to a non-zero constant.

10. Jun 18, 2008

### Calcotron

Oh whoops, forgive me. But isn't the step you showed like going backwards? Would I not need to use the half angle identity again to integrate it?

Edit: Ok whoops again let me integrate it then. So I end up with $$\frac{1}{\pi} \sum^n_{k=0} a_k \pi$$

damn latex code will be the death of me.

So I pull out the pi and I assume that shows that it worked?

If you will be so kind as to answer one more question, why is it you had the integral to the right of the sigma? From the formula it looks like the sigma should be inside the integral.

Last edited: Jun 18, 2008
11. Jun 18, 2008

### Defennder

I got the rightmost expression from the preceding one on the left, and the point of sin^2 was to show that it was non-zero, without having to evaluate it explicitly. And it doesn't matter if the integral is inside or outside the summation; the integral of a series is the same as the sum of integrands of the series. This allows for term by term integration.

12. Jun 18, 2008

### arunbg

Once again,
$$\frac{1}{\pi} \int^{2\pi}_0 f(x) \sin (mx) \ dx = \frac{1}{\pi} \sum^n_{k=0} \int^{2\pi}_0 a_k \sin (kx) \sin (mx) \ dx$$
When m does not equal k, the integral becomes 0, otherwise you get a constant value.
The sigma symbol can be taken to the left of the integral, from its right since the integral can be distributed over the summation. For eg, if f(x) = $\sum^n_{k=1}f_k(x) = f_1(x)+f_2(x)+...+f_n(x)$, then

$$\int f(x) = \int \sum^n_{k=1}f_k(x) = \int f_1(x) + .... + \int f_n(x) = \sum^n_{k=1} \int f_k(x)$$

In your question,there is no sigma finally, as all terms where k does not equal m are cancelled, leaving only one single term.

13. Jun 18, 2008

### Calcotron

OK, got it. Thank you very much all. Is there some way for me to change the status of this thread to solved or does the moderator do that?

14. Jun 18, 2008

### Dick

I think you do it. Is it under 'Thread Tools'?