mid-convex function