Calculate center of mass with respect to radius I want to calculate the center of mass of a half circle with respect to the radius to avoid using x,y coordinates directly. Such that I can write $S_x=S_r\cdot \cos(S_{\phi})$

See here on Wolfram Alpha:

https://www.wolframalpha.com/input/?i=(2%2Fpi)+integrate+r%5E2+dphi+dr,+phi%3D0..pi,+r%3D0..1

The result is obviously wrong. Is there a mistake in my formula or is it just not possible to calculate the center of mass with respect to radius/angle, whether in polar or spheric coordinates?
This can be readily solved in the complex plane without reference to the Cartesian or even polar coordinates. We begin with the definition of the centroid

$$
A=\frac{1}{2}\int\Im\{z^*\dot z\}d\theta\\
Z_c=\frac{1}{3A}\int z\ \Im\{z^*\dot z\}d\theta
$$

We the consider a semicircle of unit radius

$$
z=e^{i\theta},\quad \theta\in[0,\pi]\\
\dot z=ie^{i\theta}\\
z^*\dot z=i\\
\Im\{z^*\dot z\}=1\\
\begin{align}
Z_c
&amp;=\frac{1}{3A}\int e^{i\theta} ~d\theta,\quad A=\pi/2\\
&amp;=\frac{2}{3\pi}\frac{e^{i\theta}}{i}\biggr|_0^{\pi} \\
&amp;=\frac{4 i}{3\pi},\quad (\text{i.e., on the } y \text{-axis})
\end{align}
$$

as expected.
You need a $sin(\phi)$ in the integration.

See: https://www.wolframalpha.com/input/?i=(2%2Fpi)+integrate+sin(phi)+r%5E2+dphi+dr,+phi%3D0..pi,+r%3D0..1

That gives $4\over3\pi$.