$\underline{\nabla} \cdot \underline{A} $ in polar coordinates. I have just shown that in polar coordinates we have,
$$\underline{\nabla} = \frac{ \partial }{ \partial r} \space \underline{\hat{r}}+\frac{1}{r} \frac{\partial}{\partial \theta} \space \underline{\hat{\theta}}$$
Now assume that $\underline{A} = A_1 \underline{\hat{r}} + A_2 \underline{\hat{\theta}}$. I wish to find what  $\underline{\nabla} \cdot \underline{A} $ would be given this information. 
I figured it would be $ \frac{\partial}{\partial r}(A_1)+\frac{1}{r}\frac{\partial}{\partial \theta}(A_2)$ but this not the case the actual result is,
$$\frac{1}{r} \frac{\partial}{\partial r} ( r A_1 )+\frac{1}{r} \frac{\partial}{\partial \theta}(A_2)$$ 
I'm unsure how this follows and I was hoping someone would be able to shed some light on where I am going wrong, thanks!
 A: An important point to note is to that in cylindrical coordinates, the unit vectors can be specified as:
$$\begin {align}
\mathbf{a_r}&=\cos\theta{\mathbf{i}} + \sin\theta{\mathbf{j}} \\
\mathbf{a_{\theta}}&=-\sin\theta{\mathbf{i}} + \cos\theta{\mathbf{j}} \\
\mathbf{a_z}&=\mathbf{k}
\end{align}  \nonumber $$
Of course, you can refer to the literature on how to derive these unit vectors.
Now (and specific to your question), given that $\mathbf{A} = A_1\mathbf{a_r}+A_2\mathbf{a_{\theta}}$ then (with the component of $\mathbf{a_k}$ identically $0$), the Divergence of the vector $\mathbf{A}$ can be calculated as:
$$ \begin {align}
\nabla \cdot \mathbf{A} &= \left(\frac{\partial }{\partial{r}}\mathbf{a_r} +  \frac{1}{r}\frac{\partial }{\partial{\theta}}\mathbf{a_{\theta}}   \right) \cdot \left(A_1\mathbf{a_r}+A_2\mathbf{a_{\theta}} \right) \\
&= \mathbf{a_r}\cdot \frac{\partial }{\partial{r}} \left(A_1 \mathbf{a_r}\right) + \mathbf{a_r}\cdot \frac{\partial }{\partial{r}} \left(A_2 \mathbf{a_{\theta}}\right) \\
&= \frac{1}{r}\mathbf{a_{\theta}}\cdot \frac{\partial }{\partial{\theta}} \left(A_1 \mathbf{a_r}\right) +  \frac{1}{r}\mathbf{a_{\theta}}\cdot \frac{\partial }{\partial{\theta}} \left(A_2 \mathbf{a_{\theta}}\right)
\end{align}  \nonumber 
$$
$$
\begin {align}
\Rightarrow \nabla \cdot \mathbf{A} &= \mathbf{a_r} \cdot \left(A_1  \frac{\partial }{\partial{r}}\mathbf{a_r} +  \mathbf{a_r}\frac{\partial }{\partial{r}}A_1 \right) \\
                                                     &= \mathbf{a_r} \cdot \left(A_2  \frac{\partial }{\partial{r}}\mathbf{a_{\theta}} +  \mathbf{a_{\theta}}\frac{\partial }{\partial{r}}A_2 \right) \\
                                                     &=  \frac{1}{r}\mathbf{a_{\theta}} \cdot \left(A_1  \frac{\partial }{\partial{\theta}}\mathbf{a_r} +  \mathbf{a_r}\frac{\partial }{\partial{\theta}}A_1 \right) \\
                                                    &=  \frac{1}{r}\mathbf{a_{\theta}} \cdot \left(A_2  \frac{\partial }{\partial{\theta}}\mathbf{a_{\theta}} +  \mathbf{a_{\theta}}\frac{\partial }{\partial{\theta}}A_2 \right) 
\end{align}  \nonumber 
$$
Again, since $$\mathbf{a_r} =\cos\theta{\mathbf{i}} + \sin\theta{\mathbf{j}} $$ this implies that $\frac{\partial }{\partial{r}}\mathbf{a_r} = 0$ and $\frac{\partial }{\partial{\theta}}\mathbf{a_r} = -\sin\theta{\mathbf{i}} + \cos\theta{\mathbf{j}} = \mathbf{a_{\theta}}$.
Also, from
$$ \mathbf{a_{\theta}} =-\sin\theta{\mathbf{i}} + \cos\theta{\mathbf{j}} $$
this implies that
$\frac{\partial }{\partial{r}}\mathbf{a_{\theta}} = 0$ and $\frac{\partial }{\partial{\theta}}\mathbf{a_{\theta}} = -\cos\theta{\mathbf{i}} - \sin\theta{\mathbf{j}} = -\mathbf{a_r}$.
Substituting and simplifying gives:
$$
\begin {align}
\mathbf{a_r} \cdot \left(A_1  \frac{\partial }{\partial{r}}\mathbf{a_r} +  \mathbf{a_r}\frac{\partial }{\partial{r}}A_1 \right)  &= \frac{\partial }{\partial{r}}A_1 \\
\mathbf{a_r} \cdot \left(A_2  \frac{\partial }{\partial{r}}\mathbf{a_{\theta}} +  \mathbf{a_{\theta}}\frac{\partial }{\partial{r}}A_2 \right) &= 0 \\
 \frac{1}{r}\mathbf{a_{\theta}} \cdot \left(A_1  \frac{\partial }{\partial{\theta}}\mathbf{a_r} +  \mathbf{a_r}\frac{\partial }{\partial{\theta}}A_1 \right) &= \frac{1}{r}A_1 \\
\frac{1}{r}\mathbf{a_{\theta}} \cdot \left(A_2  \frac{\partial }{\partial{\theta}}\mathbf{a_{\theta}} +  \mathbf{a_{\theta}}\frac{\partial }{\partial{\theta}}A_2 \right)  &= \frac{\partial }{\partial{\theta}}A_2
\end{align}  \nonumber 
$$
Therefore:
$$ \nabla \cdot \mathbf{A} = \frac{\partial }{\partial{r}}A_1 + \frac{1}{r}A_1 +  \frac{\partial }{\partial{\theta}}A_2 $$
Now to put in a form that agrees with the given answer, notice that: 
$$ \frac{1}{r} \frac{\partial }{\partial{r}}\left(rA_1\right) =  \frac{1}{r} \left(r\frac{\partial}{\partial{r}}A_1 + A_1\frac{\partial}{\partial{r}}r \right) =\frac{\partial }{\partial{r}}A_1 + \frac{1}{r}A_1  
$$
Summary: 
$$
\begin {align}
\nabla \cdot \mathbf{A} &= \frac{\partial }{\partial{r}}A_1 + \frac{1}{r}A_1 +  \frac{\partial }{\partial{\theta}}A_2 \\
                                   &= \frac{1}{r} \frac{\partial }{\partial{r}}\left(rA_1\right) + \frac{\partial }{\partial{\theta}}A_2
\end{align}  \nonumber 
$$
