Derivation of $\mathrm{d}\vec{S} = \mathrm{d}r \hat{r} + r \mathrm{d}\theta \hat{\theta}$ In polar coordinates, I know $$\mathrm{d}x = \cos\theta\, \mathrm{d}r - r \sin\theta \,\mathrm{d}\theta,$$ and $$\mathrm{d}y = \sin\theta \,\mathrm{d}r + r \cos\theta\, \mathrm{d}\theta,$$ thus I managed to successfully derive $$\mathrm{d}S=\sqrt{(\mathrm{d}r)^2+(r\mathrm{d}\theta)^2}.$$
However, I couldn't figure out how to turn $\mathrm{d}x$ and $\mathrm{d}y$ into $$\mathrm{d}\vec{S}= \mathrm{d}r \,\hat{r} + r\,\mathrm{d}\theta \,\hat{\theta},$$
or is there other way to derive $\mathrm{d}\vec{S}$? Thanks.
 A: Start with:
Position vector in polar coordinates
$$S(polar)=r\hat{r}$$
With unit vectors $\hat{r}$  and $\hat{\theta}$
$$\hat{r}=cos\theta \hat{x} + sin\theta \hat{y}$$
$$\hat{\theta}=-sin\theta \hat{x} + cos\theta \hat{y}$$
Take the differential element of S, using the product rule:
$$ dS = d(r\hat{r})= dr\hat{r} + rd\hat{r}  $$
You need to find $d\hat{r}$
$$d\hat{r}= d(cos\theta \hat{x}) + d(sin\theta \hat{y})$$
Use the product rule on each term, but note that $d\hat{x}=d\hat{y}=0$
$$d\hat{r}= d(cos\theta)\hat{x} + d(sin\theta)\hat{y}$$
Use $d(cos\theta)=-d\theta sin\theta$ and $d(sin\theta)=d\theta cos\theta$
$$d\hat{r}= -d\theta sin\theta\hat{x} + d\theta cos\theta\hat{y}$$
$$d\hat{r}= d\theta (-sin\theta\hat{x}+ cos\theta\hat{y}) =d\theta \hat{\theta} $$
$$ dS = d(r\hat{r})= dr\hat{r} + rd\theta \hat{\theta}  $$
A: Notice that, in Cartesian coordinates, the arc length is given by
$$\mathrm{d}\vec{S} = \mathrm{d}x \, \hat{x} + \mathrm{d}y \, \hat{y}. (1)$$
One can then notice that, in spherical coordinates, one has
\begin{gather}
\hat{x} = \cos\theta \, \hat{r} - \sin\theta \, \hat{\theta}, \\
\hat{y} = \sin\theta \, \hat{r} + \cos\theta \, \hat{\theta}.
\end{gather}
We can now use the expressions for $\mathrm{d}x$ $\mathrm{d}y$ that you gave, combine them with these expressions for the unit vectors, and substitute them in Eq. (1). This will lead you straight to the expression in a fashion similar to the one you used to derive the surface element.
