maximize 2 * sqrt(h * (H - h)) for h