Existence of Continuous Function The following question requires the use of an easy theorem of calculus, but I am failing to see which one.
Let $ g $ be non-constant and $ C^{1} $ on some interval $ I $. Show that for some subinterval $ J \subseteq I $, there exists a continuous function $ f $ such that the differential equation $ y' = f(y) $ has the solution $ y = g(x) $ on $ J $.
 A: *

*Suppose that $ g: I \to \mathbb{R} $ is non-constant and $ g \in {C^{1}}(I) $.

*Observe that $ g': I \to \mathbb{R} $ cannot be identically $ 0 $ on $ I $, otherwise by the Mean-Value Theorem, $ g $ would be a constant function.

*Hence, there exists an $ x_{0} \in I $ such that $ g'(x_{0}) \neq 0 $. Without loss of generality, let us assume that $ g'(x_{0}) > 0 $.

*As $ g' $ is continuous on $ I $, there exists an open subinterval $ J $ of $ I $ such that $ x_{0} \in J $ and $ g' > 0 $ on $ J $. Intuitively speaking, as $ g'(x_{0}) > 0 $, the continuity of $ g' $ ensures that $ g'(x) > 0 $ for all points $ x \in I $ that are near $ x_{0} $.

*By the Mean-Value Theorem, $ g|_{J} $ must be strictly increasing.

*Hence, $ (g|_{J})^{-1}: g[J] \to J $ exists and is continuous on $ g[J] $, which is an open interval.

*We now need to find a continuous $ f: g[J] \to \mathbb{R} $ such that
$$
\forall x \in J: \quad g'(x) = f(g(x)).
$$

*If such an $ f $ exists, then it is necessary that
$$
\forall x \in g[J]: \quad g'({(g|_{J})^{-1}}(x)) = f(g({(g|_{J})^{-1}}(x))) = f(x).
$$

*This implies that $ f = g' \circ (g|_{J})^{-1} $, which is continuous on $ g[J] $ because it is the composition of two continuous functions.

*A quick check shows that $ f $ as defined does satisfy the requirements.
