How can I prove that there exist a continuous function $f:\mathbb R\to \mathbb R$ s.t. $f(x+y)=f(x)f(y)$ and $f(1)=a$. Prove that there is a unique continuous function s.t. $$(S):\begin{cases}f(x+y)=f(x)f(y)\\ f(1)=a>0\end{cases}.$$
Information : We denote $x\mapsto a^x$ the solution of $(S)$.
Attempts
For unicity, if $f$ and $g$ are two solutions, then $$g(p/q)=g(1)^{p/q}=a^{p/q}=f(p/q).$$
Then, I know that if $f(x)=g(x)$ for all $x\in \mathbb Q$ and $f,g$ continuous, then $f=g$ on $\mathbb R$. But how can I do for existence ? I know it exist since $f(x)=a^x$ is a solution... but I think, I do the work in reverse.
 A: You make things backward. You can't say that a solution exist because $x\mapsto a^x$ is a solution. First you have to prove that a solution exist, and then, you define such solution by $x\mapsto a^x$ (because at this point, it's not clear what $a^x$ means).

Hint
Here $\mathbb N:=\{1,2,3,...\}$. Let $a\geq 1$.

Lemma 1:
1) For all $n\in\mathbb N$.There is a unique positive solution to the equation $x^n-a=0$. We denote $a^{1/n}$ such solution.
2) For all $m\in\mathbb N$, the following relation holds $$\frac{1}{a^{1/m}}=\left(\frac{1}{a}\right)^{1/m}.$$

Proof: Left to the reader. $\Box$
We wish to find a continuous function $f$ s.t. $$\begin{cases}\tag{S}
f(x+y)=f(x)f(y)\\
f(1)=a>0
\end{cases}
$$
One can prove very easily that if such a function $f$ exist, then $$f(0)=1,\quad f(1)=a,\quad f(-k)=\frac{1}{a^k}\ \text{if $k\in\mathbb N$},\quad \text{and}\quad f(k/m)=\begin{cases}a^{k/m}&k>0\\ 
\frac{1}{a^{k/m}}&k<0\end{cases}.$$
So, define the function $f$ as follow :

*

*$f(0)=1$ and $f(1)=a$.


*On $\mathbb N$, define $f(n)=a^n$.


*You prolonge it on $\mathbb Z$ by $f(-k)=\frac{1}{a^k}$ for $k\in\mathbb N$.


*You prolonge it on $\mathbb Q$ by $f(k/m)=\begin{cases}a^{k/m}&k>0\\ \frac{1}{a^{k/m}}&k<0\end{cases}.$


*Finally, you prolonge it on $\mathbb R$ by $$f(r)=\sup\{f(p)\mid p\leq r,p\in\mathbb Q\}.$$

Theorem 1: The function $f$ constructed previously is continuous and satisfies $(S)$.

Proof: Left to the reader.$\Box$

If $a\in (0,1)$, then take $$f(r)=\inf\{f(p)\mid p\leq r,p\in\mathbb Q\},$$ when you prolonge it over $\mathbb R$.
A: Proof sketch:

*

*Let $a:\mathbb Q\rightarrow \mathbb Q$ be a function that satisfies $a(x + y) = a(x) + a(y)$. Show that $a(x) = c x$ for some constant $c$.

*Use the above to show that if $b:\mathbb R \rightarrow \mathbb R$ is continuous and satisfies $b(x + y) = b(x) + b(y)$, then $b(x) = cx$ for some constant $c$

*Apply this to $\ln f(x)$
Note that if you're allowed to assume that any continuous $b$ that satisfies $b(x+y) = b(x) + b(y)$ is linear, you can just skip to the last step.
A: Step 1. $f(x)>0$, for all $x\in\mathbb R$.
Indeed, $f(x)=f(x/2)f(x/2)=\big(f(x/2)\big)^2\ge 0$. If $f(x)=0$, then $a=f(1)=f(x)f(1-x)=0$. Contradiction.
Step 2. Set $g(x)=\ln f(x)$. Then $g(x+y)=g(x)+g(y)$ and $g(1)=\ln a$.
a. Clearly $g(nx)=ng(x)$. (Inductively.)
b. Hence $g(x)=g(nx/n)=ng(x/n)$ and thus $g(x/n)=g(x)/n$.
c. Combining a. & b. we  obtain $g(mx/n)=(m/n)g(x)$, for all $m,n\in\mathbb N$.
d. Also, $g(x)=g(x+0)=g(x)+g(0)$ and hence $g(0)=0$. Thus
$$
0=g(0)=g(x-x)=g(x)+g(-x)
$$
and thus $g(-x)=-g(x)$.
e. Combining c. and d. we obtain $g(qx)=qg(x)$, for all $q\in\mathbb R$.
f. In $x\in\mathbb R$, then there exist a sequence $q_n\to x$, with $\{q_n\}\subset\mathbb R$. As $g$ is continuous,
$$
g(x)=\lim g(q_n)=\lim q_ng(1)=xg(1)=(\ln a) x
$$
h. Finally
$$
f(x)=\exp\big(g(x)\big)=\exp\big((\ln a)x\big)=a^x.
$$
A: Other answers are good. Just wanna try a shorter proof.
Firstly, if such a function exists, we already know it's value for any fraction of positive integers $p/q\in\mathbb{Q}$ since $f(p/q)^q=f(p)=f(1)^p$ implying $f(p/q)=a^{p/q}$.
We also know $f(0)=1$ since $a=f(1)=f(1+0)=a\cdot f(0).$
And lastly, we can use the same trick as above for negative fractions $-p/q\in\mathbb{Q}$ if we just note that $f(-1)=a^{-1}$ since $1=f(0)=f(1+(-1))=a\cdot f(-1)$. This tells us $f(-p/q)=a^{-p/q}$ for positive integers $p$ and $q$.
So all in all, if such a function exists, then $f(x)=a^x$ over the rationals $\mathbb{Q}$. And continuousness means $f(x)$ would also have to equal $a^x$ over the reals $\mathbb{R}$ since the rationals are dense in the reals.
And isn't $f(x)=a^x$ itself an example of a solution and therefore proof of its existance? Or am I missing something?
