Linear-quadratic optimal control problems Geometry and constraints mathematics