A firm faces the following sales function:
Q=5,000-10P+40A+PA-0.8A^2-0.5P^2
where Q is sales, P is price(dollars), and A is advertising expenditures (in hundreds of dollars). Calculate the price and advertising levels that maximize sales.
I don't know what to do with it with three variables.