# Grad of a generalised scalar function

## Homework Statement

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

## Homework Equations

Vector identities?

## 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:

## Answers and Replies

ehild
Homework Helper
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:
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?

ehild
Homework Helper
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

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.

ehild
Homework Helper
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}$?

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

ehild

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?

ehild
Homework Helper
Yes, it is the chain rule again. ehild