# Advanced Calculus – (Real Analysis) function f

Def. The statement that $f$ is continuous means that $f$ is continuous at each point in its domain.

Def. if $D$ is a subset of $\mathbb{R}$ and $f$ is real valued function with domain $D$ then the statement that $f$ is continuous at each point $p$ in $D$ means if $(a,b)$ contains $f(p)$, then there is a $(c,d)$ containing $p$ such that $f(x)$ is in $(a,b)$ for each $x$ in $D\cap(c,d)$

The question is: There is a function $f$, defined over $[0,1]$ such that $f$ is continuous on the irrational numbers and discontinuous on the rational

work i have done let $f$ be defined as $f(x)=0$ for $x$ irrational for $x$ rational, $x=\tfrac pq$, with $\gcd(p,q)=1$ define $f(x)=1/q$.

I don't know where to go or if this is right. I thought about using Thomae function and modding it but it is not on the definitions sheet, the only defs I found where the one above for f as a continuous function and the one for domain.

$f$ is discontinuous at rational arguments: You know, that for any $x\in\mathbb Q$ there is a sequence $x_n\in\mathbb R\setminus\mathbb Q$ with $\lim_{n\rightarrow\infty} x_n = x$. Use this sequence to show, that $f$ cannot be continuous at $x$.
$f$ is continuous at irrational arguments: Take any $x\in\mathbb R\setminus\mathbb Q$. Here you have to prove, that for any sequence $x_n\in \mathbb R$ with $\lim_{n\rightarrow\infty} x_n = x$ you have $\lim_{n\rightarrow\infty} f(x_n) = f(x) (=0)$. The crucial part is to show, that if $x_n$ has any subsequence $y_n=\tfrac{p_n}{q_n}$ consisting only of rational numbers, one has $\lim_{n\rightarrow\infty} q_n = \infty$.