Economics: output = ax + bx^2 + cy + dy^2, and p_x*x + p_y*y = budget. I need maximum profit mix of x and y.?

I think to maximize profit I want the derivative of revenue (with respect to output) to equal the derivative of total cost (with respect to output). In other words, I want my marginal revenue to equal my marginal cost, but I also need to keep the mix of inputs within a budget, so priceX * x inputs + priceY * y... show more I think to maximize profit I want the derivative of revenue (with respect to output) to equal the derivative of total cost (with respect to output). In other words, I want my marginal revenue to equal my marginal cost, but I also need to keep the mix of inputs within a budget, so priceX * x inputs + priceY * y inputs has to be equal to the budget.

Can anyone help?
0