Optimization Problems with Functions of Two Variables

Detailed Step-by-Step Solutions, Geometric Applications, and Partial Derivative Tests

Several optimization problems are solved and detailed solutions are presented. These problems involve optimizing functions of two variables using first- and second-order partial derivatives.

In what follows, \( C \) represents the constant of integration where applicable.

Problems with Detailed Solutions

Click on each problem to view its detailed step-by-step solution.

Problem 1

You decide to build a box in the shape of a rectangular prism with a volume of 1000 cubic centimeters. Find the dimensions \( x \), \( y \), and \( z \) of the box so that the total surface area of all 6 faces is minimized.

Show Solution to Problem 1

The total surface area \( A \) of all six faces of the rectangular prism is given by:

\[ A = 2xy + 2yz + 2zx \]
optimization problem 1, minimize area
Figure 1. Rectangular prism dimensions

The volume of the box is given as 1000:

\[ xyz = 1000 \implies z = \frac{1000}{xy} \]

Substitute \( z \) into the surface area formula to express \( A \) as a function of two variables \( x \) and \( y \):

\[ A(x,y) = 2xy + 2y\left(\frac{1000}{xy}\right) + 2x\left(\frac{1000}{xy}\right) = 2xy + \frac{2000}{x} + \frac{2000}{y} \]

To find the critical points, calculate the first-order partial derivatives and set them equal to zero:

\[ A_x(x,y) = 2y - \frac{2000}{x^2} = 0 \] \[ A_y(x,y) = 2x - \frac{2000}{y^2} = 0 \]

Solving this system yields the positive physical solution:

\[ x = 10, \quad y = 10 \]

Next, find the second-order partial derivatives:

\[ A_{xx}(x,y) = \frac{4000}{x^3}, \quad A_{yy}(x,y) = \frac{4000}{y^3}, \quad A_{xy}(x,y) = 2 \]

Evaluate \( D = A_{xx}A_{yy} - A_{xy}^2 \) at \( (10, 10) \):

\[ D = \left(\frac{4000}{1000}\right)\left(\frac{4000}{1000}\right) - (2)^2 = (4)(4) - 4 = 12 \]

Since \( D = 12 > 0 \) and \( A_{xx}(10,10) = 4 > 0 \), the area \( A \) is minimized when:

\[ x = 10 \, \text{cm}, \quad y = 10 \, \text{cm}, \quad z = \frac{1000}{(10)(10)} = 10 \, \text{cm} \]

Problem 2

Find the dimensions of a six-faced box in the shape of a rectangular prism with the largest possible volume that can be made using 12 square meters of cardboard.

Show Solution to Problem 2

Using all available cardboard, the total surface area \( A \) is fixed at 12:

\[ A = 2xy + 2yz + 2zx = 12 \]
optimization problem 2, maximize area
Figure 2. Rectangular prism

The volume \( V \) to be maximized is:

\[ V = xyz \]

Solve the surface area equation for \( z \):

\[ z = \frac{6 - xy}{x + y} \]

Substitute \( z \) into the volume formula:

\[ V(x,y) = \frac{xy(6 - xy)}{x + y} = \frac{6xy - x^2y^2}{x + y} \]

Find the first-order partial derivatives:

\[ V_x(x,y) = -y^2 \frac{x^2 + 2xy - 6}{(x + y)^2} \] \[ V_y(x,y) = -x^2 \frac{y^2 + 2xy - 6}{(x + y)^2} \]

Setting \( V_x = 0 \) and \( V_y = 0 \) yields the interior critical equations:

\[ x^2 + 2xy - 6 = 0, \quad y^2 + 2xy - 6 = 0 \]

Subtracting the equations yields \( x^2 - y^2 = 0 \implies x = y \) (since dimensions must be positive). Substituting \( x = y \) into \( x^2 + 2x^2 - 6 = 0 \):

\[ 3x^2 = 6 \implies x^2 = 2 \implies x = \sqrt{2}, \; y = \sqrt{2} \]

Thus, the critical point is \( (\sqrt{2}, \sqrt{2}) \).

Calculating Second-Order Partial Derivatives:

Using the quotient rule on \( V_x \) and \( V_y \), we find the second-order partial derivatives:

\[ V_{xx}(x,y) = \frac{\partial}{\partial x}\left[ -y^2 \frac{x^2 + 2xy - 6}{(x + y)^2} \right] = -2y^2 \frac{y^2 + 6}{(x + y)^3} \] \[ V_{yy}(x,y) = \frac{\partial}{\partial y}\left[ -x^2 \frac{y^2 + 2xy - 6}{(x + y)^2} \right] = -2x^2 \frac{x^2 + 6}{(x + y)^3} \] \[ V_{xy}(x,y) = \frac{\partial}{\partial x}\left[ -y^2 \frac{x^2 + 2xy - 6}{(x + y)^2} \right] = -2xy \frac{x^2 + 3xy + y^2 - 6}{(x + y)^3} \]

