Assume \(s=s_0=\) constant \(\Rightarrow ds=0\), so we are on the surface of a cylinder. \begin{align} z=7\phi&\Rightarrow dz=7\, d\phi\\ d\vec{r}&=ds\,\hat{s}+s\, d\phi\,\hat{\phi}+dz\,\hat{z}\\ &=s_0\, d\phi\,\hat{\phi}+dz\,\hat{z}\\ &=s_0\, d\phi\,\hat{\phi}+7\, d\phi\,\hat{z}\\ &=\left(s_0\,\hat{\phi}+7\,\hat{z}\right)\,d\phi \end{align}
\begin{align} \vert d\vec{r}\vert&=\sqrt{\vert d\vec{r}\vert\cdot\vert d\vec{r}\vert}\\ &=\sqrt{\left(s_0\,\hat{\phi}+7\,\hat{z}\right)\,d\phi \cdot\left(s_0\,\hat{\phi}+7\,\hat{z}\right)\,d\phi}\\ &=\sqrt{(s_0^2+49)(d\phi)^2}\\ &=\sqrt{(s_0^2+49)}\vert d\phi\vert \end{align}
The distance \(\left\vert\vec r -\vec r\,{}'\right\vert\) between the point \(\vec r\) and the point \(\vec r'\) is a coordinate-independent, physical and geometric quantity. But, in practice, you will need to know how to express this quantity in different coordinate systems.
Find the distance \(\left\vert\vec r -\vec r\,{}'\right\vert\) between the point \(\vec r\) and the point \(\vec r'\) in rectangular coordinates.
In rectangular coordinates: \begin{align} \left| \vec r -\vec r\,{}'\right| &= \left|(x\hat{x}+y\hat{y}+z\hat{z}) -(x\,{}'\hat{x}+y\,{}'\hat{y}+z\,{}'\hat{z})\right|\\ &= \left|((x-x')\hat{x}+(y-y')\hat{y}+(z-z')\hat{z}) \right|\\ &= \sqrt{((x-x')\hat{x}+(y-y')\hat{y}+(z-z')\hat{z}) \cdot ((x-x')\hat{x}+(y-y')\hat{y}+(z-z')\hat{z})}\\ &= \sqrt{(x-x\,{}')^2+(y-y\,{}')^2+(z-z\,{}')^2} \end{align}
Sense-making: This is the Pythagorean Theorem!
Show that this same distance written in cylindrical coordinates is: \begin{equation*} \left|\vec r -\vec r\,{}'\right| =\sqrt{s^2+s\,{}'^2-2ss\,{}'\cos(\phi-\phi\,{}') +(z-z\,{}')^2} \end{equation*}
Hint: You may want to use the textbook: GMM: Change of Coordinates
In cylindrical coordinates: \begin{align*} x &= s\cos\phi\\ y &= s\sin\phi\\ z &= z \end{align*} Plug these coordinates into the ANSWER to the first part, above. Then simplify using appropriate trig identities including an addition formula. Now would be a good time to learn how to find the trig identities quickly online or in a reference book.
(Note: You might be tempted to do this calculation by starting with an expression for the position vector using both cylindrical coordinates and cylindrical basis vectors. This strategy is impossible because the cylindrical basis vectors at \(\vec r\) and \(\vec r'\) are different from each other, so you cannot subtract these vectors without resorting to fancy differential geometry/general relativity! If you don't yet know about cylindrical basis vectors, ignore this comment for now.)
\begin{align*} \left|\vec r -\vec r\,{}'\right| &= \sqrt{(s\cos\phi-s\,{}'\cos\phi\,{}')^2 +(s\sin\phi-s\,{}'\sin\phi\,{}')^2 + (z-z\,{}')^2}\\ &= \left[s^2(\cos^2\phi+\sin^2\phi) +s\,{}'^2(\cos^2\phi\,{}'+\sin^2\phi\,{}')\right.\\ &~~~\left. -2s\,{}' s(\cos\phi\cos\phi\,{}'+\sin\phi\sin\phi\,{}') +(z-z\,{}')^2\right]^{\frac{1}{2}}\\ &= \sqrt{s^2+s\,{}'^2-2ss\,{}'\cos(\phi-\phi\,{}')+(z-z\,{}')^2} \end{align*}
Show that this same distance written in spherical coordinates is: \begin{equation*} \left\vert\vec r -\vec r\,{}'\right\vert =\sqrt{r'^2+r\,{}^2-2rr\,{}' \left[\sin\theta\sin\theta\,{}'\cos(\phi-\phi\,{}') +\cos\theta\cos\theta\,{}'\right]} \end{equation*}
Hint: You may want to use the textbook: GMM: Change of Coordinates
In spherical coordinates: \begin{align*} x &= r\sin\theta \cos\phi\\ y &= r\sin\theta \sin\phi\\ z &= r\cos\theta \end{align*} Plug these coordinates into the ANSWER to the first part, above. Also, see the notes in the solution to the cylindrical case. \begin{align*} \left|\vec r -\vec r\,{}'\right| &= \left[(r\sin\theta \cos\phi-r\,{}'\sin\theta\,{}'\cos\phi\,{}')^2\right.\\ &~~\left. +(r\sin\theta\sin\phi -r\,{}'\sin\theta\,{}' \sin\phi\,{}')^2\right.\\ &~~\left. +(r\cos\theta -r\,{}'\cos\theta\,{}')^2\right]^{\frac{1}{2}}\\ &= \left\{ r^2 [\sin^2\theta(\cos^2\phi +\sin^2\phi)+\cos^2\theta]\right.\\ &~~\left. +r\,{}'^2 [\sin^2\theta\,{}'(\cos^2\phi\,{}'+\sin^2\phi\,{}') +\cos^2\theta\,{}' ]\right.\\ &~~\left. -2rr\,{}'[\sin\theta \sin\theta\,{}'(\cos\phi\cos\phi\,{}' +\sin\phi\sin\phi\,{}')+\cos\theta\cos\theta\,{}']\right\} ^{\frac{1}{ 2}}\\ &=\sqrt{r^2+r\,{}'^2-2rr\,{}'[\sin\theta \sin\theta\,{}'\cos(\phi-\phi\,{}') +\cos\theta\cos\theta\,{}']} \end{align*}
Sense-making: Wow, that is an ugly expression (don't memorize this one, by the way). Let's try some special cases. If \(\phi = \phi\,{}'\), we can use a trig identity to reduce the distance formula to \begin{equation*} \left|\vec r -\vec r\,{}'\right| = \sqrt{r^2+r\,{}'^2-2rr\,{}' \cos\left(\theta - \theta\,{}'\right)} \end{equation*}
This is the law of cosines, which makes sense because you can easily write the angle between the two vectors in terms of the difference in the polar angles \(\theta\). The same trick doesn't work the same way for \(\theta = \theta\,{}'\), since the difference in \(\phi\) is not the difference in angles---unless \(\theta = \theta\,{}' = \pi/2\), which is on the equator (see next part).
Cylindrical Coordinates at \(z=0\) and \(z\,{}'=0\) \begin{equation*} \sqrt{s^2+s\,{}'^2-2ss\,{}'\cos(\phi-\phi\,{}')} \end{equation*}
Spherical Coordinates at \(\theta\,{}'=\frac{\pi}{2}\Rightarrow \cos\theta\,{}'=0\) and \(\sin\theta\,{}'=1\). (Also true for \(\theta\).) \begin{equation*} \sqrt{r^2+r\,{}'^2-2rr\,{}'\cos(\phi-\phi\,{}')} \end{equation*}
Behold the Law of Cosines once again!