Is this derivative okay to perform in math (from a physics textbook)?

79 Views Asked by At

The slope of a given curve at a given point, relative to the local $\hat r$ and $\hat\theta$ basis vectors at that point is $\mathrm d r/ r\mathrm d\theta$. The $r$ is needed in the denominator because $r\mathrm d\theta$ is the actual distance associated with the angular span $\mathrm d\theta$ in the $r-\theta$ plane; see $\color{#01A378}{Fig. 2.20.}$. So the slope of the $r = r_0\sqrt{\cos\theta~}$ curve is $$\begin{align}\dfrac 1r\dfrac{\mathrm d r}{\mathrm d\theta}&=\dfrac{1}{r_0\sqrt{\cos\theta}}\dfrac{\mathrm d(r_0\sqrt{\cos\theta})}{\mathrm d \theta\hspace{9ex}}\\[1ex]&=\dfrac{1}{r_0\sqrt{\cos\theta}}\dfrac{-r_0\sin\theta}{2\sqrt{\cos\theta}}\\[1ex]&=-\dfrac{\sin\theta}{2\cos\theta}\tag{2.38}\end{align}$$

This is from Purcell, Morin, Electricity and Magnetism 2nd Edition in chapter 2.7. Is it mathematically okay to do this equation, where you replace r in dr with the equation for r? Isn't dr and r fundamentally different equations?