# Dirichlet’s function

*Dirichlet’s function* $f:\mathbb{R}\to \mathbb{R}$ is defined as

$$f\left(x\right)=\{\begin{array}{cc}\frac{1}{q}\hfill & \text{if}x=\frac{p}{q}\text{is a rational number in lowest terms,}\hfill \\ 0\hfill & \text{if}x\text{is an irrational number.}\hfill \end{array}$$ |

This function has the property that it is continuous at every
irrational number and discontinuous^{} at every rational one.

Another function that often goes by the same name is the function

$$f\left(x\right)=\{\begin{array}{cc}1\hfill & \text{if}x\text{is an rational number.}\hfill \\ 0\hfill & \text{if}x\text{is an irrational number.}\hfill \end{array}$$ |

This nowhere-continuous function has the surprising expression

$f(x)=\underset{m\to \mathrm{\infty}}{lim}\underset{n\to \mathrm{\infty}}{lim}{\mathrm{cos}}^{2n}(m!\pi x).$ |

This is often given as the (amazing!) example of a sequence of everywhere-continuous functions whose limit function is nowhere continuous.

Title | Dirichlet’s function |
---|---|

Canonical name | DirichletsFunction |

Date of creation | 2013-03-22 13:11:14 |

Last modified on | 2013-03-22 13:11:14 |

Owner | mathcam (2727) |

Last modified by | mathcam (2727) |

Numerical id | 9 |

Author | mathcam (2727) |

Entry type | Definition |

Classification | msc 26A15 |

Related topic | FunctionContinuousAtOnlyOnePoint |

Related topic | APathologicalFunctionOfRiemann |