Suppose vec(r) =x hat(i)+y hatj+z hatk, and r=|r|. Also, let f be a scalar function of r and let vec(A) be a vector function of r. We wish to determine grad f and grad .vec(A).

Alvin Parks

Alvin Parks

Answered question

2022-11-11

Determining divergence and gradient using chain rule
Suppose r = x i ^ + y j ^ + z k ^ and r = | r | . Also, let f be a scalar function of r and let A be a vector function of r. We wish to determine f and . A .
It seems to be obvious that the chain rule is the way to go here:
f = f x i ^ + f y j ^ + f z k ^
= f r r x i ^ + f r r y j ^ + f r r z k ^
= f r ( r x i ^ + r y j ^ + r z k ^ )
= f r r ^
Which is correct. However,
. A = A x . i ^ + A y . j ^ + A z . k ^
= A r r x . i ^ + A r r y . j ^ + A r r z . k ^
= A r . ( r x i ^ + r y j ^ + r z k ^ )
= A r . r ^
This expressions turns out to be incorrect.
The only scope for error seems to be in the usage of the chain rule, however if it(my usage of the chain rule) worked for the gradient, why did it fail here ?

Answer & Explanation

Abril Orr

Abril Orr

Beginner2022-11-12Added 14 answers

Ok, so here's the problem, you didn't account for the unit vectors changing.
A = [ x ^ x + y ^ y + z ^ z ] A
Now, let's consider the dot product with x ^ :
(1) x ^ x ( A )
We can write the differential operator as:
x = r x r + θ x θ
Hence from (1), we get:
x ^ ( A r + θ x A θ )
Particularly speaking, the term of interest is A θ , this we can write as(*);
A θ = | A ( r ) | r ^ θ = | A | r ^ θ = | A | θ ^
Even though we the function is not directly dependent on θ or ϕ the unit vectors are and hence contribute to derivative. Hope this helped!
*: I assumed A = | A | r ^

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?