TITLE: Comparison theorem for ODE
QUESTION [11 upvotes]: Here is something I'm trying to prove:

Conjecture: Suppose $f'(x) \leq \phi(f(x), x)$ and $f(a)=\alpha$. Suppose $g'(x)=\phi(g(x),x)$ and $g(a)\geq \alpha$. Then $f(x)\leq
 g(x)\,\,\forall x$.

It definitely seems like it should be true, and I don't think we even need continuity of $\phi$.
(Edit: a user has correctly pointed out that we should require $\phi$ be locally Lipshitz in the first variable, uniformly with respect to the second variable. Let's add that assumption.) 
I can prove it in the case that the inequality is strict. I'll place my proof below the fold. How can I extend it to weak inequality?
If it's wrong, I'd love to see a counterexample. A reference is fine; I have the book by Teschl, for example.
A similar question with stronger assumptions was asked here. 

Proposition: Suppose Suppose $f'(x) < \phi(f(x), x)$ and $f(a)=\alpha$. Suppose $g'(x)=\phi(g(x),x)$ and $g(a)\geq \alpha$. Then $f(x)\leq
 g(x)\,\,\forall x$.
Proof: Suppose not. Suppose WLOG there is a $b>a$ such that $f(b)>g(b)$. Let $c:=\inf \{x>a:f(x)>g(x)\}$. By definition of the derivative we have $f'(c)\geq g'(c)$, a contradiction, since $f'(c)<\phi(f(c),c)=\phi(g(c),c))=g'(c)$.

REPLY [6 votes]: Denote $h=f-g$. Assume there is $b>a$ such that $h(b)>0$. Since $h$ is continuous and $h(a)\leq0$ thus there exists $c\in[a,b)$ such that $h(x)>0$ for $x\in(c,b]$ and $h(c)=0$ ($c=\inf\{d\in[a,b]: f|_{[d,b]}>0\}$). We thus get that for $x\in[c,b]$
\begin{align*}
h'\leq\Phi(f(x),x)-\Phi(g(x),x)\leq L|f(x)-g(x)|=Lh,
\end{align*}
from which $h(b)\leq h(c)e^{L(b-c)}=0$ which is a contradiction.