Suppose $x(t)$ is differentiable on $(0,T)$ and 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]$?