Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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|cite|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
up vote 3 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|cite|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|cite|improve this answer

Your Answer


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