A uniform solid body is constructed using a square-based pyramid mounted on a cube. If each edge of the solid has length $l$ show that the centre of gravity of the body lies within the cube is, $\frac {11l}{(24 + 4√2)}$from the base of the pyramid.
Now Volume of cube = $l^3$, and of the pyramid = $\frac{l^3}{3√2}$, using the height of the pyramid as $\frac{l}{√2}$, from Pythagoras. If $O$ is at the base of the pyramid we can say that for the pyramid the height above $O$ is $\frac{l}{4√2}$, as the centre of gravity (centre of mass) is $\frac{h}{4}$ above the base, and we are expecting the centre of gravity to be in the cube. The height below the base $O$ for the cube is $\frac{-l}{2}$.
Some texts equate the centre of gravity to the centre of mass. Can we do this in this particular problem?