A company operates two plants which manufacture the same item and whose total cost functions

A company operates two plants which manufacture the same item and whose total cost functions are C1 = 9 + 0.02q21 and C2 = 4.2 + 0.04 q22 , where q1 and q2 are the quantities produced by each plant. The total quantity demanded, q = q1 + q2 , is related to the price, p, by p = 50 − 0.04q . How much should each plant produce in order to maximize the company’s profit?