This is my second problem with centroids.

$\displaystyle M=\int_{-1}^{1} \int_{0}^{\sqrt{1-x^2}} \ dy \ dx=\int_{-1}^{1} \sqrt{1-x^2} \ dx$Find the centroid of the semicircular region bounded by the x axis and the curve $\displaystyle y=\sqrt{1-x^2}$.

Let $\displaystyle x=sin \theta \Rightarrow \ \frac{dx}{d \theta}=cos \theta$

$\displaystyle \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \sqrt{1-sin^2 \theta} \ cos \theta \ d \theta=\int_{-\frac{\pi}{2}}^\frac{\pi}{2} cos^2 \theta \ d \theta.$

$\displaystyle \frac{1}{2} \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} 1+ cos 2 \theta \ d \theta=\frac{1}{2} \left[ \theta+\frac{1}{2} sin 2 \theta \right]_{-\frac{\pi}{2}}^{\frac{\pi}{2}}=\frac{\pi}{2}$

So $\displaystyle M=\frac{\pi}{2}.$

$\displaystyle M_x=\int_{-1}^{1} \int_0^{\sqrt{1-x^2}} y \ dy \ dx=\frac{1}{2} \int_{-1}^{1} 1-x^2 \ dx=\frac{1}{2} \left[x-\frac{x^3}{3} \right]_{-1}^{1}=\frac{1}{2} \left( 0 \right)=0$

$\displaystyle M_y=\int_{-1}^1 \int_0^{\sqrt{1-x^2}} x \ dy \ dx=\int_{0}^1 x \sqrt{1-x^2} \ dx+\int_{-1}^0 x \sqrt{1-x^2} \ dx=2 \int_0^1 x \sqrt{1-x^2} \ dx$

Let $\displaystyle u=1-x^2 \Rightarrow \ \frac{du}{dx}=-2x \Rightarrow \ 2 \int _{1}^0 \sqrt{u} \ \frac{du}{-2}= 2 \int_0^1 u^{\frac{1}{2}} \frac{du}{2}=\left[ \frac{2}{3} u^{\frac{3}{2}} \right]_0^1=\frac{2}{3}$

$\displaystyle \overline{x}=0 \left( \frac{2}{\pi} \right)=0$

$\displaystyle \overline{y}=\frac{2}{3} \left( \frac{2}{\pi} \right)=\frac{4}{3 \pi}$

Apparently $\displaystyle \overline{x}=0$ but I can't see anything wrong with my working!

If anyone can see a problem, I would be very grateful if you could point it out.

Thanks in advance!