Given $f : \mathbb{R} \to \mathbb{R}$ differentiable, $f(x + y) = f(x)f(y)$ and $f(0) = 1$, prove $f(x) = e^{cx}$, $c$ constant.
Attempt:
Differentiate $f(x + y) = f(x)f(y)$ with respect to $y$ using the chain rule: $f'(x + y) = f(x)f'(y)$.
Let $y = 0$ to get $f'(x) = f(x)f'(0)$.
Rearrange to get $\frac{f'(x)}{f(x)} = f'(0)$.
Integrate both sides with respect to $x$ to get $\ln f(x) = f'(0)x + c$ where $c$ is the constant of integration.
Take exponentials of both sides to get $f(x) = e^{f'(0)x + c} = e^{f'(0)x}e^{c}$.
Since $f(0) = 1$, we get $f(0) = e^{f'(0) \times 0}e^{c} = e^0e^c = e^c = 1$.
Plugging this back in we get $f(x) = e^{f'(0)x}$ and setting $f'(0) = c$ we get $f(x) = e^{cx}$.
Question
Is this correct? One concern I have is at the integration step where the logarithm of $f(x)$ is taken. Is that legal given that we do not know whether $f(x)$ is strictly positive?
In fact, we can easily show $f(x) > 0$ for all $x$.
$f(x) = f(x/2)^2 \ge 0$
$f(x)f(-x) = f(0) \ne 0$
So $\ln f(x)$ is perfectly well-defined. Everything else looks fine.
(For an extra challenge, show that this is also true if we only assume $f$ is continuous. For a real extra challenge, show that it's not true in general.)