Suppose $x(t)$ is differetiable on $(0,T)$, continuous on $[0,T]$. How to find the minimum and the minimal value of the integral $\int_0^T\|\dot x(t)+x(t)\|^2dt$ such that $m\le x(t)\le M$ on $[0,T]$?