# Prove limit exists for an almost monotonic bounded function, involves convexity and square integrability

Let us consider the dynamics

$\dot{x}(t)=-\gamma(t)y(t)\left(y(t)+m(t)\right)$

where $\gamma(t)\in [0,1]$ is a convex function that gaurantees the bound $\vert x(t)\vert \leq x_{\max}<\infty$ and can reach zero only as time goes to infinity. In addition, $m(t)$ vanishes as $t\rightarrow \infty$ with $\vert{m(t)}\vert\leq m_0 e^{-\lambda(t-t_0)}$ $\forall t\geq t_0$ with $\lambda>0$.

I want to prove that $x(t)$ obtains a limit. Secondly, the limit is equal to $-x_{\max}$ provided $y(t)$ does not belong to $\mathcal{L}_2$. That is,

1. $\exists L$ s.t. $\lim_{t\rightarrow \infty} x(t) = L$, $\vert L\vert\leq x_{\max}$.
2. If $\lim_{t\rightarrow \infty} \int_{t_0}^t y(\tau)^2\text{d}\tau=\infty$ then $\lim_{t\rightarrow \infty} x(t) = -x_{\max}$.

It is obvious by drawing a picture (see the images attached) that (1) is true, however, I am struggling to come up with a simple and elegant proof of this. Here is what I have been trying to use, namely in (2):

We can derive an upper bound on the dynamics as $\dot{x}(t)\leq-\frac{1}{2}\gamma(t)y(t)^2+\frac{1}{2}m(t)^2$. We immediately note that $\dot{x}\leq \frac{1}{2}m(t)^2$ where $m(t)\rightarrow 0$ exponentially fast (lacking mathematical formality here, this means that "in the limit" $x(t)$ is a decreasing function). Returning to the first upper bound and integrating both sides w.r.t time yields

$x(t_2)-x(t_1)=\int_{t_1}^{t_2}\dot{x}(t)\text{d}t\leq-\frac{1}{2}\int_{t_1}^{t_2}\gamma(t)y(t)^2\text{d}t+\frac{1}{2}\int_{t_1}^{t_2}m(t)^2\text{d}t\leq -\frac{1}{2}\int_{t_1}^{t_2}\gamma(t)y(t)^2\text{d}t+\frac{m_0^2}{4\lambda}e^{-2\lambda(t_1-t_0)}(1-e^{-2\lambda(t_2-t_1)})$

where it is obvious that the upper bound on the variation vanishes as $t_1\rightarrow \infty$. Lastly,

$x(t_2)\leq x(t_1) -\frac{1}{2}(\inf_t{\gamma(t)})\int_{t_1}^{t_2}y(t)^2\text{d}t+\frac{m_0^2}{4\lambda}e^{-2\lambda(t_1-t_0)}(1-e^{-2\lambda(t_2-t_1)})\leq -\frac{1}{2}(\inf_t{\gamma(t)})\infty +\beta_m$

which contradicts the fact that $\vert x(t)\vert$ is bounded, unless $\inf_t{\gamma(t)} =0$ which is only possible when $x(t)=-x_{\max}$. I feel like I am breaking many rules in the last argument. This has been driving me crazy. It seems so simple: a bounded function that is upper bounded by a non-increasing function, with an upper bound on the derivative that vanishes. I have a proof for (2) that is ugly, but it does the job. I am really hoping that I am missing something small that I can hold onto and construct a very simple proof.

$\lim_{t\rightarrow\infty} x(t)\neq-x_{\max} \implies y\in\mathcal{L}_2$

$y\notin\mathcal{L}_2 \implies \lim_{t\rightarrow\infty} x(t)=-x_{\max}$