Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

And how to express $\{ x \} = x - \lfloor x \rfloor$ as function of $sin(x)$ and $sign(x)$?

share|improve this question
The infinitely many jump discontinuities in the floor function preclude the possibility of a Taylor series for it. –  J. M. Dec 20 '10 at 9:02
As for the second one: $\frac12-\frac1{\pi}\arctan(\cot(\pi x))$ –  J. M. Dec 20 '10 at 9:09
This might also interest you. –  J. M. Dec 20 '10 at 10:07

1 Answer 1

up vote 9 down vote accepted

To express ⌊x⌋ in terms of Fourier series for $x \in \mathbb{R}/\mathbb{Z}$, let f(x) = x - ⌊x⌋, then the Fourier series for f(x) is quite straightforward, and so we start by showing that f(x) is indeed periodic:

For any integer $n \in \mathbb{Z}$.

f(x) = x - ⌊x⌋ = x + n - n - ⌊x⌋

= x + n - ⌊x + n⌋ = f(x+n) = f(x + n*1)

Hence f(x) is periodic with fundamental period $T_0 = 1$, so $\omega_0 = \frac{2\pi}{T_0} = 2\pi$, and f(x)=x at $0 \leq x < 1$.

A plot of f(x)

The periodic function f(x) can be expressed by the Trigonometric Fourier series,

$f(x) = a_0 + \sum_{m=1}^{\infty} (a_{m}\cos(m\omega_0 x) + b_{m}\sin(m\omega_0 x))$

$ = a_0 + \sum_{m=1}^{\infty} (a_{m}\cos(2\pi mx) + b_{m}\sin(2\pi m x))$

where the coefficients are calculated as follows

$a_0 = \frac{1}{T_0}\int_{<T_0>}f(x)dx = \int_{0}^{1}x dx = \frac{1}{2}$

$a_m = \frac{2}{T_0}\int_{<T_0>}f(x)\cos(m 2\pi x)dx = 0$

$b_m = \frac{2}{T_0}\int_{<T_0>}f(x)\sin(m 2\pi x)dx = -\frac{1}{\pi m}$

Hint. Use integration by parts...

Plot of $f(x) = a_0 + \sum_{m=1}^{10} b_m\sin(2\pi m x)$, (summation from m=1 to 10).

alt text

Now that we obtained the Fourier series representation of f(x) = x - ⌊x⌋

Then ⌊x⌋ $ = x - f(x) = x - 0.5 + \frac{1}{\pi}\sum_{m=1}^{\infty} \frac{\sin(2\pi m x)}{m}$.

A plot of ⌊x⌋, where summation from m=1 to m=10

alt text

Note this is only valid for $x \in \mathbb{R}/\mathbb{Z}$. Because although ⌊x⌋ is continuous on $\mathbb{R}/\mathbb{Z}$. It has a jump of one unit at each integer.

⌊x⌋ consists of an infinite number of steps, and also can be represented as a summation of shifted unit step functions u(x).

⌊x⌋ $ = \sum_{m=1}^{\infty}(u(x-m)-u(-x-m+1))$

Note that u(x) = Sign(x)/2 + 0.5

share|improve this answer
+1. Nice and pretty. –  Yonatan N Dec 20 '10 at 16:25
@Yonatan N: Thank you :) –  Weaam Dec 20 '10 at 16:40
@Weann: You should use \sin and \cos (instead of just sin and cos) inside math formulas so that they are typeset correctly. –  Arturo Magidin Dec 20 '10 at 18:41
@Arturo Magidin: Fixed. Thank you. –  Weaam Dec 20 '10 at 18:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.