A component of a stone plinth has a square base with corners at coordinates $(0,0,0,)$, $(0,2,0)$, $(2,2,0)$ and $(2,0,0)$. The height of the top surface is defined as $z =(1 + x^2 y)$. (All units are in meters.)
If the density of the stone is $6000kg/m^3$ , calculate, to $2d.p$,
a. the mass of the stone block.
b. the x and y coordinates of its centre of mass.
Edit: What I know about solving this sort of problem is that usually you'd have a double integral of the surface density between the limits of the shape. However here since I am not given the surface density only the density and height I tried working out the mass of the object using the formula $p$ = $m$/$v$ where $p$ is the given density $6000kg/m^3$ and $v$ = $l$ * $w$ * $h$ if I assume that that the base can be treated as a cuboid. I then proceeded to integrate this to find the mass and the centre of mass of the shape. However I ran into problems when the mass was around $224000 kg$. The centre of mass using the method I found to be $(1.29 , 1.19)$ which seems reasonable as it lies within the area but I am not sure if my method is valid or the correct way to go about doing this. Apologies for not including this detail earlier, I was unaware of the amount of detail I had to go into.
I get the same (approximate) $x$-coordinate for the centroid below, but since the shape of the block is not a cuboid, my total mass for the block is different.
The general setup for centroid calculations (center of mass when the density is uniform in a body) is to compute "average" coordinates.
Here we were only asked to get the "average" $x$ and $y$ coordinates, but the average $z$ is defined in the same way. For convenience let's denote the constant density $\rho = 6000\; kg/m^3$. This constant affects the actual mass of the block (since mass = density * volume in compatible units), but it will cancel out in each fraction for a coordinate of the centroid.
Average $x$-coordinate:
$$ \overline{x} = \frac{\int_0^2 \int_0^2 \int_0^{x^2y+1} \rho x\; dz\; dy\; dx}{\int_0^2 \int_0^2 \int_0^{x^2y+1} \rho\; dz\; dy\; dx} $$
Average $y$-coordinate:
$$ \overline{y} = \frac{\int_0^2 \int_0^2 \int_0^{x^2y+1} \rho y\; dz\; dy\; dx}{\int_0^2 \int_0^2 \int_0^{x^2y+1} \rho\; dz\; dy\; dx} $$
Average $z$-coordinate:
$$ \overline{z} = \frac{\int_0^2 \int_0^2 \int_0^{x^2y+1} \rho z\; dz\; dy\; dx}{\int_0^2 \int_0^2 \int_0^{x^2y+1} \rho\; dz\; dy\; dx} $$
The denominator common to these expressions is the mass of the block, and the simplest of the integrals to evaluate:
$$ \begin{align*} m &= \int_0^2 \int_0^2 \int_0^{x^2y+1} \rho\; dz\; dy\; dx \\ &= \rho\; \int_0^2 \int_0^2 \int_0^{x^2y+1} dz\; dy\; dx \\ &= \rho\; \int_0^2 \int_0^2 (x^2y+1)\; dy\; dx \\ &= \rho\; \int_0^2 (2x^2+2)\; dx \\ &= \rho\; \left( \frac{16}{3}+4 \right) \\ &= \frac{28\rho}{3} \end{align*}$$
Thus a density of $6000\; kg/m^3$ times a volume of $28/3 \; m^3$ gives the block a mass of $56000\; kg$. Note that the triple integral uses the exact shape of the block (square base $z=0$ in $xy$-plane, but height $z$ of top surface varies with $x$ and $y$, $z=1+x^2y$ as specified).
When computing (say) the $x$-coordinate of the centroid, the density $\rho$ can be factored out and cancelled, and we can apply our previous calculation of volume:
$$ \begin{align*} \overline{x} &= \frac{\int_0^2 \int_0^2 \int_0^{x^2y+1} \rho x\; dz\; dy\; dx}{\int_0^2 \int_0^2 \int_0^{x^2y+1} \rho\; dz\; dy\; dx} \\ &= \frac{\rho\;\int_0^2 \int_0^2 \int_0^{x^2y+1} x\; dz\; dy\; dx}{\rho\;\int_0^2 \int_0^2 \int_0^{x^2y+1} dz\; dy\; dx} \\ &= \frac{\int_0^2 \int_0^2 \int_0^{x^2y+1} x\; dz\; dy\; dx}{\int_0^2 \int_0^2 \int_0^{x^2y+1} dz\; dy\; dx} \\ &= \left( \frac{3}{28}\; \right) \int_0^2 \int_0^2 \int_0^{x^2y+1} x\; dz\; dy\; dx \\ &= \left( \frac{3}{28}\; \right) \int_0^2 \int_0^2 x(x^2y+1)\; dy\; dx \\ &= \left( \frac{3}{28}\; \right) \int_0^2 (2x^3+2x)\; dx \\ &= \left( \frac{3}{28}\; \right) 12 \approx 1.29 \end{align*} $$