If I know the demand function of a new product is q(p)=10 - the square root of p, and I know that the cost function is C(x)=2x+45, how do I find the unit price that maximizes profit? What is the maximum profit? And how many items are sold at the optimizing price?

Not quite sure how p,q,x are related, but profit = revenue - cost

and revenue r = price * quantity
So, if you can sort those out, find where dr/dp = 0 and find q at that price p

So from what I have been told, q is the demand function and that can be used to find the revenue function by multiplying it by p. I’m not sure how to plug in but I plug in to the quadratic somehow. I know that the unit price that maximizes profit is at 45.83. And items sold at the optimizing profits is 3.23. The only thing I don’t understand how to find now is the maximum profit.