A producer is a price-taker and the price of one unit of output is 12. The cost function of the producer is $C(y)=\frac{1}{3}y^3-2\frac{1}{2}y^2+18y$. We determine the maximum profit.

It follows that $R(y)=12y$, which implies that $\pi(y)=-\frac{1}{3}y^3+2\frac{1}{2}y^2-6y$.

According to the first-order condition the most profitable output quantity is a stationary point of $\pi(y)$.

Hence, $\pi'(y)=-y^2+5y-6=0$, which gives $y=2$ or $y=3$. We could find the same points by the marginal output rule, as $MR(y)=12$ and $MC(y)=y^2+5y+18$ and $MR(y)=MC(y)$ resuls in $y=2$ and $y=3$.

Using a sign chart we find that $y=3$ is a maximum location. The maximum profit is then $\pi(3)=-4\frac{1}{2}$.

Obviously, the producer will not produce if it results in negative profit and therefore he decides not to produce at all. We could find the same answer with the production rule, as $AR(3)=12$ and $AC(3)=13\frac{1}{2}$.

Hence, the maximum profit is $\pi(0)=0$.