Derivative of Convex or Concave Function