Suppose that the price at which x units of a particular commodity can be sold is given by p(x) = 365 - 2x and that the total cost of producing x units is
C(x) = 5x2 + 5x + 800.
(a) Find the level of production x at which the profit function P(x) is maximized.
(b) Determine the level of production x at which the average cost A(x) = C(x)/x is minimized