# Homework Help: Grad of a generalised scalar function

1. Apr 11, 2012

### Phyrrus

1. The problem statement, all variables and given/known data

r=xi+yj+zk and r =$\sqrt{x^2 + y^2 + z^2}$ Let f(r) be a C2 scalar function

Prove that $\nabla$f = $\frac{1}{2}$$\frac{df}{dr}$r

2. Relevant equations

Vector identities?

3. The attempt at a solution

$\nabla$f = ($\frac{df}{dx}$ , $\frac{df}{dy}$ , $\frac{df}{dz}$)
= df/dr]?
= $\frac{df}{dr}$$\hat{r}$ (unit vector of r)
= $\frac{df}{dr}$r$\frac{1}{r}$?

I'm pretty sure what I've attempted isn't mathematically correct in the slightest, though in my head it seems to make some geometric sense. Am I even close though?

Last edited: Apr 11, 2012
2. Apr 12, 2012

### ehild

Formally f(r) is the derivative with respect to vector r: f(r)=(df/dr)=(df/dr)˙r/r. To prove the statement in the problem expand f(r) with x, y, z, and see if it is equal to (df/dr)˙r/r, using that r=√(r2)

ehild

Last edited: Apr 12, 2012
3. Apr 12, 2012

### Phyrrus

Sorry, I made a mistake in the OP, it's supposed to be

$\nabla$f = $\frac{1}{r}$$\frac{df}{dr}$r

Thanks for your reply, but I'm not really sure where the r=√(r^2) come into it? How do you arrive at the 1/r out the front? The only thing I can think of is that it's supposed to reduced it to a magnitude of only df/dr?

4. Apr 12, 2012

### ehild

Sorry, I also made a mistake, leaving out 1/r. df/dr is multiplied by the unit vector $\hat{\vec r}$, so $\nabla f=\frac{df}{dr}\vec r /r.$

You get it by applying the chain rule: $$\frac{df(\sqrt{(\vec r)^2})}{d\vec r}=\frac{df}{dr} \frac{d \sqrt{(\vec r)^2}}{d \vec r}=\frac{df}{dr}\left(\frac{1}{2}\frac{1}{\sqrt{( \vec r)^2} }\right)2 \vec r$$.

ehild

5. Apr 14, 2012

### Phyrrus

Thanks mate, finally got it in the end. Just a little bit stuck on part b of the question though, have to prove that:

$\nabla$^2f = $\frac{2}{r}$$\frac{df}{dr}$+$\frac{d^2f}{dr^2}$

I've been using the vector identities so that I get:

= $\frac{1}{r}$$\frac{df}{dr}$($\nabla$$\bullet$r) +(r$\bullet$$\nabla$)$\frac{1}{r}$$\frac{df}{dr}$

from here I get down to $\frac{3}{r}$$\frac{df}{dr}$+r$\bullet$($\frac{1}{r}$$\nabla$$\frac{df}{dr}$+$\frac{df}{dr}$$\nabla$$\frac{1}{r}$)

This is where I am confused, what is $\nabla\frac{df}{dr}$ is it just $\frac{d^2f}{dr^2}$?

And I keep getting $\frac{df}{dr}$$\nabla$$\frac{1}{r}$=$\nabla$f, which doesnt seem right.

6. Apr 14, 2012

### ehild

No, it is $\frac{d^2f}{dr^2}\frac{\vec r}{r}$

ehild

7. Apr 14, 2012

### Phyrrus

Ahhhh yes, got it, it all works out now. Thanks a lot mate.
But just how did you get that? I presume it's quite similar to the first question, chain rule again?

8. Apr 14, 2012

### ehild

Yes, it is the chain rule again.

ehild