Finding the fourier series of floor function

3.1k Views Asked by At

Find the fourier series for $f(x)=\cases{x-[x]\quad x\in\mathbb{R\setminus Z} \\ \frac 1 2\quad x\in\mathbb{Z}}$ on $[-\pi,\pi]$ and its values for $x=1.5,3,5$.

In order to find the series I need to find fourier coefficients but that's not clear to me how to inetegrate $\int_{-\pi}^\pi f(x)\cos(nx)dx$. I thought dividing it to $$\int_{x\in\mathbb Z} \frac 1 2dx+\underbrace{\int_{z\notin\mathbb Z}(x-[x])\cos(nx)dx}_{=2\pi\int_0^1(x-[x])\cos(nx)dx}$$but then I can't deal with the last integral (first is integration on set of measure zero so it equals 0). Furthermomre, suppose I found the series, since this function is continuous at almost every point can I say that substituting the x values is sufficient (i.e the series is uniformally convergent to the function on the interval)?

3

There are 3 best solutions below

6
On BEST ANSWER

One have to cut the integrals in a sum of segments where the floor function is constant on each :

enter image description here

The result has been checked with several numerical tests.

Other examples corresponding to the particular values requested in the wording of the question :

enter image description here

There is a typing mistake in the table above. Please, replace $4$ by $5$. Sorry, I didn't succeed to correct it because I cannot replace the page by a corrected page (bug each time).

enter image description here

2
On

Firstly, being discontinuous, the series can't be uniformly convergent. Secondly, you need to be sure which definition of the floor function you are using. For one definition, floor is odd, and therefore the value of the integral is zero. For the other you get

$\newcommand{\dx}{\,\mathbb d x}$ $$\int_{-\pi}^{\pi} \left \lfloor x \right \rfloor \cos x \dx =\int_{-\pi}^{-3} -4\cos x \dx + \int_{-3}^{-2} -3\cos x \dx + \int_{-2}^{-1} -2\cos x \dx + \int_{-1}^{0} -1\cos x \dx + \int_{1}^{2} \cos x \dx + \int_{2}^{3} 2\cos x \dx + \int_{3}^{\pi} 3\cos x \dx$$

1
On

Inspecting the graph of $f$ one immediately remarks that $f(x)=-{1\over2}+{\rm odd}(x)$, so that apart from the constant term we only have sine coefficients $$b_k={2\over\pi}\int_0^\pi \bigl(\lfloor x\rfloor+{1\over2}\bigr)\ dx\qquad(k\geq1)\ .$$ For the computation of the $b_k$ see JJacquelin's answer.

It remains to answer the additional questions. When a function $f$ is periodic and smooth apart from finitely many jump discontinuities per period then its Fourier series $s(x)$ converges to $f(x)$ at all points of continuity and to ${1\over2}\bigl(f(\xi-)+f(\xi+)\bigr)$ at the jump points $\xi$. It follows that $$s(1.5)=f(1.5)=1, \quad s(3)={1\over2}\bigl(f(3-)+f(3+)\bigr)=2.5$$ and $$ s(5)=s(5-2\pi)=s(-1.28\ldots)=f(-1.28\ldots)=-2\ .$$