A cardboard box in the shape of a rectangular parallelepiped is to be enclosed in a cylindrical container with a hemispherical lid. If the total height of the container from the base to the top of the lid is $60$ centimetres and its base has radius $30$ centimetres, find the volume of the largest box that can be completely enclosed inside the container with the lid on.
I have been able to sketch a figure. If we call $h$ and $R$ to be the height and radius of the hemisphere respectively, then we have $h+R=60$ and $R=30$ and so, $h=30.$ But apart from this, I am completely out of ideas, on how to proceed with this problem.
I am assuming the rectangular parallelepiped mentioned in the question is a cuboid:
The largest cuboid that would fit in a cylinder with hemispherical lid is a square prism:
Base of cylinder/hemisphere:
Side of square $=$ Diagonal/$\sqrt 2$
Hence, $DC = \frac{60}{\sqrt2}$
Rationalising the denominator, we get $DC = 30\sqrt2$
There are two parts two the square prism, the part that is inside the cylinder and the part that is inside the hemisphere.
Volume of the part inside the cylinder
Volume of square prism $= a^2h_1$
where $a$ is the side of the square and $h_1$ is the height of the square prism.
For the part inside the cylinder, $h_1$ is the height of the cylinder.
Height of the cylinder $=$ total height $-$ radius $= 60 - 30 = 30cm$
So, the volume of the part inside the cylinder $= {(30\sqrt2)}^2×30=54000cm^3$
Volume of the part inside the hemisphere
Length of $QS$ is the length of the side of the square $=30\sqrt2$
$QR=\frac{QS}{2}=15\sqrt2$
$PR$ is the radius of the hemisphere $=30$
By the Pythagorean theorem, we get $PQ=15\sqrt2$
Here, $PQ$ is the height of the part inside the hemisphere. $PQ=h_2$
Volume of the part inside the hemisphere $=a^2h_2={(30\sqrt2)}^2×15\sqrt2=27000\sqrt2cm^3$
Total volume of the box$=$ Volume of part inside the cylinder $+$ Volume of the part inside the hemisphere $$=54000+27000\sqrt2cm^3$$