In David J. Griffiths' Introduction to Electrodynamics - Example $1.3$, the author solves the problem of
Find the gradient of $r = \sqrt{x^2+y^2+z^2}$ . (As in the magnitude of the position vector).
He does $$ \nabla r = \frac{\delta r}{\delta x} \hat{x}+\frac{\delta r}{\delta y} \hat{y}+\frac{\delta r}{\delta z} \hat{z} \tag{1} $$ nothing wrong there, but then he does the following $$ \nabla r = \frac{1}{2}\frac{2x}{\sqrt{x^2+y^2+z^2}} \hat{x}+\frac{1}{2}\frac{2y}{\sqrt{x^2+y^2+z^2}} \hat{y}+\frac{1}{2}\frac{2z}{\sqrt{x^2+y^2+z^2}} \hat{z} \tag{2} $$ which I am confused as to how he got to, I can't seem to understand/find if he just manipulated any of the values: I don't understand why he makes $\delta x$ into $2{\sqrt{x^2+y^2+z^2}}$ for all dimension variables. Can someone elaborate? Thank you.
To elaborate what was already spoke in @leoli's comment, if $g(x) = x^{1/2}$ then $g'(x) = x^{-1/2}/2$, so if $h(x) = \sqrt{f(x)} = g(f(x))$, then by chain rule, $$ h'(x) = g'(f(x))f'(x) = \frac{f'(x)}{2\sqrt{f(x)}}, $$ as you are seeing in all your examples.