Assume that f is a continuous function (so that we are only considering classical solutions).
Suppose that a solution y(x) is not monotonic. Then, there must be a point, x, where dy/dx changes from positive to negative or vice versa. That is, the function at least at one point changes from increasing to decreasing or vice versa.
It is necessary that there exists y such that f(y) = 0. However, because f(y) depends on y only, any root of f(y) is a constant function, which has a slope dy/dx identically zero. This is a contradiction. Therefore, f(y) can be either entirely nonnegative, or entirely nonpositive.
Therefore, y(x) is monotonic.
Vlad A.
Thank you08/14/20