<s>[INST] Find centroid of shape given by a circle and a cardoid I'm stuck on finding the centroid of this shape (the shaded area):

With the sphere having a radius of $r=2$, and the cardioide being given by $r=1+\cos\phi$
I found the Area, which is
$A=\frac12(2\pi r^2-\frac32 \pi)=\frac{13}{4} \pi$
Now I don't know how to proceed further. Could anyone point me in the right direction?
Thank you :)
 [/INST] There is a mistake in your area calculation -
$A = \frac12(\pi r^2-\frac32 \pi)=\frac{5}{4} \pi$ (you wrote $2\pi r^2 $ instead of $\pi r^2$ by mistake)
Now coming to finding centroid,
We know in polar coordinates, $x = r\cos \theta, y = r \sin \theta$ so the centroid ($\overline{x}, \overline {y}$) of the polar region is given by
$\displaystyle \overline{x} = \dfrac{2}{3} \frac {\int_{\alpha}^{\beta} r^3 \cos\theta \,  \mathrm{d} \theta}{\int_{\alpha}^{\beta} r^2 \,  \mathrm{d} \theta} \,$ (numerator is $r \cos \theta .(r^2 d\theta))$
Similarly, $\displaystyle \overline{y} = \dfrac{2}{3} \frac {\int_{\alpha}^{\beta} r^3 \sin\theta \,  \mathrm{d} \theta}{\int_{\alpha}^{\beta} r^2 \,  \mathrm{d} \theta}$
The denominator is nothing but $2A \,$ where $A$ is the area of the region which you have already found. Also consider the polar region as a collection of infinitely small triangles and that is how this formula.
In this case our shaded region is bound by $r = (1 + \cos \theta) \,$ below and $r = 2$ above. Please also note that both curves go between $0 \leq \theta \leq \pi$ as we are interested in shaded area above $X$-axis. So,
$\displaystyle \int_{\alpha}^{\beta} r^3 \cos\theta \,  \mathrm{d} \theta = \displaystyle \int_{0}^{\pi} [2^3 - (1 + \cos \theta)^3] \cos\theta \,  \mathrm{d} \theta = -\frac{15 \pi}{8}$
$\displaystyle \int_{\alpha}^{\beta} r^3 \sin\theta \,  \mathrm{d} \theta = \displaystyle \int_{0}^{\pi} [2^3 - (1 + \cos \theta)^3] \sin\theta \,  \mathrm{d} \theta = 12$
$\displaystyle \int_{\alpha}^{\beta} r^2  \,  \mathrm{d} \theta \,$ is nothing but $2A$ and as you already found the area, our denominator is $\frac{5 \pi}{2}$.
So $\overline{x} = \frac{2}{3} \times \frac{-15 \pi/8}{5\pi/2} = -\frac{1}{2}$
$\overline{y} = \frac{2}{3} \times \frac{12}{5\pi/2} = \frac{16}{5\pi}$
</s>