1. ## Fourier series

Find the Fourier series of the function $f(x)$, with a period of $2\pi$, defined by

$f(x)=$

$x : 0\leq x\leq\pi$
$0 : -\pi\leq x<0$

(Sorry, couldn't get the coding right to write it out properly).

I need a fairly lengthy explanation on this one 'cause I have no idea. Cheers.

2. Originally Posted by chella182
Find the Fourier series of the function $f(x)$, with a period of $2\pi$, defined by

$f(x)=$

$x : 0\leq x\leq\pi$
$0 : -\pi\leq x<0$

(Sorry, couldn't get the coding right to write it out properly).

I need a fairly lengthy explanation on this one 'cause I have no idea. Cheers.

If you really have "no idea" about this then you better read/check your books/class notes. Nobody not having an idea of this should be trying this kind of problems.

It is my opinion that "fairly lengthy explanations" belong in the classroom or with a particular teacher. Here you can usually expect a little explanation and

some hints and/or complete resolution but without much explanation.

In this case it's hard to decide what you're supposed to know and thus how to approach this problem: have you studied complex exponential

Fourier series? If that's the case, and since it seems to be that

$f(x)=\left\{\begin{array}{ll}x&,\,\,if\,\,\;\;\;\; 0\leq x\leq\pi\\{}\\0&,\,\,if\, -\pi\leq x<0\end{array}\right.$ , then we get that

$\forall\,\,0\neq n\in\mathbb{Z}\,,\,\,c_n:=\frac{1}{2\pi}\int\limit s^\pi_{\,-\pi}f(x)\,e^{-inx}\, dx$ $=\frac{1}{2\pi}\int\limits^\pi_0x\,e^{-inx}\,dx=\frac{1}{2\pi}\left[\frac{i}{n}[xe^{-inx}]^\pi_0 -\frac{i}{n}\int\limits_0^\pi e^{-inx}\,dx\right]$ $=\left\{\begin{array}{cl}\frac{i}{2n}&,\,for\,\,ev en\,\,n\\{}\\-i\,\left(\frac{1}{2n}+\frac{1}{\pi n^2}\right)&,\,for\,\,odd\,\,n\end{array}\right.$ .

Check the above and then evaluate $c_0:=\frac{1}{2\pi}\int_0^\pi\,f(x)\,dx$ (trivial integral)

Tonio

3. For a function of period $2 \pi$ is...

$f(x)= \frac{a_{0}}{2} + \sum_{n=1}^{\infty} a_{n}\cdot \cos nx + \sum_{n=1}^{\infty} b_{n}\cdot \sin nx$ (1)

... where...

$a_{n} = \frac{1}{\pi} \int_{- \pi}^{+ \pi} f(x)\cdot \cos nx\cdot dx$

$b_{n} = \frac{1}{\pi} \int_{- \pi}^{+ \pi} f(x)\cdot \sin nx\cdot dx$ (2)

Remebering that for $n >0$ is...

$\int x\cdot \cos nx \cdot dx = \frac{\cos nx}{n^{2}} + \frac{x\cdot \sin nx}{n} + c$

$\int x\cdot \sin nx \cdot dx = \frac{\sin nx}{n^{2}} - \frac{x\cdot \cos nx}{n} + c$ (3)

... and for $n=0$...

$\int x\cdot dx = \frac{x^{2}}{2} + c$ (4)

... we obtain...

$a_{0} = \frac{1}{\pi} \int_{0}^{\pi} x\cdot dx = \frac{\pi}{2}$

$a_{n} = \frac{1}{\pi} \int_{0}^{\pi} x\cdot \cos nx\cdot dx = \frac{(-1)^{n}-1}{\pi \cdot n^{2}}$

$b_{n} = \frac{1}{\pi} \int_{0}^{\pi} x\cdot \cos nx\cdot dx = \frac{(-1)^{n}}{n}$ (5)

Kind regards

$\chi$ $\sigma$

4. Thankyou chisigma for not getting condescending and helping exactly what I needed.

tonio, why bother replying if you think the way I'm asking for help isn't right, really? I appreciate that you're taking time out of your day to contribute, but I really don't appreciate your tone. The reason I say that I "don't have a clue" is so I don't get replies saying things like "Have you tried [such-and-such a method]?" because this area is by no means my speciality, so I most likely haven't or don't know what you're actually talking about.

I asked in the class and got a sub-standard explanation which didn't help much, AND I checked my notes and couldn't find how to do it in there (you really shouldn't be presuming that I haven't hcked my notes just 'cause I'm asking on here btw) so I turned to this site for help. If you can't or don't want to help, then don't.

5. Originally Posted by chella182
Thankyou chisigma for not getting condescending and helping exactly what I needed.

It seems you needed someone to do ALL your work for you, and you got that. Huge thanx are due here, indeed.

tonio, why bother replying if you think the way I'm asking for help isn't right, really? I appreciate that you're taking time out of your day to contribute, but I really don't appreciate your tone. The reason I say that I "don't have a clue" is so I don't get replies saying things like "Have you tried [such-and-such a method]?" because this area is by no means my speciality, so I most likely haven't or don't know what you're actually talking about.

I asked in the class and got a sub-standard explanation which didn't help much, AND I checked my notes and couldn't find how to do it in there (you really shouldn't be presuming that I haven't hcked my notes just 'cause I'm asking on here btw)

I didn't. I presumed that because you wrote "I've no idea".

so I turned to this site for help. If you can't or don't want to help, then don't.

Thanx for the advice. From now on I won't ever try, but don't worry too much: as you can see, there may always be someone ready to do your whole work for you, eventhough what you asked is explained in all kinds of ways in thousands of internet sites. Of course, there are also thousands of books...

Tonio

6. The post opened by chella 182 is very 'suggestive' because it contains a little 'enigma'...

It has been demontrated that the function...

$f(x)=\left\{\begin{array}{ll}x ,\,\,0 < x < \pi\\{}\\0 ,\,\, -\pi < x<0\end{array}\right.$ (1)

... can be expanded in Fourier series as...

$f(x)= \frac{\pi}{2} + \sum_{n=1}^{\infty} \frac{(-1)^{n} -1}{\pi\cdot n^{2}}\cdot \cos nx + \sum_{n=1}^{\infty} \frac{(-1)^{n}}{n}\cdot \sin nx$ (2)

All right!... now let's consider the derivative of (1)...

$f^{'}(x)=\left\{\begin{array}{ll} 1 ,\,\,0 < x <\pi\\{}\\0 ,\,\, -\pi< x<0\end{array}\right.$ (3)

... and proceed to compute its Fourier coefficients...

$a_{0} = \frac{1}{\pi} \int_{0}^{\pi} dx = 1$

$a_{n} = \frac{1}{\pi} \int_{0}^{\pi} \cos nx\cdot dx = 0$

$b_{n} = \frac{1}{\pi} \int_{0}^{\pi} \sin nx\cdot dx = \frac{1- (-1)^{n}}{\pi\cdot n}$ (4)

... so that is...

$f^{'} (x) = \frac{1}{2} + \sum_{n=1}^{\infty} \frac{1 -(-1)^{n} }{\pi\cdot n}\cdot \sin nx$ (5)

The problem does arrive now: deriving $f^{'} (x)$ in 'formal way' from (2) we obtain...

$f^{'} (x) = \sum_{n=1}^{\infty} \frac{1 -(-1)^{n} }{\pi\cdot n}\cdot \sin nx + \sum_{n=1}^{\infty} (-1)^{n}\cdot \cos nx$ (6)

Because (5) and (6) seem 'a little conflictual' we are in front of two possibilities...

a) it has been some error from me [probably it is!...]

b) it holds the 'identity' $\sum_{n=1}^{\infty} (-1)^{n}\cdot \cos nx= \frac{1}{2}$ [probably it isn't!...]

Kind regards

$\chi$ $\sigma$