Let $f$ be a differentiable function in $\mathbb{R}$ such that $f'(x) = \alpha f(x)$ for all $x \in \mathbb{R}$, where $\alpha$ is a constant. Prove that $f(x) = f(0)e^{\alpha x}$ for all $x \in \mathbb{R}$.
My attempt:
Consider the map $g:\mathbb{R} \to \mathbb{R}$ defined by $g(x) = f(x)e^{-\alpha x}$. Then $g$ is differentiable and for all $x \in \mathbb{R}$, we have
$$g'(x) = f'(x)e^{-\alpha x} - \alpha f(x) e^{-\alpha x} = \alpha f(x)e^{-\alpha x}-\alpha f(x) e^{-\alpha x} = 0.$$
Therefore, $g$ is constant, so there exists some $c \in \mathbb{R}$ such that $g(x) = c$ for all $x \in \mathbb{R}$. This means that
$$c = g(0) = f(0)e^{-\alpha 0} = f(0)$$
So for every $x \in \mathbb{R}$ we have
$$f(x) = ce^{\alpha x} = f(0) e^{\alpha x}.$$
I think this completes the proof. Is this correct?