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.

How to show that:

$$f(x)= \lim_{k \to \infty} \Bigl(\lim_{j \to \infty} \cos^{2j}(k!\cdot \pi \cdot x)\Bigl)$$

is the Dirichlet's function.

share|improve this question
There should be a "k" inside the limit –  Prometheus Jan 4 '11 at 13:46
@prometheus: Yes there is thanks for the correction. –  anonymous Jan 4 '11 at 13:52

2 Answers 2

up vote 2 down vote accepted

Suppose $x = \frac {p}{q} \in \mathbb{Q}$. If $k>q$ then $k! \cdot x \in \mathbb {Z}$ so $ \cos(k!\cdot \pi \cdot x) = \pm 1$ $$ k>q,\; \; \lim_{j \to \infty} \cos(k!\cdot \pi \cdot x)^{2j} = \lim_{j \to \infty} (\pm 1)^{2j} = 1$$

so taking the limit of $k \rightarrow \infty$ you get also 1.

If $x \notin \mathbb{Q}$ then for every k we have $k! \cdot x \notin \mathbb {Z}$ so $ |\cos(k!\cdot \pi \cdot x)| < 1$ therefore

$$ \lim_{k \to \infty} \lim_{j \to \infty} \cos(k!\cdot \pi \cdot x)^{2j} = \lim_{k \to \infty} 0 = 0 $$

share|improve this answer

If x is rational, once k gets large enough the cosine is 1 independent of j. If x is irrational, the cosine is less than one so the j limit will be zero. This is true for all k.

share|improve this answer

Your Answer


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