Fourier series of $sgn(\cos(x))$

fourier series

Knowing formulas for Fourier series when I'm given interval $(0,2l)$ & $(-l,l)$ I can't seem to find Fourier series of $sgn(\cos(x))$. I know that $a_n = \frac{2}{l} \int_0^{l}f(x)\cos(\frac{n\pi x}{l})dx$, $b_n$ same but with $\sin$. If I'm given interval $(0,2l)$ then $a_n = \frac{1}{l} \int_{\lambda}^{\lambda + 2l}f(x)\cos(\frac{n\pi x}{l})dx$, $b_n$ same where we usually put $\lambda = 0$.

My question is if I have that my function $sgn(cos(x))$ is:

$\begin{cases}
1&\text{if}\, x \in [\frac{\pi}{2},\frac{3\pi}{2}]\\
-1&\text{if}\, x \in [\frac{-\pi}{2},\frac{\pi}{2}]\\
\end{cases}
$

What interval I should use for my Fourier series and this is the part where my understanding of this fails. Any help would be appreciated.

Best Answer

since your function is $2\pi$ periodic you only need any intervall of the length $2\pi$. As the following shows: Let $a\in\mathbb R$ then we can write $a=2\pi k+r$ with $r\in[0,2\pi)$ and $k\in \mathbb Z$.

$$\pi a_n=\int_a^{a+2\pi}f(x)\text{cos}(nx)dx=\int_{2\pi k+r}^{2\pi(k+1)+r}f(x)\text{cos}(nx)dx=\int_r^{2\pi +r}f(x+2\pi k)\text{cos}(nx+2\pi nk)dx$$ Where the last step is just an easy substitution. Now we use that $f$ is $2\pi$ periodic, so we get: $$\pi a_n=\int_r^{2\pi +r}f(x)\text{cos}(nx) dx=\int_r^{2\pi}f(x)\text{cos}(nx)dx+\int_{2\pi}^{2\pi+r}f(x)\text{cos}(nx)dx$$ Now we use again the periodicity on the right hand term: $$\int_{2\pi}^{2\pi+r}f(x)\text{cos}(nx)dx=\int_{0}^{r}f(x+2\pi)\text{cos}(nx+2\pi n)dx=\int_{0}^{r}f(x)\text{cos}(nx)dx$$ Combined it follows: $$\pi a_n=\int_a^{a+2\pi}f(x)\text{cos}(nx)dx=\int_0^{2\pi}f(x)\text{cos}(nx)dx$$

As you can see, the acutal interval ist not that important, you only need an interval of leingh $2\pi$.

Related Question