I am asked to integrate the function given in polar coordinates $f(r,\theta) = r$ over the region between $r = a(1+\cos\theta)$ and $r = a$.
My answer is $$\int_{-\pi/2}^{\pi/2} \int_{0}^{a} r\cdot r \mathrm{d}r \mathrm{d}\theta + \int_{\pi/2}^{3\pi/2} \int_{0}^{a(1+cos\theta)} r \cdot r \mathrm{d}r \mathrm{d}\theta = \frac{7a^3\pi}{6} - \frac{22 a^3}{9}$$
but the textbook's answer gives
$$\left( \frac{22}{9} + \frac{5 \pi}{6} \right) \cdot a^3.$$
Did I do something wrong?
EDIT
I now have the corrected answer
$$\int_{-\pi/2}^{\pi/2} \int_{a}^{a(1+cos\theta)} r \cdot r \mathrm{d}r \mathrm{d}\theta = \frac{22a^3}{9} + \frac{\pi a^3}{2}$$
which still disagrees with the textbook. Can anyone see a mistake?
Your limits are wrong, for example in the first integral you're integrating between $r=0$ and $r=a$ instead of $r=a(1+\cos\theta)$ and $r=a$. It also isn't clear what range you should take for $\theta$, but we note when $\theta=\pi/2$ and $\theta=-\pi/2$ that $a(1+\cos\theta)=a$, so we may be expected to integrate between these limits? Or perhaps the contribution on the left side of the graph should also be included.
Integration over the two areas bounded by the blue and green lines is simply given by $$\begin{align} &\int_{-\pi/2}^{\pi/2} \int_a^{a(1+\cos\theta)} f(r,\theta) r \mathrm{d} r \mathrm{d} \theta, &\int_{\pi/2}^{3\pi/2} \int_{a(1+\cos\theta)}^a f(r,\theta) r \mathrm{d} r \mathrm{d} \theta. \end{align}$$ The first of these gives $a^3\left( \frac{9}{22} + \frac{\pi}{2} \right)$.