Hello! This is my first post on these forums. So I was stuck with this question in my Mathematical Analysis exam, and it is as follows: ƒ(x) = 0 if x ∉ ℚ and (p + π) / (q + π) - (p / q) if x = (p / q) ∈ ℚ (reduced form). 1- Prove ƒ is discontinuous at all rational numbers except 1: This is easy. Suppose a ∈ ℚ not equal to 1 and for all sequences Xn ∉ ℚ, Xn → a, with ƒ(Xn) → ƒ(a) (that it's continuous at a). Now ƒ(Xn) → 0, because Xn is an irrational sequence. Since a is rational, ƒ(a) = (p + π) / (q + π) - (p / q), after unifying, we get ƒ(a) = (π(q - p)) / (q2 + π × q). since a is not 1, p can never be equal to q, and thus, ƒ(a) is not equal to 0, a contradiction. 2- ƒ is continuous at every irrational number. Here comes your part. Using the same method (Sequence Characterization method), we can prove for Xn ∉ ℚ. As for Xn = Pn / Qn ∈ ℚ, suppose Xn → a ∉ ℚ, we want to show ((Pn + π) / (Qn + π)) - (Pn / Qn) → 0, same as ƒ(a), to prove the continuity in all cases. Using algebra, I couldn't find anything to wrap things around. Any ideas?