let the side of square be x
Then remaining dimensions of cuboid for volume is
length45−2x, width 24−2x and height x
Volume(v)=(45−2x)(24−2x)xdvdx=(45−2x)(24−2x)−2x(24−2x)−2x(45−2x)dvdx=12(x2−23x+90)=12(x−5)(x−18)
Nowdvdx=0 at x=5,18
Now,
d2vdx2=12(2x−23)
at x=5d2vdx2<0∴atx=5
that is side of square for which we will get maximum volume