imagine a D-sphere in a D dimensional Cartesian coordinate system, $r^2=\sum_{i=1}^{D}(x^i)^2$. Differentiating the aforementioned equation we have
(1): $rdr = \sum_{i}x^idx^i$
(2): $\frac{\partial{r}}{\partial{x^i}}=\frac{x^i}{r}$
I can understand why (1) is true. My question is: why is (2) also true?
Source from: Anthony Zee's book "Einstein Relativity in a Nutshell". Chapter 1.2. Apples do Not Fall Down
Since $r =\sqrt{ \sum_i (x^i)^2}$, apply the chain rule to see $$\frac{\partial r}{\partial x^i} = \frac{1}{2}\frac{1}{\sqrt{\sum_i (x^i)^2}}*2x^i = \frac{x^i}{r}.$$
If you're into differential forms, note that by using (1) and applying it to the tangent vector $\frac{\partial}{\partial x^i}$, by definition you obtain $$r dr(\frac{\partial}{\partial x^i}) = x^i \iff dr(\frac{\partial}{\partial x^i}) = \frac{x^i}{r}.$$