Mass and center of mass of lamina in polar coordinates I need some help with the following problem which is question number 15.5.4 in the seventh edition of Stewart Calculus.  Here is the problem definition:  
"Find the mass and center of mass of the lamina that occupies the region D and has the given density function $\rho$, where:  $D={(x,y) | 0\le x \le a, 0 \le y \le b}$ and $\rho (x,y) =1+x^2+y^2 $"  
I did this in rectangular coordinates, but the work and answer are too complicated.  I need help doing this in polar coordinates.  
I see that $z=1+x^2 +y^2=1+r^2$, the graph of which is easy to visualize.  
I need help getting started in converting the following into polar coordinates:  
$m=\int\int_D \rho(x,y) dA =\int_0^a\int_0^b(1+x^2+y^2)dy dx$
$\bar{x}=\frac{1}{m}\int\int_Dx\rho(x,y)dA$
$\bar{y}=\frac{1}{m}\int\int_Dy\rho(x,y)dA$
Then solve for center of mass $(\bar{x},\bar{y})$  
It would seem obvious that $m=\int\int_D \rho(x,y) dA =\int\int_D (1+r^2)r dr d\theta$, but the range of integration is what I do not understand.  I tried using $0\le r\le \frac{b}{sin{\theta}}$ and $0\le \theta \le \arcsin{\frac{b}{r}}$ , but got an undefined result from my TI-89 calculator.    
If someone can show me how to set up these integrals in polar coordinates, I think I could do the integration myself.  However, I would hope to have someone check my answers to the integrals so that I make sure to geth the mass and center of mass correct.
 A: To integrate this region in polar coordinates,
it is advisable to break up the integral into two parts,
as shown in the figures below:

The two parts of the integral are divided by the diagonal line through
the upper right corner of the rectangle.
Since the sides of the rectangle are $a$ and $b$,
this diagonal line is at the angle $\arctan \frac ba.$
For $0 \leq \theta \leq \arctan \frac ba,$
you would integrate over $0 \leq r \leq a \sec\theta,$
and for $\arctan \frac ba \leq \theta \leq \frac\pi2,$
you would integrate over $0 \leq r \leq b \csc\theta.$
If you actually try this, I think you'll find that it is no easier than
doing the integration in rectangular coordinates.
It may even be worse.
An alternative approach, rather than combining $x^2+y^2$ into $r^2$,
is to integrate the terms separately:
$$\begin{eqnarray}
m &=& \int_0^a\int_0^b (1+x^2+y^2)\,dy\,dx \\
 &=& \int_0^a\int_0^b dy\,dx 
 +\int_0^a\int_0^b x^2 \,dy\,dx 
 +\int_0^a\int_0^b y^2 \,dy\,dx 
\end{eqnarray}$$
$$\begin{eqnarray}
m\bar{x} &=& \int_0^a\int_0^b x(1+x^2+y^2)\,dy\,dx \\
 &=& \int_0^a\int_0^b x \,dy\,dx 
 +\int_0^a\int_0^b x^3 \,dy\,dx 
 +\int_0^a\int_0^b xy^2 \,dy\,dx 
\end{eqnarray}$$ 
$$\begin{eqnarray}
m\bar{y} &=& \int_0^a\int_0^b y(1+x^2+y^2)\,dy\,dx \\
 &=& \int_0^a\int_0^b y \,dy\,dx 
 +\int_0^a\int_0^b x^2y \,dy\,dx 
 +\int_0^a\int_0^b y^3 \,dy\,dx 
\end{eqnarray}$$
Now you have nine integrals to solve, but they're all quite simple.
