Calculating the Center of Mass We have a homogeneous body that looks like this: 

I have tried dividing the body into different parts using the following definition:
R g * A = R 1 * A 1 + ... R n * A n
I was thinking I could first divide it into two parts using the x axis, and then add those two together using the definition above. But how can I calculate the coordinates for the center of mass for the lower part? 
 A: For the solution, I will consider three parts. The semi-circle of radius r/2 in the 1st quadrant. The semi-circle of radius r below the x-axis. Yes I know the full semi circle isn't present, and therefore the next part follows. The semi-circle in the 3rd quadrant with radius r/2 but having negative density. In summary, we can as a thought experiment fill that gap with the material of the rest of the body, but again with negative density overlapping to maintain the mass-lessness of the empty space. I am splitting the zero mass in the gap into positive and negative masses. The center of masses for these three bodies are straight forward to calculate. Considering this is filed in homework I am assuming you only wanted to be directed to the solution instead of having the full thing presented to you.
A: The center of mass for half a disc of radius r is at distance
$4r/3\pi$ from the center of the disc (see
http://planetmath.org/centreofmassofhalfdisc).
Consider the three half disks, with radiuses r for the large one A and
r/2 for the two small one (one existing B and one missing C ). The mass of
each is proportional to the surface. Their centers of mass are known
from the above formula. Since the body is composed of A and B from
which the mass of C has been removed, you compose accordingly the
masses of the three parts assuming they are concentrated in the
repective centers of mass, taking a negative value for C as it is to
be removed from A.
More explanation:
Calculation of the center of mass can be done algebraically, taking
missiing parts negatively. It derives very easily from the formula for
the center of mass of several mass points.  If you have two mass
points $m_1$ and $m_2$ at coordinates $r_1$ and $r_2$, then the
coordinate r for the center of mass of both, for a total mass
$m=m_1+m_2$ is given by $mr=m_1r_1+m_2r_2$
If you take $m_2$ to be the missing half-disk C and m to be the large
half-disk, your horn shaped bottom part will correspond to the mass
$m_1$. (i.e., composing the horn and the small half disk gives you the
large half disk). The equation tells you where the center of mass of
the horn shape $m_1$ must be so that when associated with the small
half-disk $m_2$, you will get the proper result for the center of mass of
the large half-disk $m$.
So the coordinates $r_1$ for the horns shaped part are given by the
equation, i.e.  $r_1=(mr-m_2r_2)/m_1$, but you also have to compose
that with the smaller half-disk above.
A: Use calculus!
For any region $R$ with density function $\rho(x,y)$ we can compute a number of quantities from it.
First off, mass:
$$m=\iint_R\rho(x,y)\ dA$$
Now we need the first moments, or the moments of mass:
$$M_x = \iint_Ry\ \rho(x,y)\ dA\\M_y=\iint_Rx\ \rho(x,y)\ dA$$
The center of mass is then
$$(\bar x, \bar y) = \left(\frac{M_y}{m}, \frac{M_x}{m}\right)$$
Now applying this to the problem in question, we can first of all set $\rho(x,y)=1$. Doing this, several terms drop out or cancel, and we have
$$(\bar x, \bar y)=\left(\frac{\iint_Rx\ dA}{\iint_RdA},\frac{\iint_Ry\ dA}{\iint_RdA}\right)$$
$\iint_RdA$ is really just the area of $R$, which in this case is exactly $\frac{\pi r^2}{2}$, so substituting into the previous equation yields
$$(\bar x, \bar y)=\left(\frac{2\iint_Rx\ dA}{\pi r^2},\frac{2\iint_Ry\ dA}{\pi r^2}\right)$$
All that remains is to evaluate those double integrals, which is accomplished by choosing suitable bounds in order to replace them with one or more iterated integral.
