Please help I have exam ? Optimization problem

A firm produces good A and good B, and faces demand functions for these two goods:

qA = 1000 * (20 − pA)

qB = 1000 * (20 − pB)

Its total cost function is: TC (qA, qB) = 4(qA + qB)+ (qA+qB)^{2}/4000

What are the profit-maximising quantities of the two goods to make and sell?

ANSWER: qA = qB = 5333.33. this is the answers but I want to know how the answer was obtained.

with many thanks.

Re: Please help I have exam ? Optimization problem

Re: Please help I have exam ? Optimization problem

Total profit is total revenue minus total cost. Revenue is units demanded times price per unit. Hence we have:

Total revenue:

and so the total profit is:

Next, find the partial derivatives and equate to zero to determine the critical points:

This implies:

This implies:

Together, these imply: