Demand P = 20 − Q, cost TC(Q) = Q²/2, external damage $4/ton. Pick an integer output Q between 1 and 15.
Your profit-maximizing output: Q = 7. Social optimum: Q = 5.