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

I am having some difficulty with this proof for my Real Variables class.

I know that $f(x)$ is a continuous function defined on $R^1$, and $f(x)=x^2$ for any rational $x$. I also have the definition of $e$ to work with, where $$e=\sum \frac1{j!}$$ that I believe can be used in the proof.

I need to prove that $f(x)=x^2$ for irrational $x$ as well. I know I need to use some sort of contradiction as well. This is what I have so far:

We know that $f$ is continuous, so it is continuous for irrational numbers. So for every $\varepsilon >0$, there exists a $\delta>0$ such that $$|x^2-f(p)|<\varepsilon$$ for all points where $$|x-p|<\delta$$ (I used the distance formula for the real numbers, because that is what $f(x)$ is defined on).

Now I assume that $f(x)\ne x^2$ for an irrational $x$. If this is true, it also holds for $e$.

How do I proceed from here? I can't just say $$x^2 - (NOT p^2)<\varepsilon$$, can I? That seems much too vague to me. The follow-up questions for this problem involve series, if that affects any of the answers.

Thank you for any assistance or hints!

share|cite|improve this question
up vote 2 down vote accepted

I think the cleanest way to use the following two facts:

1) A function $f: \mathbb{R} \rightarrow \mathbb{R}$ is continuous $\iff$ for all convergent sequences $x_n \rightarrow L$, $f(x_n) \rightarrow f(L)$.

(In the event that you haven't seen this before, a proof can be found in $\S 10.3$ of these notes.)

2) For every real number $L$, there is a sequence of rational numbers $\{x_n\}$ such that $x_n \rightarrow L$.

to deduce:

3) If $f,g: \mathbb{R} \rightarrow \mathbb{R}$ are both continuous functions such that $f(x) = g(x)$ for all $x \in \mathbb{Q}$, then $f = g$.

share|cite|improve this answer
About the third fact: So can I say that because $f$ is continuous, there exists a sequence $x_n -> e$ and therefore $x_n^2 -> e^2$? It feels like there is something missing, and I think it is because I don't quite understand it. – JohnDvorak Feb 20 '13 at 23:07
@Sylar: If by $e$ you mean the irrational number that is approximately $2.71828...$ then I don't understand what it has to do with the rest of your question. Rather you should take an arbitrary irrational number $L$, $g: \mathbb{R} \rightarrow \mathbb{R}$ by $g(x) = x^2$, and try to use the above facts to show that $f(L) = L^2$. – Pete L. Clark Feb 20 '13 at 23:11
Okay, I think I'm beginning to get it. I let L be an arbitrary irrational number, and from 2) I know that there is a convergent sequence of rationals approaching it, and then use 1) to show that because f is continuous, $f(x_n)$ approaches $f(L)$, so $x_n^2$ approaches $L^2$. After that, I need to use 3) to show that the function $f(x)$ I used in 1) is the same function. Where did you get 3) from? I've never heard anything like it. – JohnDvorak Feb 20 '13 at 23:15
@Sylar: 3) is just the general form of what this argument establishes: you don't need to prove it first. What you have at the moment is $x_n \rightarrow L$ and $x_n^2 = f(x_n) \rightarrow f(L)$. But now, since the function $g(x) = x^2$ is continuous, you can say what $x_n^2$ converges to, and that tells you what $f(L)$ is. – Pete L. Clark Feb 20 '13 at 23:23
By the way, I believe you that you've never heard of 3), and if you're a relative beginner in this area there's nothing wrong with that, but I promise you it's an entirely standard result. It is often phrased more generally, in terms of "dense subsets" of $\mathbb{R}$ (or a topological space...). – Pete L. Clark Feb 20 '13 at 23:25

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.