# Homework Help: Fourier series sawtooth wave

1. Jan 9, 2010

### 8614smith

1. The problem statement, all variables and given/known data
Express the function plotted in the figure below as a Fourier series.

2. Relevant equations
3. The attempt at a solution
I have the fully worked out solution infront of me and im ok with working out the a0, an and bn parts but what i want to know is why is the function $$\frac{A}{\pi}\left|x\right|$$ ?

does the $$\frac{A}{\pi}$$ part refer to the function between 0 and $$\pi$$?

If so what about the function between $$\pi$$and$$2\pi$$? do i just leave that out? and why is it only integrated below between 0 and pi?

here is the solution:

$$f(x)=\frac{A}{\pi}\left|x\right|$$ the function is even therefore $${b_n} =0$$

$${a_0}=\frac{2A}{\pi^2}\int^{\pi}_{0}xdx=\frac{2A}{\pi^2}\left[\frac{x^2}{2}\right]^{\pi}_{0}=A$$

$${a_n}=\frac{2A}{\pi^2}\int^{\pi}_{0}xcos(nx)dx=\frac{2A}{n{\pi^2}}\left[xsin(nx)\right]^{\pi}_{0}-\frac{2A}{n{\pi^2}}\int^{\pi}{0}sin(nx)dx$$

...well you get the idea its taking me too long to type out the entire solution so i will leave it at that.

Can someone also please tell me why there is a $$\frac{2A}{\pi^2}$$ term on the a0 and an terms and why this is not just $$\frac{A}{\pi}$$?

In other words where does the extra $$\frac{2}{\pi}$$ come from? and how will i know when to put it in?

thanks

File size:
7.7 KB
Views:
1,892
2. Jan 9, 2010

### Dick

It looks like the definition of the fourier integral they are using integrates from -pi to pi. Yes, A|x|/pi is the function on [0,pi]. Since your function is symmetric on [-pi,pi] they just integrated from 0 to pi and doubled it. That's where the 2 comes from. The A/pi comes from f(x). The other pi is in the definition of the fourier integral. Hence 2A/pi^2.

3. Jan 10, 2010

### 8614smith

Ah i see - because the A/pi is just a constant it can come out of the integral, but why is it doubled? why is it not just integrated from 0 - 2pi is there a reason for not integrating between these limits?

4. Jan 10, 2010

### HallsofIvy

You have to "normalize" the integral. Obviously, the Fourier series for sin(nx), on the interval from [a, b], should be just "$sin(2\pi nx/(b-a))$" (which has period $2\pi$)- in other words, the coefficient for sin(2\pi nx/(b-a)) is 1 and for all other sin(2\p kx/(b-a)) and cos(2\pi kx/(b-a), 0. It's easy to see that the product of two different sine and cosine will integrate to 0 but
[tex]\int_a^b sin^2(2\pi nx/(b-a) dx= \frac{1}{2}\int_a^b (1- cos(4\pi nx/(b-a))dx[/itex]
by using the trig identity $sin^2(\theta)= (1/2)(1- cos(2\theta)$. the integral of "$cos(4\pi nx/(b-a))$" will be 0 at both ends but
[tex]\int_a^b \frac{1}{2}dx= \frac{b- a}{2}[/itex]

In order to get "1" we must divide the integral by that. That's where we get the "2".

5. Jan 10, 2010

### 8614smith

no, im lost again, why does the integral have to be normalized? and i thought normalizing it was taking the integral of the function squared between + and - infinity not a and b.

6. Jan 10, 2010

### Dick

Look up the definition of the a_n and b_n's in your problem. In a Fourier series problem you don't integrate between -infinity and +infinity. You integrate over an integral that the given function is periodic over.

7. Jan 10, 2010

### 8614smith

Ok i realise that, but why does it have to be normalized? when ive done fourier series' of other square waves ive never normalized it before and got the right answer

8. Jan 10, 2010

### Dick

You don't have to normalize anything. That should be already built into the definition of the a_n and b_n's. What are they?

9. Jan 10, 2010

### 8614smith

Ok i totally get that now, it was the normalization thing that threw me for a second, Doubling the integral only works for even functions yes?

10. Jan 10, 2010

### Dick

Sure. It works because you can say 'the negative part equals the positive part'. You can certainly say that about even functions. And probably not many others.

11. Jan 10, 2010

### 8614smith

ok great thanks