Equation of total cost is :