The volume of a cylinder is [tex] \pi 2^{2} h=171.5 in^{3} [/tex]. From the figure, the circle inside the square makes up the base, while the lateral surface area of the cylinder is the rectangle.
In terms of r, the area of the circle from the square would be [tex](2r)^{2} = 4r^2[/tex] since half the square's side is r and the area of a square is the square of is side.
The area of the rectangle is 2[tex] \pi [/tex]rh. From the equation of the cylinder's volume,
[tex]h= \frac{171.5}{\pi r^{2}} [/tex], thus the area of rectangle is [tex]\frac{343}{r} [/tex]
Add both areas, take its derivative, then equate to 0 to find the value of r:
[tex]A = 4 r^{2}+\frac{343}{r} [/tex] (This is the total amount of material required for the square and the rectangle in terms of r)
[tex] \frac{dA}{dr} = 8r+343(-1) r^{-2} =0[/tex]
[tex][8r- \frac{343}{ r^{2}}=0] r^{2}[/tex]
[tex]8 r^{3}-343=0[/tex]
[tex] r^{3}= \frac{343}{8} [/tex]
[tex]r=3 inches[/tex], substitute this value to the equation for h in terms of r.
[tex]h= \frac{171.5}{\pi 3^{2}} [/tex]
[tex]h=6.07 inches[/tex]