Showing a solution to this differential equation is never zero Say I want to find a differentiable function $f: \mathbb{R} \rightarrow \mathbb{R}$ such that for some $k \neq 0$, $f' = kf$. Every time I have seen a book solve this, the expression is rewritten  as $$\frac{1}{f}f' = k$$ and then solved using u-substitution. To be technical though, must one first know that $f$ is never zero? If so, how could I go about showing that $f$ is never zero? I know that $f$ must be infinitely differentiable and if for some $a \in \mathbb{R}$, $f(a) = 0$, then for each $n \in \mathbb{N}_0$, $f^{(n)}(a) = 0$. I think I remember from complex analysis, if $f$ is holomorphic with this property, then $f$ is zero everywhere, but I'm not sure about the usual case of $\mathbb{R} \rightarrow \mathbb{R}$.
 A: More generally, for an ODE of the form $f'=g(f)$, any zero $f^*$ of the function $g$ gives a constant solution $f(x)=f^*$. And if $g$ is nice enough so that one has uniqueness of solutions (say that $g$ satisfies a Lipschitz condition, so that the Picard–Lindelöf theorem applies), then any other solution can never be equal to $f^*$ at any point $x=x_0$, since that would mean that you would have (at least) two solutions to the initial value problem $f'=g(f)$, $f(x_0)=f^*$.
So when using separation of variables, you should always first note “by hand” the constant solutions $f(x)=f^*$, and only then proceed to find all the other solutions (which are never equal to any $f^*$, so that it's safe to divide by $g(f)$) from $\int \frac{df}{g(f)}= \int dx$.
A: In addition to the many useful answers I may add this localization trick. Suppose $f(x_0)\neq 0$ at a particular $x_0$. By continuity of $f$ this is the case for all $x$ in an interval containing $x_0$. So, it is safe to divide by $f$ there. Then you proceed to find the solution. Only then does it turn out that the solution you've found is actually valid on the whole real line and that it is never zero!
BTW: You are completely right in being cautious about $f(a)=f'(a)=f''(a)=\cdots=0$ not implying $f=0$. This is because $f$ need not be equal to its Taylor series around $a$ for any value other than at $a$. If we knew $f$ was analytic this would have been the case.
A: $$\frac{df}{dx}=kf(x)$$
Obviously a trivial solution is $$f(x)=0.$$
So we cannot say that $f$ is never equal to $0$.
Then we solve the ODE in the cases of $f\neq 0$. Note that is not the same as assuming that $f$ is never equal to $0$.
No need to repeat here the classical solving leading to
$$f(x)=C\:e^{kx}$$
with $\quad C\neq 0\quad$ in order to respect the case $f\neq 0$ considered.
This solution is completed with the trivial solution $f=0$ which is consistent with $C=0$. This leads to the general soltion :
$$f(x)=C\:e^{kx}\quad\text{any}\quad C.$$