Evaluating at the Critical Point \( (\sqrt{2}, \sqrt{2}) \):

  • \( V_{xx}(\sqrt{2}, \sqrt{2}) = -2(\sqrt{2})^2 \frac{(\sqrt{2})^2 + 6}{(\sqrt{2} + \sqrt{2})^3} = -2(2)\frac{2 + 6}{(2\sqrt{2})^3} = -4\frac{8}{16\sqrt{2}} = -\frac{32}{16\sqrt{2}} = -\frac{2}{\sqrt{2}} = -\sqrt{2} \)
  • By symmetry, \( V_{yy}(\sqrt{2}, \sqrt{2}) = -\sqrt{2} \)
  • \( V_{xy}(\sqrt{2}, \sqrt{2}) = -2(\sqrt{2})(\sqrt{2}) \frac{(\sqrt{2})^2 + 3(\sqrt{2})(\sqrt{2}) + (\sqrt{2})^2 - 6}{(2\sqrt{2})^3} = -4\frac{2 + 6 + 2 - 6}{16\sqrt{2}} = -4\frac{4}{16\sqrt{2}} = -\frac{16}{16\sqrt{2}} = -\frac{1}{\sqrt{2}} = -\frac{\sqrt{2}}{2} \)

Applying the Second Derivative Test:

Calculate the discriminant \( D = V_{xx}V_{yy} - V_{xy}^2 \) at \( (\sqrt{2}, \sqrt{2}) \):

\[ D = \left(-\sqrt{2}\right)\left(-\sqrt{2}\right) - \left(-\frac{\sqrt{2}}{2}\right)^2 = 2 - \frac{2}{4} = 2 - \frac{1}{2} = \frac{3}{2} \]

Since \( D = \dfrac{3}{2} > 0 \) and \( V_{xx}(\sqrt{2},\sqrt{2}) = -\sqrt{2} < 0 \), the volume is maximized when:

\[ x = \sqrt{2} \, \text{meters}, \quad y = \sqrt{2} \, \text{meters}, \quad z = \frac{6 - (\sqrt{2})(\sqrt{2})}{\sqrt{2} + \sqrt{2}} = \frac{4}{2\sqrt{2}} = \sqrt{2} \, \text{meters} \]

Problem 3

Find the distance from the point \( (1, 2, -1) \) to the plane given by the equation \( x - y + z = 3 \).

Show Solution to Problem 3

To find the distance from a point to a plane, we can minimize the square of the distance between \( (1, 2, -1) \) and an arbitrary point \( (x, y, z) \) on the plane:

\[ f(x,y,z) = (x - 1)^2 + (y - 2)^2 + (z + 1)^2 \]

Solve the plane equation \( x - y + z = 3 \) for \( z \):

\[ z = 3 - x + y \]

Substitute \( z \) into \( f \) to express it as a function of \( x \) and \( y \):

\[ F(x,y) = (x - 1)^2 + (y - 2)^2 + (-x + y + 4)^2 \]

Find the first-order partial derivatives:

\[ F_x(x,y) = 2(x - 1) + 2(-1)(-x + y + 4) = 4x - 2y - 10 \] \[ F_y(x,y) = 2(y - 2) + 2(1)(-x + y + 4) = -2x + 4y + 4 \]

Setting the partial derivatives equal to zero and solving the system yields the critical point:

\[ \left(\frac{8}{3}, \frac{1}{3}\right) \]

The corresponding \( z \) coordinate on the plane is:

\[ z = 3 - \frac{8}{3} + \frac{1}{3} = \frac{2}{3} \]

Testing with the second derivative test yields \( D = (4)(4) - (-2)^2 = 12 > 0 \) and \( F_{xx} = 4 > 0 \), confirming a minimum at \( \left(\frac{8}{3}, \frac{1}{3}, \frac{2}{3}\right) \).

The shortest distance \( d \) is:

\[ d = \sqrt{\left(1 - \frac{8}{3}\right)^2 + \left(2 - \frac{1}{3}\right)^2 + \left(-1 - \frac{2}{3}\right)^2} = \sqrt{\left(-\frac{5}{3}\right)^2 + \left(\frac{5}{3}\right)^2 + \left(-\frac{5}{3}\right)^2} = \sqrt{\frac{25}{9} + \frac{25}{9} + \frac{25}{9}} = \sqrt{\frac{75}{9}} = \frac{5\sqrt{3}}{3} = \frac{5}{\sqrt{3}} \]

More References and Links