Monotonicity of the solution of a differential equation I am thinking over this exercise: "Given the differential equation $y'=g(y)$, where $g$ is a continuous function in an interval $I$, prove that every solution of this equation is monotonic in any interval of extrems $x_0$ and $x_1$, where $x_0$ and $x_1$ are two consecutive zeros in $I$ of the function $g$". I have thought that, as in $(x_0,x_1)$ there are no zeros of $g$, then there are no zeros of $y'$. Consequently, there can be no maxima or minima in this interval, so there is no change of monotonicity. However,it seems to me as if this reasoning is not enough because, in that case, the problem would be so trivial. Thanks for your help.
 A: Welcome.
EDIT: The method below is fine, and introduces a useful theorem. I think I can write up your argument, though, and I think your approach is correct and the exercise is not so hard after all. I'll do it in a slightly different way, without appealing to maxima/minima. As you say, $y'\neq0$ on $(x_0,x_1)$ and $y'$ is continuous, so $y'$ is constantly negative or positive on this open interval, for if $y'(t_0)\gt0$  and $y'(t_1)\lt0$ for $t_0,t_1\in(x_0,x_1)$, say without loss of generality that $t_0\lt t_1$, then by the intermediate value theorem (the continuity of $y'$ is very important) $0\in y'(t_0,t_1)\subseteq y'(x_0,x_1)$, a contradiction. Given that $y'$ is of constant sign on $(x_0,x_1)$, by the mean value theorem is $y$ a (strictly) monotonic function on $(x_0,x_1)$, and by continuous extension remains so on $[x_0,x_1]$.
Original response:
The inverse function theorem is your friend. I like your argument, but I'm not sure how rigorous it is as written. Here is another approach (which is morally similar to yours). I've only ever seen a proof of the inverse function theorem in the more general multivariable setting, so I'm sorry to say I can't comment a "cleaner", more immediate proof in the case of univariate real functions of an interval.
By "consecutive" zeroes, I take this to mean:

$x_0\lt x_1$ and $g(x_0)=0=g(x_1)$, but $\forall t\in(x_0,x_1)$, $g(t)\neq0$.

Then, pick any $t_0\in(x_0,x_1)$. Since $y'$ is a continuous function ($g$) in the open domain $(x_0,x_1)$ containing $t_0$ and $y'(t_0)=g(t_0)\neq0$, the inverse function theorem guarantees that there is some neighbourhood of $t_0$ inside $(x_0,x_1)$ in which $y$ is an invertible function (with continuously differentiable inverse). However, since this holds for all $t_0\in(x_0,x_1)$, by patching together the local neighbourhoods we have that $y$ is invertible on all of $(x_0,x_1)$.
By continuity, the extension of $y$ to $[x_0,x_1]$ is also invertible. Since $y$ is a continuous invertible real function, it follows that it is monotonic on this interval $[x_0,x_1]$ (e.g. by the intermediate value theorem).
