trim condition minimizes dz/dx