I know this solution but what happens when $ f(x) $ doesn't have derivative Suppose a continuous function $ f \colon \mathbb{R} \rightarrow \mathbb{R} $ is not identically zero and satisfies the condition $$ f(x + y) = f(x)f(y) \ \ (x , y \in \mathbb{R}) $$
Prove that there exists a number $ a \in \mathbb{R} $ such that $ f(x) = a^x \ \ (x \in \mathbb{R})
$.
I wrote this :
Let's discus the case where $ y = 0 $; In this case the function will look like: $$ f(x + 0) = f(x) \cdotp f(0) $$ We see that: $$ f(x) = f(x) \cdotp f(0) \Rightarrow f(0) = 1 $$
Now let's find the derivative of $ f(x) $
$$ f^{'} (x) = \lim_{h \to 0} \frac{f(x + h) - f(x)}{h}   $$ using the initial formula we can change $ f(x + h) \text{ to } f(x) \cdotp f(h) $ $$  f^{'} (x) = \lim_{h \to 0} \frac{f(x) \cdotp f(h) - f(x)}{h}   $$
$$ f^{'} (x) = f(x) \cdotp \lim_{h \to 0} \frac{f(h) - 1}{h} $$
We can use the fact that: $ f^{'} (0) = \lim_{h \to 0} \frac{f(h) - 1}{h} $. It means that:
$$ f^{'} (x) = f(x) \cdotp f^{'} (0) $$
Let's suppose that $ f^{'} (0) = a $. After denoting $ f^{'} (0) \text{ by } a $, we get the following equation:
$$  f^{'} (x) = f(x) \cdotp a $$
Let's discus the derivative of: $$ f^{'} (x)^{\frac{1}{a}} = \frac{1}{a} \cdotp f (x)^{\frac{1}{a} - 1} \cdotp f^{'} (x) $$
If we plug in $  f^{'} (x) = f(x) \cdotp a $ in the main formula we will get this equation:
$$ f^{'} (x)^{\frac{1}{a}} = \frac{1}{a} \cdotp f (x)^{\frac{1}{a} - 1} \cdotp f(x) \cdotp a  $$
$$ f^{'} (x)^{\frac{1}{a}} = f (x)^{\frac{1}{a}} $$
If the derivative of $ f(x)^{\frac{1}{a}} $ equals to it's value, it means that this function is equal to $ e^x $. thus, we get the following equation: $$ a^{\frac{x}{a}} = e^x $$ $$ a^{\frac{1}{a}} = e $$
 A: Here's another idea: suppose $f(1) = a \neq 0$ and $f(x) = a^x g(x)$. Then $g(1) = 1$ and $g(x+y) = g(x)g(y)$. Note that $g$ is continuous and nonnegative, $g(0) = 1$ and $g(x+1) = g(x)$. We'd like to prove that $g \equiv 1$. Suppose that there exists an $r$ with $g(r) > 1$ (the other case is analogous). Then since $g$ is continuous, there is an interval $I$ on which $g > 1$. There thus exists a fraction $\frac{m}{n}$ such that $g(\frac{m}{n}) > 1$ since $\mathbb{Q}$ is dense in $\mathbb{R}$.
But then since $g(\frac{m}{n}) = g(\frac{1}{n})^m$, we have $g(\frac{1}{n}) > 1$ if $m\geq 0$ or $g(\frac{1}{n})\in (0,1)$ if $m<0$. Either way, $g(1) = g(\frac{1}{n})^n \neq 1$, contradiction.
A: It can be proved that $f$ is differentiable using similar methods proving the differentiability of exponential function.
First, because $f$ is continuous, there exists $\delta>0$ such that if $x\in (-\delta,\delta)$, $f(x)>0$ (since $f(0)=1$). Consider the set $S=\mathbb{Q}\cap(0,\delta)$, if there exists $s_1\in S$ and $s_2\in S$ such that $f(s_1)>1$ and $f(s_2)\leq1$. Let $s_1=\frac {m_1}{n_1}$ and $s_2=\frac {m_2}{n_2}$, it is not hard to find $x\in S$ such that $s_1=px$ and $s_2=qx$ for some positive integer $p$ and $q$ (for example, $x=\frac 1{n_1n_2}$). Suppose that $f(x)>1$, then $f(s_1)={f(x)}^p>1$, similarly, $f(s_2)>1$, giving a contradiction. The similarly argument holds when $f(x)=1$ or when $f(x)<1$. Similarly, there does not exist $s_1\in S$ and $s_2\in S$ such that $f(s_1)\ge1$ and $f(s_2)<1$. This shows that the image of $S$ under $f$ either belongs to $(1,\infty)$, $\{1\}$, or $(0,1)$.
Next, consider the set $\mathbb{Q}$. First, notice that if $d\in \mathbb{Q}$, then $d=nx$ for some $x\in \mathbb{Q}\cap (-\delta,\delta)$ and some positive integers $n$. Therefore, $f(d)={f(x)}^n>0$. For any $d_1\in \mathbb{Q}$ and $d_2\in \mathbb{Q}$, WLOG, assuming $d_2>d_1$, it is not hard to find $x\in S$ such that $d_2-d_1=rx$ for some positive integer $r$. Then $f(d_2)=f(d_1)f(rx)=f(d_1){f(x)}^r$. If $f(S)\subset(0,1)$, then $f(d_2)<f(d_1)$ and $f$ strictly monotonically decreases over the set $\mathbb{Q}$, similarly arguments show that $f$ is either strictly monotonic over $\mathbb{Q}$ or equals $1$ for all elements in $\mathbb{Q}$. Note that $\mathbb{Q}$ is dense in $\mathbb{R}$, the continuity of $f$ would then imply $f$ is either strictly monotonic over $\mathbb{R}$ or equals $1$ for all elements in $\mathbb{R}$ and also that $f(x)>0$ for all $x\in \mathbb{R}$.
Finally, the differentiability of $f$ is trivial if $f(x)=1$, so only the case when $f$ is strictly monotonic is considered. Define $g(r)={f(\frac1r)-1\over\frac1r}=rf(\frac1r)-r$ and suppose $f$ increases monotonically. For any $r_1\in\mathbb{Q^+}$ and $r_2\in\mathbb{Q^+}$, let $r_1=\frac {m_1}{n_1}$ and $r_2=\frac {m_2}{n_2}$. WLOG, one may assume $r_2>r_1$. Note that ${f(\frac 1{r_1})}^{m_1n_2}=f(n_1n_2)=f(\frac 1{r_2})^{n_1m_2}$, so let $f(\frac 1{r_1})=1+a$ and $f(\frac 1{r_2})=1+b$ (note also $f(x)>1$ if $x>0$). $r_2>r_1$ means that $n_1m_2>m_1n_2$ and the monotonicity of $f$ means that $a>b$. Now, if $m_1n_2a\leq n_1m_2b$, then $(m_1n_2-i)a\leq (n_1m_2-i)b$ for all positive integer $i$, so $\binom{n}{i}a^i\leq\binom{m}{i}b^i$ for all positive integer $i\leq m_1n_2$, putting all these inequalities into the binomial expansion of ${(1+a)}^{m_1n_2}$ and ${(1+b)}^{n_1m_2}$ would result in ${(1+a)}^{m_1n_2}<{(1+b)}^{n_1m_2}$, which is a contradiction. Hence, $m_1n_2a>n_1m_2b$, $r_1a>r_2b$, and $r_1f(\frac 1{r_1})-r_1>r_2f(\frac 1{r_2})-r_2$, which means $g(r)$ strictly decreases monotonically over $\mathbb{Q^+}$. Notice that $g(r)$ is continuous over $\mathbb{R^+}$ and $\mathbb{Q^+}$ is dense in $\mathbb{R^+}$, this implies that $g(r)$ strictly decreases monotonically over $\mathbb{R^+}$. Notice further that $g(r)>0$ for $r\in\mathbb{R^+}$, the completeness of real number would then imply the limit of $g(r)$ exists as $r\to\infty$. For the final step of the proof, notice that $f(x)f(-x)=f(0)=1$ so $g(-r)=-rf(-\frac 1r)+r={rf(\frac 1r)-r\over f(\frac 1r)}$. Continuity of $f$ would then imply that $\lim_{r\to\infty} f(\frac 1r)=f(0)=1$, giving $\lim_{r\to\infty} g(-r)=\lim_{r\to\infty} g(r)$, this means both $\lim_{h\to0^+} {f(h)-1\over h}$ and $\lim_{h\to0^-} {f(h)-1\over h}$ exist and are equal, showing that $f$ is differentiable at $0$. If $f$ monotonically decreases, define $h(r)=f(-r)$, then $h(x+y)=h(x)h(y)$, $h$ is continuous, and $h$ increases monotonically, and then the differentiability of $h$ would imply the differentiability of $f$.
