optimization-rotation2
The variation in the cost function for the blue and green lines, which differ by a a change of slope (rotation around the intersection point) is the signed area of the shaded region, where the sign is determined by whether the red curve is above or below it.