A manufacturer sells a product with the following price–demand schedule: for 0≤q≤50, the price is p(q)=100−q dollars per unit; for 50<q≤100, a quantity discount applies and the price becomes p(q)=75−0.5q dollars per unit. The total cost of producing q units is C(q)=20q+600 dollars. Which quantity yields the greatest profit?
a) q=55
b) q=40
c) q=75
d) q=50