A firm produces two different kinds A and B of a commodity. The daily cost of producing x units of A and y units of B is

C(x,y) = 0.04x2 + 0.01xy + 0.01y2 +4x + 2y +500
Suppose that firm sells all its output at a price per unit of 15 for A and 9 for B.
Find the daily production levels x and y that maximise profit per day.
Suppose that any production by the firm creates pollution, so it is legally restricted to produce a total of 320 units of the two kinds of output. What now are the optimal quantities of the two kinds of output?

I'd like to add that the '2' after x and y means 'squared'.

To maximize profit per day, we need to determine the values of x and y that will maximize the profit function.

Step 1: Define the profit function.
The profit function P(x, y) is given by the difference between the revenue and cost functions.
Revenue function R(x, y) is the product of the selling prices and the respective quantities sold.
R(x, y) = 15x + 9y

Step 2: Substitute the cost and revenue functions into the profit function.
P(x, y) = R(x, y) - C(x, y)
P(x, y) = (15x + 9y) - (0.04x^2 + 0.01xy + 0.01y^2 + 4x + 2y + 500)

Step 3: Simplify the profit function.
P(x, y) = 15x + 9y - 0.04x^2 - 0.01xy - 0.01y^2 - 4x - 2y - 500
P(x, y) = -0.04x^2 - 0.01xy - 0.01y^2 + 11x + 7y - 500

Step 4: Find the partial derivatives of the profit function with respect to x and y.
∂P/∂x = -0.08x - 0.01y + 11
∂P/∂y = -0.02x - 0.02y + 7

Step 5: Set the partial derivatives equal to zero and solve for x and y.
-0.08x - 0.01y + 11 = 0
-0.02x - 0.02y + 7 = 0

Step 6: Solve the system of equations to find the critical points.
Multiply the first equation by 4 and the second equation by 50 to eliminate the decimals:
-0.32x - 0.04y + 44 = 0
-1x - y + 350 = 0

Multiply the second equation by -0.32 and add it to the first equation:
0.68x + 0.04y - 240 = 0
-0.32x - 0.04y + 44 = 0
0.36x - 196 = 0

Solve for x:
0.36x = 196
x ≈ 544.44

Substitute the value of x into the second equation to solve for y:
-1(544.44) - y + 350 = 0
y ≈ -194.44

Step 7: Determine the profit at the critical point(s).
P(x, y) = -0.04x^2 - 0.01xy - 0.01y^2 + 11x + 7y - 500
P(544.44, -194.44) ≈ $12,207.41

Therefore, the daily production levels x and y that maximize profit per day are approximately x = 544.44 units of A and y = -194.44 units of B. However, negative production is not physically feasible, so we need to consider the constrained optimization problem.

For the constrained optimization problem, we need to consider the legal restriction of producing a total of 320 units of the two kinds of output.

Step 1: Set up the constraint equation.
x + y = 320

Step 2: Solve the constraint equation for x or y.
x = 320 - y

Step 3: Substitute the expression for x or y into the profit function.
P(y) = -0.04(320 - y)^2 - 0.01(320 - y)y - 0.01y^2 + 11(320 - y) + 7y - 500

Step 4: Simplify the profit function by expanding and combining like terms.
P(y) = -0.04(102400 - 640y + y^2) - 0.01(320y - y^2) - 0.01y^2 + 3520 - 11y + 7y - 500

P(y) = -4096 + 25.6y - 0.04y^2 - 3.2y + 0.01y^2 - 0.01y^2 + 2580 - 4y - 500

P(y) = -4096 + 22.4y - 0.04y^2 - 0.2y + 2080 - 4y

P(y) = -0.04y^2 + 18.2y - 2016

Step 5: Find the derivative of the profit function with respect to y.
dP/dy = -0.08y + 18.2

Step 6: Set the derivative equal to zero and solve for y.
-0.08y + 18.2 = 0

-0.08y = -18.2

y ≈ 227.5

Step 7: Substitute the value of y back into the constraint equation to solve for x.
x + 227.5 = 320

x ≈ 92.5

Therefore, the optimal quantities of the two kinds of output, considering the constraint, are approximately x = 92.5 units of A and y = 227.5 units of B.

To find the daily production levels that maximize profit per day, we need to determine the values of x and y that maximize the profit function.

The profit function is given by:
Profit(x, y) = Total Revenue - Total Cost

Total Revenue is the product of the selling price and the quantity sold for each type of output:
Total Revenue = (15 * x) + (9 * y)

Total Cost is given by the function C(x, y) = 0.04x^2 + 0.01xy + 0.01y^2 + 4x + 2y + 500.

Now, let's calculate the profit function:
Profit(x, y) = (15 * x) + (9 * y) - (0.04x^2 + 0.01xy + 0.01y^2 + 4x + 2y + 500)

To maximize profit, we need to find the values of x and y that maximize the profit function. This can be done by taking partial derivatives of the profit function with respect to both x and y, and setting them equal to zero:

∂Profit/∂x = 15 - 0.08x - 0.01y - 4 = 0
∂Profit/∂y = 9 - 0.01x - 0.02y - 2 = 0

Solving these two equations will give us the values of x and y that maximize profit.

Taking the derivative with respect to x, we have:
-0.08x - 0.01y + 11 = 0

Taking the derivative with respect to y, we have:
-0.02x - 0.02y + 7 = 0

Simplifying these equations further, we get:
8x + y = 110
x + y = 350

Now, solving these two equations simultaneously will give us the values of x and y:
8x + y = 110
x + y = 350

Subtracting the second equation from the first equation, we get:
7x = -240
x = -240/7 ≈ -34.29

Substituting the value of x into the second equation:
-34.29 + y = 350
y = 350 + 34.29
y = 384.29

Since the production levels cannot be negative, we can ignore the negative value for x and consider the production levels approximately as:
x ≈ 0
y ≈ 384.29

Therefore, the optimal quantities of the two kinds of output that maximize profit per day are approximately:
x ≈ 0 units of A
y ≈ 384.29 units of B

Now, let's consider the legal restriction of producing a total of 320 units of the two kinds of output.

We need to find the values of x and y that maximize the profit function under the constraint x + y = 320.

Using the same profit function, we can substitute x = 320 - y into the profit function and maximize it with respect to y.

Profit(y) = (15 * (320 - y)) + (9 * y) - (0.04(320 - y)^2 + 0.01(320 - y)y + 0.01y^2 + 4(320 - y) + 2y + 500)

To maximize profit, we take the derivative of Profit(y) with respect to y and set it equal to zero, and solve for y.

Simplifying and solving, we find that y ≈ 192.73.

Substituting this value of y into the constraint x + y = 320, we find that x ≈ 320 - 192.73 ≈ 127.27.

Therefore, under the legal restriction of producing a total of 320 units of the two kinds of output, the optimal quantities of the two kinds of output are approximately:
x ≈ 127.27 units of A
y ≈ 192.73 units of B