Given Polar Coordinates - Find the rectangular coordinates of a centroid. I'm having trouble with this question on my Calculus III homework. I'm not really sure how to go about this one honestly.  

A lamina is bounded by the curve $r = 2\cos(3θ)\space$ when $-π/6 <= θ <= π/6$. Assuming a constant density, $ρ =  k$, give the rectangular coordinates of the centroid.

For clarity of the question, and clarity of what type of answer I am looking for:

My professor taught me the following: $$M_x = \iint y\rho(x,y)dA$$ $$M_y = \iint x\rho(x,y)dA$$ $$m = \iint \rho(x,y)dA$$ The answer I need is, $$(\bar x, \bar y) = \left(\frac{M_y}{m},\frac{M_x}{m}\right)$$ In addition, I was taught that $$ x = r\cos(\theta) $$ $$ y = r\sin(\theta) $$ when converting between polar and rectangular coordinates.

Any assistance would be greatly appreciated.
Thanks.
 A: Let's first calculate the total mass of the centroid.  The total mass $M$ is given by 
$$\begin{align}
M&=\int_{-\pi/6}^{\pi/6} \int_0^{2\cos(3\theta)}\rho \,r\,dr\,d\theta\\\\
&=4\rho\int_0^{\pi/6}\cos^2(3\theta)\,d\theta\\\\
&=\frac\pi3\rho
\end{align}$$
Because of the symmetry of the centroid, we expect the center of mass to lie on the $x$-axis.   In fact, the center of mass, $\vec r_{CM}=\hat x \bar x+\hat y \bar y$, is given by
$$\begin{align}
\vec r_{CM}&=\frac1M\int_{-\pi/6}^{\pi/6}\int_0^{2\cos(3\theta)} \vec r\,\rho\,r\,dr\,d\theta\\\\
&=\frac3\pi\left(\hat x \int_{-\pi/6}^{\pi/6}\int_0^{2\cos(3\theta)} r^2\cos(\theta)\,dr\,d\theta+\hat y \underbrace{\int_{-\pi/6}^{\pi/6}\int_0^{2\cos(3\theta)} r^2\sin(\theta)\,dr\,d\theta}_{=0\,\text{due to odd symmetry}}\right)\\\\
&=\hat x \frac{16}{\pi}\int_0^{\pi/6}\cos^3(3\theta)\cos(\theta)\,d\theta \tag 1
\end{align}$$
The evaluation of the integral on the right-hand side of $(1)$ is left as an exercise.
A: Let me demonstrate how much simpler this problem is in the complex plane. First of all, we note that curve can be expressed as
$$z=2\cos(3\theta)e^{i\theta}$$
The arc length, area, and centroid are given by
$$
s=\int |\dot z| d\theta\\
A=\frac{1}{2}\int \mathfrak{Im}\{z^*\dot z\}d\theta\\
z_c=\frac{1}{3A}\int z\ \mathfrak{Im}\{z^*\dot z\}d\theta
$$
Thus, we need $\dot z$, $z^*$, $\mathfrak{Im}\{z^*\dot z\}$ as follows
$$\dot z=[3\cdot 2\sin(3\theta)+i\cdot2\cos(3\theta)]e^{i\theta}\\
z^*=2\cos(3\theta)e^{-i\theta}\\
\mathfrak{Im}\{z^*\dot z\}=4\cos^2(3\theta)
$$
Then we can readily show that
$$
A=\frac{1}{2}\int_{-\pi/6}^{\pi/6}4\cos^2(3\theta)d\theta=\frac{2}{3}\int_{-\pi/2}^{\pi/2}\cos^2\varphi d\varphi=\frac{\pi}{3}\\
z_c=\frac{8}{3A}\int_{-\pi/6}^{\pi/6}\cos^3(3\theta)e^{i\theta}d\theta=\frac{8}{3A}\int_{-\pi/6}^{\pi/6}\cos^3(3\theta)\cos\theta d\theta=\frac{8}{\pi}\left(\frac{81\sqrt{3}}{320}+0i\right)
$$
Notice the cosine arrangement in the last integral.
A: EDIT1
$$   {\bar x} = \frac{\int r ^3\cos \theta d\theta}{\int r^2 d\theta},\, 
  {\bar y} = \frac{\int r ^3\sin \theta d\theta}{\int r^2 d\theta} $$ 
Plugin $r$ and integrate between given $\theta$ limits. The latter vanishes as for an odd function.
