TITLE: Positiveness of energy of differential equation
QUESTION [6 upvotes]: Let $x(t) : [0,T] \rightarrow \mathbb{R}^n$ be a solution of a differential equation
  $$
\frac{d}{dt} x(t) = f(x(t),t).
$$
  In addition we have functions $E :\mathbb{R}^n \rightarrow \mathbb{R}$ and  $h:\mathbb{R}^{n+1}\rightarrow \mathbb{R}$  such that
  $$
\frac{d}{dt}{E(x(t))} = h(x(t),t) E(x(t))
$$
  for any solution $x(t)$ of the differential equation. Can we show that if $E$ is positive at the time $0$ then it is positive at all times? i.e.
  $$
E(x(0))>0 \Longrightarrow E(x(t)) \qquad 0<t\leq T
$$
  Assume that all functions are at least one continuously differentiable.

It is easy to show that it is true if $h$ does not depend on $x$ or can be written in the form $h(x(t),t) =\hat h(E(x(t)),t)$. Then $E$ satisfy following differential equation
$$
\frac{d}{dt}{E(t)} = \hat h(E(t),t) E(t)
$$
Thanks to the uniqueness of the solution, any solution $E(t)$ cannot cross the trivial solution $E(t)=0$ and therefore it has to have the same sign at all times.

Application: Let's define matrix $A(t)$ via differential equation
$$
\frac{d}{dt}{A(t)} = B(A(t),t) A(t) \qquad A(0) = I
$$
where $B$ is matrix valued function with arguments $A$ and $t$. Is $A(t)$ invertible for all $t\geq 0$?
We have 
$$
\frac{d}{dt}{\det{A(t)}} = Tr(B(A(t),t)) \det{A(t)} 
$$
If $B$ is just a function of $t$ and $\det{A(t)}$ then the answer is yes, in general I do not know if $A(t)$ is invertible or not.

REPLY [2 votes]: Winther was right. You can use Gronwall's Lemma to understand it. Define the function $f:\mathbb{R}\rightarrow \mathbb{R}$ such that: $$f(t)=E(x(t))^2\times 1_{E(x(t))\leqslant 0}$$
For sure, this is a non-negative function. Take the derivative:
\begin{align}
\partial_t f(t)&\leqslant h(x(t),t)E(x(t))^2 \times 1_{E(x(t))\leqslant 0} \\
&\leqslant h(x(t),t)f(t)
\end{align}
this implies that: $$f(t) \leqslant \int_0^t h(x(s),s) f(s) ds $$ 
By hypothesis $(E(x(0))>0 \Leftrightarrow f(0)=0)$, which gives: $$f(t) \leqslant f(0) \times \int_0^t h(x(s),s) f(s) ds=0 $$
By definition of $f$, this implies that $E(x(t))$ is positive. Of course, here all the $\leqslant$ could be replaced by $=$ since you have equalities. Note that the derivative of $1_{E(x(t),t)\leqslant 0}$ has a meaning with the notion of weak derivative; its "derivative" is a dirac at the point "$E(x(t),t)=0$".