Linear demand curve q=mp+b. From the two points (30,500) and (50,300):
m=50−30300−500=−10,500=−10⋅30+b⇒b=800⇒q=800−10p.
Profit = (price − cost) × quantity:
π(p)=(p−20)(800−10p)=−10p2+1000p−16000.
A downward parabola; the maximum is at the vertex:
p∗=−2⋅(−10)1000=50$.
Quantity sold q=800−10⋅50=300; profit
πmax=(50−20)⋅300=9000$.
p∗=50$,πmax=9000$ (q=300)