Let $f:\mathbb{R}\to \mathbb{R}$ is a function such that for all real $x$ and $y$, $f(x+y)= f(x) + f(y)$ and $f(xy)= f(x)f(y)$, then prove that $f$ must be one of the two following functions:
- $f:\mathbb{R}\to \mathbb{R}$ defined by $f(x)=0$ for all real $x$
OR
- $f:\mathbb{R}\to\mathbb{R}$ defined by $f(x)=x$ for all real $x$
I got to the point where putting the two equations together, you get $f(x+y)f(x)= f(xy) + f(x)^2$ and plugging in $f(x)=x$ checks with it. So am I going in the right direction or am I just doing some guess work? Is there a more elegant way of doing it?
Thanks
Easier way from the first identity: $$ f(x) = f(x+0) = f(x) + f(0) $$ so $f(0) = 0$ and similarly $$ f(x) = f(x \cdot 1) = f(x) f(1) $$ so $f(x) = 0$ or $f(1) = 1$.
In the first choice, you are done. Suffices to prove that if $f(1)=1$ then $f(x) = x$. Can you take it from here?
EDIT Another hint: Note that if $f(1)=1$, $$ f(n) = f(1 + 1 \ldots + 1) = n f(1) = n $$ for all integer $n$...
EDIT 2 Another hint... to do rational numbers, $$f(1) = f(1/n) + f(1/n) + \ldots + f(1/n) = n f(1/n),$$ so $f(1/n) = f(1)/n = 1/n$ and similarly $f(a/b) = a/b$.
You can use a similar technique to show $f(\sqrt[b]{a}) = \sqrt[b]{f(a)}$.
There must be a more direct way to prove $f(ax) = af(x)$ for all real $a$...