1. ## fourier series

fin the cosine series fo r the function defined by
f(x) = 1/4 - x, 0<= x < 1/2
f(x) = x - 3/4, 1/2<=x<=1

for this, I chose L = 1/2, so t = 2pie x
so the integral limits are 0 to pie and pie to 2 pie...
How do I get it to go to -pie to pie? help!

2. Extend you function (represented by dotted line) in the way shown below.
Since $f(-1) = f(1)$ we can extend $f$ periodically by $f(x) = f(x+L)$ where $L=1$.

The Fourier series would be given as, $\frac{a_0}{2} + \sum_{n=0}^{\infty} a_n \cos (\pi n x) + b_n \sin (\pi n x)$.

Since $f$ on $[-1,1]$ is an even function it forces $b_n = 0$.

Thus, $a_n = 2\int_0^1 f(x)\cos (\pi n x) dx$ for $n\geq 0$.

3. Hi,

I still don't get it.
f(-1) = f(1) ? how?

i see that f(-1/2) = f (1/2)
so L = 1/2
so f(x) = f(x-1/2)

4. Originally Posted by tennis14321
I still don't get it.
f(-1) = f(1) ? how?
$f(-1)=1/4 = f(1)$

i see that f(-1/2) = f (1/2)
so L = 1/2
so f(x) = f(x-1/2)
It seems you can do your problem two ways. One way is the approach I was trying to do above with $L=1$ but you can also do it with $L=1/2$. Because if you take the function $f$ on $[-1/2,1/2]$ and extend it periodically you would get the same function. Thus, in that case you can pick $L=1/2$ too.

5. Originally Posted by ThePerfectHacker
$f(-1)=1/4 = f(1)$

It seems you can do your problem two ways. One way is the approach I was trying to do above with $L=1$ but you can also do it with $L=1/2$. Because if you take the function $f$ on $[-1/2,1/2]$ and extend it periodically you would get the same function. Thus, in that case you can pick $L=1/2$ too.

Thanks so much.
How do I go about extend it to 2Pie?
subtitute x by t/2pie
so the two integral are 0 to pie (1/4 - 2pie x) and pie to 2pie (2pie x - 3/4) ??? solving this, I should get a0 and an, is this correct?