Suppose that on some interval the function $f$ satisfies $f'=cf$ for some number $c$.
(a) Assuming that $f$ is never $0$, prove that $|f(x)|=le^{cx}$ for some number $l\gt 0$. It follows that $f(x)=ke^{cx}$ for some $k$.
(b) Show that this result holds without the added assumption that $f$ is never $0$. Hint: Show that $f$ can't be $0$ at the endpoint of an open interval on which it is nowhere $0$.
(c) Suppose that $f'=fg'$ for some $g$. Show that $f(x)=ke^{g(x)}$ for some number $k$.
My work:
(a) is easy. For (b), first assume that $f$ does not vanish on the entire interval. Then $f(x_0)\neq 0$ for some point. Hence, by continuity there is some open interval around $x_0$ for which the function is nonzero, and hence by (a), $f(x)=ke^{cx}$. Now as the hint suggests, I want to prove that $f$ can't be $0$ at the endpoint of an open interval on which it is nowhere $0$. Again by continuity, the endpoint of this interval would be $w:=\sup\{x\gt x_0 : f(x)\neq 0\}$ and $z:=\inf\{x\lt x_0 : f(x)\neq 0\}$.
Here is where I'm struggling. I think that this $f$ can't be $0$ on both of these endpoints because $f$ is either always positive or always negative on this interval and since it is also continuous on the endpoints, it can't suddenly vanish at the point. However, I cannot precisely show this. How can I rigorously prove this idea?
Finally, for (c), solving differential equations I get $|f|=de^g$ for some number $d$. Again, to show that $f=ke^g$ on the interval, I need to show that $f$ is never $0$. However, unlike the situation in (b), I think since $g$ is also a function, it can rapidly go to $\infty$ as $x$ goes to the endpoint of the same proposed interval, and then $f$ can actually go to zero. How can I show that like (b), $f$ is never zero on the entire interval?
I would greatly appreciate any help for the above two questions.