Path following method to minimize f(x)=xc (box constrained optimization)
Remember that the minimizer is zero when the integer c is even otherwise the miminizer is on the boundary