Box optimization
The objective is to find the largest volume for a box without a lid from a sheet. The optimization calculation is as follows:
$$\mathrm{Volume} = \mathrm{side\ a}\ \times \mathrm{side\ b}\ \times \mathrm{height}$$
$$\begin{split}V\left( x \right) &= \left(a-2x\right)\left(b-2x\right)x \\ &= 4x^{3} - 2 \left( a+b \right)x^{2} + abx \end{split}$$
Derive the function
$$V^{\prime}\left( x \right) = 12x^{2} - 4\left( a + b \right)x + ab = 0$$
Use the general formula to solve quadratic equations
$$x = \frac{-b \pm \sqrt{b^{2}-4ac}}{2a} \\ \Rightarrow x = \frac{\left( 4\left( a + b \right) \right) \pm \sqrt{\left( 4\left( a + b \right) \right)^{2}-4 \left( 12 \right) \left( ab \right) }}{2\left(12\right)}$$
Solve the equation to find \( x \) of the box:
$$x = \frac{1}{6}\left( a + b - \sqrt{a^2 - ab + b^{2}} \right)$$
Instructions:
Write the size of the sides of the surface in boxes \(a\) and \(b\). Move the \(x\) slider to change the size of the cut squares, move the \(\alpha\) bar to assemble or disassemble the box.