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.

To maximize sales in this case, we need to determine the values of both the price (P) and advertising expenditures (A) that correspond to the maximum value of the sales function (Q).

Given that we have three variables (Q, P, and A), we can use calculus to find the maximum value. We will first differentiate the sales function with respect to both P and A, and then find the values of P and A that simultaneously satisfy both derivatives equalling zero.

Let's start by differentiating the sales function with respect to P:

dQ/dP = -10 + A - P

Next, let's differentiate the sales function with respect to A:

dQ/dA = 40 + P - 1.6A

Now, we will set both derivatives equal to zero and solve for P and A:

For dQ/dP = 0:
-10 + A - P = 0
A - P = 10 ----(Equation 1)

For dQ/dA = 0:
40 + P - 1.6A = 0
P - 1.6A = -40 ----(Equation 2)

Now we have two equations (Equation 1 and Equation 2) with two variables (P and A). We can solve these equations simultaneously to find the values of P and A that maximize sales.

By solving these equations, we can find that the values that maximize sales are P = $12.5 (price) and A = $6.25 (advertising expenditures).

To check if these values indeed maximize sales, substitute these values into the sales function (Q=5,000-10P+40A+PA-0.8A^2-0.5P^2) and evaluate Q. If Q is larger than any other points you might check, it means that these are the values that maximize sales.