# What is the derivative of w =sqrt(x^2+y^2+z^2)?

Aug 30, 2015

$\frac{\partial w}{\partial x} = \frac{x}{\sqrt{{x}^{2} + {y}^{2} + {z}^{2}}}$
$\frac{\partial w}{\partial y} = \frac{y}{\sqrt{{x}^{2} + {y}^{2} + {z}^{2}}}$
$\frac{\partial w}{\partial z} = \frac{z}{\sqrt{{x}^{2} + {y}^{2} + {z}^{2}}}$

#### Explanation:

Since you're dealing with a multivariable function, you must treat $x$, $y$, and $z$ as independent variables and calculate the partial derivative of $w$, your dependent variable, with respect to $x$, $y$, and $z$.

When you differentiate with respect to $x$, you treat $y$ and $z$ as constants. LIkewise, when you differentiate with respect to $y$, you treat $x$ and $z$ as constants, and so on.

So, let's first differentiate $w$ with respect to $x$

$\frac{\partial w}{\partial x} = \frac{\partial}{\partial x} \sqrt{{x}^{2} + {y}^{2} + {z}^{2}}$

$\frac{\partial w}{\partial x} = \frac{1}{2} \cdot {\left({x}^{2} + {y}^{2} + {z}^{2}\right)}^{- \frac{1}{2}} \cdot \frac{\partial}{\partial x} \left({x}^{2} + {y}^{2} + {z}^{2}\right)$

$\frac{\partial w}{\partial x} = \frac{1}{\textcolor{red}{\cancel{\textcolor{b l a c k}{2}}}} \cdot \frac{1}{\sqrt{{x}^{2} + {y}^{2} + {z}^{2}}} \cdot \left(\textcolor{red}{\cancel{\textcolor{b l a c k}{2}}} x + 0 + 0\right)$

$\frac{\partial w}{\partial x} = \textcolor{g r e e n}{\frac{x}{\sqrt{{x}^{2} + {y}^{2} + {z}^{2}}}}$

You don't need to calculate the other two partial derivatives, all you have to do is recognize that the only thing that changes when you differentiate with respect to $y$ is that you get

$\frac{\partial}{\partial y} \left({x}^{2} + {y}^{2} + {z}^{2}\right) = 0 + 2 y + 0$

The same is true for the deivative with respect to $z$

$\frac{\partial}{\partial z} \left({x}^{2} + {y}^{2} + {z}^{2}\right) = 0 + 0 + 2 z$

This means that you have

$\frac{\partial w}{\partial y} = \textcolor{g r e e n}{\frac{y}{\sqrt{{x}^{2} + {y}^{2} + {z}^{2}}}}$

and

$\frac{\partial w}{\partial x} = \textcolor{g r e e n}{\frac{z}{\sqrt{{x}^{2} + {y}^{2} + {z}^{2}}}}$