# finding the function

Define a function $f\colon\mathbb{R}\to\mathbb{R}$ which is continuous and satisfies
$$f(xy)=f(x)f(y)-f(x+y)+1$$ for all $x,y\in\mathbb Q$. With a supp condition $f(1)=2$. (I didn't notice that.)

How to show that $f(x)=x+1$ for all $x$ that belong to $\mathbb{R}$?i got the ans from Paul that it is ture for all rationals x but i still cannot show that for $x,y\in\mathbb R$ is correct.

-
You probably want $f$ to be continuous. Am I right? (Or at least a way to force the real values of $f$ given the rational ones...) –  Giovanni De Gaetano Jan 4 '12 at 12:28
A duplicate of this question for $\mathbb{Q}$ by the same user math.stackexchange.com/questions/96316/… –  NikBels Jan 4 '12 at 12:29
In this new question he asks to prove for real values what he "proved" for rational values in the other question. –  Giovanni De Gaetano Jan 4 '12 at 12:31
You know that the function is continuous. Using the fact that for $x\in\mathbb R$ there is a sequence of rational numbers such that $x_n\to x$ you get $f(x_n)=x_n+1 \to f(x)$. See also this question. –  Martin Sleziak Jan 4 '12 at 12:38

I assume that $f(x)$ is continuous.

Any function of the form

$f(x)=\begin{cases} x+1 &\mbox{if } x \epsilon \mathbb{Q} \\ \not=x+1 & \mbox{if } x\not\epsilon \mathbb{Q} \end{cases}$ is discontinous.

It is already proved that $f(x)=x+1$ for $x \epsilon \mathbb{Q}$.

Therefore, $f(x)=x+1$ for $\forall x \epsilon \mathbb{R}$.