We've received a problem in my mechanics class, out of Taylor, to calculate the center-of-mass of a uniform, thin semicircle of metal with radius $R$ and diameter along the $x$-axis. Here's my approach so far:
Assume the metal has surface density $\sigma$, which is equal to $\frac{M}{\frac{1}{2}\pi R^2}$. This yields$$CM=\frac{1}{M}\int \mathbf{r} dm=\frac{1}{M}\int_A \mathbf{r}\sigma dA=\frac{\sigma}{M}\int_0^\pi\int_0^R(r\hat{r}+\theta\hat{\theta})rdrd\theta$$ $$=\frac{2}{\pi R^2}\left(\hat{r}\int_0^\pi\int_0^R r^2drd\theta+\hat{\theta}\int_0^\pi\int_0^Rr\theta drd\theta\right)$$ $$=\frac{2}{\pi R^2}\left(\hat{r}\pi\frac{r^3}{3}\bigg|_0^R+\hat{\theta}\left[\frac{\theta^2}{2}\bigg|_0^\pi\right]\left[\frac{r^2}{2}\bigg|_0^R\right]\right)$$ $$=\frac{2}{\pi R^2}\left(\frac{\pi R^3}{3}\hat{r}+\frac{\pi^2 R^2}{4}\hat{\theta}\right)$$ $$=\frac{2R}{3}\hat{r}+\frac{\pi}{2}\hat{\theta}$$
which is different from the standard result of $(0,\frac{4R}{3\pi})$. Clearly, my error is in the assumption that the "constants" of the curvilinear unit vectors may be drawn out of the integral, and I can see that if the $\hat{r}$ integral contains a $\sin(\theta)$ term the correct answer is achieved. However, I have no idea how to compute the double integral of a 2D vector quantity in any way more formally correct than the above.
Of course, I could change to Cartesian coordinates and use symmetry argument to simplify to a single integral of a scalar integrand, but I find it hard to believe there is no mathematical machinery to compute the result directly.