TITLE: Find all continuous functions (did I do this correctly?)
QUESTION [5 upvotes]: Find all the continuous functions $f:\mathbb{R}\to\mathbb{R}$ satisfying:
$f(x+y)=f(x)+f(y)+f(x)f(y)$ for all $x,y\in\mathbb{R}$

Solution attempt:
$$\begin{align*}
f(x+y) + 1 &= f(x) + f(y) + f(x)f(y) + 1\\
f(x+y) + 1 &= (f(x) + 1)(f(y) + 1)
\end{align*}$$
$g(x) = f(x) + 1$, and $g(y) = f(y) + 1$
$$\begin{align*}
g(x+y) &= g(x)g(y)\\
(x,y) &= (x,x)\\
g(2x) &= g^2(x)\\
g(x) &= g^2(x/2)\\
g(x) &= c^x,\;\text{ where }c = e^a
\end{align*}$$
So $f(x) = c^x - 1$ for all x

REPLY [3 votes]: Your result is correct, however, there is a gap in proving that $g(x+y)=g(x)g(y)$ implies that $g(x)=c^x$.
First of all, $g(x)=g^2(\frac{x}{2})$ implies that $g(0)=0$ , or $g(0)=1$.

If $g(0)=0$ then $f(0)=-1$ and using the given relationship for $y=0, x\in \mathbb R$, we get:

$$f(x+0)=f(x)+f(0)+f(x)f(0)\Rightarrow f(x)=f(x)-1-f(x)\Rightarrow f(x)=-1,\forall x\in \mathbb R$$

Now, If $g(0)=1$ , we have to follow some steps in order to reach the
desired conclusion:

For $n\in\mathbb N$ it is easy to see that $$g(n)=g(1+\dots+1)=g(1)\times\dots\times g(1)=[g(1)]^n$$
Also note that $$g(1+(-1))=g(1)g(-1)\Rightarrow g(0)=g(1)g(-1)\Rightarrow g(-1)=\dfrac{1}{g(1)}=[g(1)]^{-1}$$
Now for a negative integer $-m$ we have :
$$g(-m)=g(-1\dots-1)=g(-1)\times\dots\times g(-1)=[g(1)]^{-m}$$
Next, prove it for $\dfrac{1}{n},n\in \mathbb N$. You have already proved that $g(2x)=g^2(x).$ If you extend this, you can easily get $g(nx)=g^n(x)$. So for $x=\frac{1}{n}$
$$g^n(\frac{1}{n})=g(1)\Rightarrow g(\frac{1}{n})=[g(1)]^{1/n}$$
Now the big step: Prove it for rationals $\dfrac{m}{n}$
$$g(\frac{m}{n})=g(\frac{1}{n}+\dots+\frac{1}{n})=g(\frac{1}{n})\times\dots\times g(\frac{1}{n})=g(\frac{1}{n})^m=[[g(1)]^{1/n}]^m=[g(1)]^{m/n}$$
Finally, if you take a  $x\in\mathbb R$, then there exists a sequence of rationals $\{q_n\}_{n=1}^\infty$ such that $q_n\xrightarrow{n\rightarrow \infty}x$ and:
$$g(x)=\lim\limits_{n\rightarrow\infty}g(q_n)=\lim\limits_{n\rightarrow\infty}[g(1)]^{q_n}=[g(1)]^x$$
where we used the continuity of $g$ as well as the continuity of the exponential function.


So we reached the desired result : $$g(x)=[g(1)]^x=c^x$$
$$\Rightarrow f(x)=g(x)-1=c^x-1$$
(or $f(x)=-1$ do not forget!)