Now x (t) at each separate time is a separate integration variable. So it is legitimate to change variables in the integral by shifting: x (t) = u (t) + ε (t) where ε (t) is a different shift at each time but ε (0) = ε (T) = 0, since the endpoints are not integrated: