# real analysis – Proving that, if \$y_1geq y_2\$ at some interval \$[x_0, x_1]\$, there exists a point where \$y_1’>y_2’\$

I am working on an exercise on ODE and I need the following lemma to solve it.
Lemma: Let two functions $$y_1, y_2$$: $$(x_0, x_1)tomathbb{R}$$, such that $$y_1(x_0) = y_2(x_0)$$ and $$y_1(x_1) = y_2(x_1)$$. Moreover $$y_1(x)>y_2(x) ; forall xin (x_0, x_1)$$. Prove that there exists some point $$zin(x_0,x_1)$$, for which $$y_1′(z) > y_2′(z)$$.

It is geometrically obvious, as every point near enough $$x_0$$ satisfies the condition, but I couldn’t prove it formally. I tried working with local maximums and minimums, but I think there is a more obvious way than considering all options for $$max$$ and $$min$$.