Centre of mass is defined as,
$$ \overline{x} = \int x \rho dA$$
for a semi circle, above the x axis,
$$ \overline{x} = \rho \int_{0}^{R} \int_{-\sqrt{1-y^2} }^{\sqrt{1-y^2} } x dx dy$$
This becomes (my origin is at center of semi circle)
$$ \overline{x} = \rho \int_{0}^{R} (R^2-y^2) dy = \rho [ R^2 y -\frac{y^3}{3} ] = \frac{ \rho}{3} [ 3R^3 -R^3] = \frac{2 \rho}{3} R^3$$
Now, I'm certain something is 'wrong' because the actual answer is suppoed to be '0' for center of mass of semi circle along 'x'.. however it's coming non zero. Where exactly have I made a mistake?
The image I have shown is the idea behind what I did, first when I did integral along 'x', I got the centre of mass of a thin rod inside the semi circle parallel to horizontal as a function of 'y' , add up the centre of mass of these rods I should get centre of mass of circle but I got something non zero (?)
