Find the maximum profit and the number of units that must be produced and sold in order to yield the maximum profit. Assume that​ revenue, R(x), and​ cost, C(x), of producing x units are in dollars.

R(x)=40x-0.5x^2, C(x)=5x+15