Counterexample to the Gronwall lemma 
Gronwall Lemma. Let $I := [x_0,x_1]$, $x_1, > x_0$, $a,b \in \mathbb{R}$ where $b \geqslant 0$, $y \in C(I)$, such that $$y(x) \leqslant a + b\int_{x_0}^x y(t) dt$$ holds for all $x \in I$. Then $$y(x) \leqslant a\exp\left( b(x - x_0)\right)$$ for all $x \in I$.

Now I am asked to provide a counterexample if $b < 0$. My question is, how do I generally approach such a task? I think, I try some easy functions like $y \equiv 1$ or $y(x) = -x$, but somehow it did not work. Thanks for any hint.
 A: When looking for a counterexample, try to do something simple. Your idea of picking $y=1$ is a not a bad one: It is the simplest function imaginable that just might provide a counterexample. The starting point $x_0$ shouldn't matter. Put it equal to $0$. And try $b=-1$. The exact size of $b$ shouldn't matter.
Now, with these choices, write up what Gronwall would say in this case:
If $$ 1\le a-x $$ for all $x\in I$, then $$1\le ae^{-x}$$ for all $x\in I$.
Does this look plausible? Notice that $ae^{-x}$ decreases quite fast, $a-x$ not so much. So it does not look plausible at all. Clearly, you need $a>1$ to satisfy the hypothesis. Try $a=2$: Then the hypothesis holds if $I=[0,1]$. But at the right end of the interval, $ae^{-x}=2e^{-1}<1$, so the conclusion is false. And there's your counterexample.
A: Take $a=2, b=-1, x_0=0, x_1=1$ and $y\equiv 1$. Then for $x\in [0,1]$
$$ y(x) = 1 = 2 - 1 \leq 2 - x = 2 - \int_0^x 1 dt = 2 - \int_0^x y(t)dt.$$
But
$$ a \exp(b(1-x_0)) = 2 e^{-1} < 1 = y(1).$$
