Centre of gravity vs centre of mass for a pyramid mounted on a cube, all sides of length $l$ [duplicate]

This question already has an answer here:

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?

marked as duplicate by Kyle Oman, John Rennie, ACuriousMind♦, user10851, HDE 226868Sep 12 '15 at 21:46

• More on CoG vs CoM: physics.stackexchange.com/q/50107/2451 and physics.stackexchange.com/q/151402/2451 – Qmechanic Sep 10 '15 at 23:41
• Thanks for that. Regarding the comment ' They are only the same if the gravitational field is not varying over the extent of the body' - the gravitational field will not vary much over the body as it will be fairly small e.g. 10-20cm perhaps. Even if it were bigger then the gravitational field will not vary much as it is a uniform solid throughout. – J132 Sep 10 '15 at 23:48

Some of the modified workings out and an answer:

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 for the cube is $\frac{-l}{2}$.

So finding the center of gravity:

$$\frac{\frac{-l^4}{2} + \frac{l^4}{(3√2) * (4√2)}} {{{l^3} + \frac{l^3}{3√2}}}$$

$$=\frac{(\frac{1}{24} - \frac{1}{2})l}{\frac{3√2 + 1}{3√2}}$$

$$=\frac{(-11l) * (3√2)}{72√2 + 24}$$

$$=\frac{(-11l)}{24 + 4√2}$$

The negative sign means that the center of gravity in within the cube and its distance is $$=\frac{11l}{24 + 4√2}$$