Solution of Exponential Cauchy Equation $ f ( x + y ) = f ( x ) f ( y ) $ I was reading Functional Equations and I came across the following theorem regarding the solution of the exponential Cauchy functional equation:
$$ f ( x + y ) = f ( x ) f ( y ) \text . $$

Let $ f : D \to \mathbb R $ be a solution of the exponential Cauchy equation, where $ D = \mathbb R $ or $ D = ( 0 , + \infty ) $. Then either $ f \equiv 0 $ or $ f ( x ) = 10 ^ { g ( x ) } $, where $ g : D \to \mathbb R $ is an additive function.

Please help me by providing a pedantic proof to the very theorem as I am unable to find it online.
 A: Let $ D \in \{ \mathbb R , ( 0 , + \infty ) \} $ and $ f : D \to \mathbb R $ be such that
$$ f ( x + y ) = f ( x ) f ( y ) \tag 0 \label 0 $$
forall $ x , y \in D $. Substituting $ \frac x 2 $ for both $ x $ and $ y $ in \eqref{0} we get $ f ( x ) = f \left( \frac x 2 \right) ^ 2 \ge 0 $ and thus
$$ \operatorname {ran} f \subseteq [ 0 , + \infty ) \text . \tag 1 \label 1 $$
Case $ D = \mathbb R $:
We can put $ x = y = 0 $ in \eqref{0} and find out that $ f ( 0 ) \in \{ 0 , 1 \} $. If $ f ( 0 ) = 0 $, setting $ y = 0 $ in \eqref{0} shows that $ f $ is constantly zero. If $ f ( 0 ) = 1 $, substituting $ - x $ for $ y $ in \eqref{0} we get $ f ( x ) f ( - x ) = 1 $, which in particular shows that $ f ( x ) \ne 0 $, and thus by \eqref{1}, $ f ( x ) > 0 $. This lets us define $ g : \mathbb R \to \mathbb R $ by $ g ( x ) = \log _ { 10 } f ( x ) $, and taking base $ 10 $ logarithm from both sides of \eqref{0}, we find out that $ g $ is additive. Thus we found an additive function $ g : D \to \mathbb R $ such that $ f ( x ) = 10 ^ { g ( x ) } $ for all $ x \in D $.
Case $ D = ( 0 , + \infty ) $:
If there is $ a \in D $ such that $ f ( a ) = 0 $, letting $ y = a $ in \eqref{0}, we get $ f ( x + a ) = 0 $ for all $ x \in D $. For every $ x > a $, $ x - a \in D $ and thus we can substitue $ x - a $ for $ x $ in the last equation, which gives $ f ( x ) = 0 $ for all $ x > a $. We can also use induction to derive $ f ( n x ) = f ( x ) ^ n $ for all $ x \in D $ and all positive integers $ n $, from \eqref{0}. Choosing $ n $ so that $ n x > a $, we can conclude that $ f $ is constantly zero. So assume that there is no $ a \in D $ with $ f ( a ) = 0 $. By \eqref{1}, we find out that $ \operatorname {ran} f \subseteq ( 0 , + \infty ) $, and we can conclude that there is an additive function $ g : D \to \mathbb R $ such that $ f ( x ) = 10 ^ { g ( x ) } $ for all $ x \in D $, similar to before.
