# Homework Help: Fourier series of a periodic function not starting at x=-L

1. Dec 3, 2013

### Nikitin

1. The problem statement, all variables and given/known data
In "oppgave 4" http://www.math.ntnu.no/emner/TMA4120/2011h/xoppgaver/tma4120-2010h.pdf
you have a periodic function which is NOT periodic from $x=-L=-\pi$ to $x=L=\pi$, but at $x=0$ and ends at $x=2 \pi=2L$.

The formulas I have (like these http://tutorial.math.lamar.edu/Classes/DE/FourierSeries.aspx) for building up a fourier transform assumes the function is periodic and begins its period at $x=-L$ and ends at $x=L$.

What am I to do?

3. The attempt at a solution

My gut feeling tells me I should just modify them so that the integration starts at $x=0$ and ends at $x=2 \pi$.

Is this correct? why?

EDIT: Obviously I've missed some important theory on fourier analysis, so I hope you guys could enlighten me a bit? As a guess: The formulas I already got are built up using that cos and sin are perpendicular functions when their product is integrated from -pi to pi. Since the same holds if they're integrated from 0 to 2pi, all the existing formulas can painlessly be modified to also be valid for a function periodic from x=0 to x=2L? Or, x=x_0 to x=x_0 + 2L, for that matter?

Last edited: Dec 3, 2013
2. Dec 3, 2013

### HallsofIvy

If f(x) has period from 0 to $2\pi$ then f(x- \pi) has period from $-\pi$ to $\pi$.

3. Dec 3, 2013

### Nikitin

Ahh, so if I just do that transformation ($x \rightarrow x' - \pi$) on all the formulas, I'll end up with the limits going from $x'=0$ to $x'=2 \pi$? Alright, thanks :)

So, for example: $a_0 = \frac{1}{2 \pi} \int_{x=-\pi}^{x=\pi} f(x) dx = \frac{1}{2 \pi} \int_{x'=0}^{x'=2 \pi} f(x'-\pi) dx'$, and ditto for $a_n$ and $b_n$. But what about the $(x'-\pi)$ input of $f$ in the second integral? the function is shifted to the right?

How would I use the above result to find the fourier series of the function from the OP, using the original formulas?

Last edited: Dec 3, 2013
4. Dec 3, 2013

### LCKurtz

Your function is periodic of period $2\pi$. You can use the usual formulas on $[-\pi,\pi]$ as long as you have the right function $f(x)$ on that interval. If there is some reason given in the problem that you can't do this, well, I don't read German (or whatever that is).

5. Dec 3, 2013

### Nikitin

I'm sorry, I formulated myself horribly in the OP. Should've read it before posting.

What I meant was:

f(x) is periodic, but its period starts on x=0 and ends on x=2pi, instead of starting at x=-pi and ending at x=pi like I am used to.
The question: How am I supposed to find the fourier series of f(x) in oppgave 4, when all the formulas I know presume that the period of a periodic function f(x)=f(x+2pi) starts on -pi and ends at pi?

I tried transforming the coordinates of my usual formulas to fit the situation for f(x):

But I am doing it wrong.

So could somebody help to clear this up? I'd really appreciate it.

Last edited: Dec 3, 2013
6. Dec 3, 2013

### LCKurtz

You don't have to shift anything. Write the equation of that line segment in your picture on $[-\pi,0]$ and the equation of the line segment on $[0,\pi]$. Use those two equations in a two piece formula $f(x)$ and use your standard formulas.

7. Dec 3, 2013

### Nikitin

Could you write down the expressions for $a_0$,$a_n$ and $b_n$ as an example?

The function from oppgave 2 is this:

$f(x) = 2 \pi -x$ for $0 <x \leq \pi$ and $f(x) = 3 \pi - 2x$ for $\pi <x<2\pi$, while $f(x) = f(x+ 2 \pi)$.

8. Dec 3, 2013

### LCKurtz

OK. You already have $f(x)$ on $(0,\pi)$. What is the equation of that line in your picture going from $(-\pi,\pi)$ to $(0,-\pi)$? It's just a straight line segment. Write its equation and it is the other piece of $f(x)$. Then use your standard formulas for the coefficients. You are going to have to break up the integrals like$$\int_{-\pi}^\pi = \int_{-\pi}^0+\int_0^\pi$$because of the two piece formula. Is that what is bothering you?

9. Dec 3, 2013

### Nikitin

oh crap, nevermind. I thought you only could approximate a periodic function with a fourier expansion if the function is smooth over the interval you use to create the expansion. I realize that's incorrect now.

OK thanks for the help! :)

EDIT: But btw, it would be possible to also use the interval going from $x=0$ to $x=2 \pi$ to create a fourier series of the function, right?

Last edited: Dec 3, 2013
10. Dec 3, 2013

### LCKurtz

Yes. You can use any $2\pi$ interval for the integration. If you use $(0,2\pi)$ you can use the two piece formulas you are given. For a function of period $P$$$\int_0^P f(x)~dx = \int_a^{a+P}f(x)~dx$$for any $a$.

11. Dec 3, 2013

### Nikitin

ahh yes, of course. How silly of me. OK, thanks :)