Element of Arc Length in Cylindrical Coordinates

In Cartesian coordinates the position vector of a particle is
$\mathbf{r} = x \mathbf{i} + y \mathbf{j} + z \mathbf{k}$

Then
$d \mathbf{r} = dx \mathbf{i} + dy \mathbf{j} + dz \mathbf{k}$

An element of arc length expressed in Cartesian coordinates is
$ds = \sqrt{(dx)^2 + (dy)^2 +(dz)^2}$

In cylindrical polar coordinates
$x= r cos \theta \rightarrow dx = dr cos \theta - r sin \theta d \theta$

$y= r sin \theta \rightarrow dy = dr sin \theta + r cos \theta d \theta$

$z= z \rightarrow dz = dz$

Then an element of arc length expressed in Cartesian coordinates is
\begin{aligned} ds &= \sqrt{(dr cos \theta - r sin \theta d \theta)^2 + (dr sin \theta + r cos \theta d \theta)^2 +(dz)^2} \\ &= \sqrt{(dr)^2 cos^2 \theta -2r dr d \theta cos \theta cos \theta + r^2 sin^2 \theta (d \theta)^2 +(dr)^2 sin^2 \theta +2rdr d \theta sin \theta cos \theta +r^2 cos^2 \theta (d \theta)^2 + (dz)^2} \\m &= \sqrt{(dr)^2 (cos^2 \theta + sin^2 \theta) + d \theta)^2 (r^2 sin^2 \theta + r^2 cos^2 \theta ) + (dz)^2} \\ &= \sqrt{(dr)^2 + r^2d \theta)^2 + (dz)^2} \end{aligned}
>br>