Marginal Average Cost Function Calculus