Why does $\partial x/\partial r=x/r$ for $x^2+y^2+z^2=r^2$? (Mean Value Property for Harmonic Functions over the Sphere)

harmonic functionspartial derivativepartial differential equations

In Partial Differential Equations by Walter Strauss, Ch 7.1 Page 180, the author seeks to prove the mean value property that the average value of any harmonic function over any sphere equals its value at the centre.

To do this they find the directional derivative in the outward normal direction:

$$\frac{\partial u}{\partial n}=\vec{n}\cdot \nabla u = \frac{\vec{x}}{r}\cdot \nabla u = \frac{x}{r}u_x+\frac{y}{r}u_y+\frac{z}{r}u_z$$

This is the bit where I am confused. They equate this expression for the normal derivative to $\partial u/\partial r$.

By the chain rule:

$$\frac{\partial u}{\partial r}=\frac{\partial u}{\partial x}\frac{\partial x}{\partial r}+\frac{\partial u}{\partial y}\frac{\partial y}{\partial r}+\frac{\partial u}{\partial z}\frac{\partial z}{\partial r}$$

which implies that

$$\frac{\partial x}{\partial r}=\frac{x}{r}$$

and similarly for $y$ and $z$.

However given $x^2+y^2+z^2=r^2$ when I solve for $x$ and take the derivative with respect to $r$ I get:

$$x=\pm \sqrt{r^2-y^2-z^2}$$

Therefore

$$\frac{\partial x}{\partial r}=\pm [(1/2)(r^2-y^2-z^2)^{-1/2}\cdot 2r]$$

$$= \pm \frac{r}{\sqrt{r^2-y^2-z^2}} $$
$$= \pm \frac{r}{\sqrt{x^2}} $$
$$= \pm \frac{r}{x}$$

So $$\frac{\partial x}{\partial r}=\pm \frac{r}{x}$$

whereas it should be $x/r$ not $r/x$.

Best Answer

That's weird. What they wrote is correct, and yet you're right, it seems backwards. $\hat n$ is the same thing as $\hat r$ here, which is $\frac{\overrightarrow r}{r}$, and the directional derivative is definitely the gradient dotted with the unit vector. So everything they say is right.

I didn't see the flaw in your chain rule reasoning right away.

In spherical coordinates, $x = r \cos \theta \cos \phi$, so $\frac{x}{r} = \cos \theta \cos \phi.$. But $\frac{\partial x}{\partial r} = \cos \theta \cos \phi$ as well. So it seems that $\frac{x}{r} = \frac{\partial x}{\partial r}$, because they are directly proportional.

The problem with your version is this: $y$ and $z$ are not constants when you take the partial with respect to $r$, they are functions of $r$ as well!

Related Question