Let the side of the square to be cut off be x cm. Then, the length and the breadth of the box will be (18 − 2x) cm each and the height of the box is x cm.
Therefore, the volume V(x) of the box is given by,

If x = 9, then the length and the breadth will become 0. x ≠ 9.

By second derivative test, x = 3 is the point of maxima of V.
Hence, if we remove a square of side 3 cm from each corner of the square tin and make a box from the remaining sheet, then the volume of the box obtained is the largest possible.