Find the divergence of the function

AI Thread Summary
The discussion revolves around calculating the divergence of a function V expressed in spherical coordinates. Participants emphasize the importance of using the correct formulas for gradients and divergences in spherical coordinates, noting that the curl of a gradient is always zero. There are corrections made regarding the use of unit vectors, with a reminder that divergence results in a scalar and does not require unit vectors. Participants also suggest using Wolfram Alpha for verifying calculations and provide guidance on how to input functions correctly. Overall, the conversation highlights the need for precision in mathematical notation and understanding of vector calculus concepts.
DODGEVIPER13
Messages
668
Reaction score
0

Homework Statement


Let V = (sin(theta)cos(phi))/r Determine:
(a) ∇V
(b) ∇ x ∇V
(c) ∇∇V


Homework Equations





The Attempt at a Solution


Uploaded
 

Attachments

  • EPSON015.jpg
    EPSON015.jpg
    9.1 KB · Views: 557
Physics news on Phys.org
Your formulas are all wrong. You need to get the right formulas as you finally did with your gradient exercises.
 
I uploaded 2 parts of the answer
 

Attachments

  • EPSON016.jpg
    EPSON016.jpg
    19 KB · Views: 537
DODGEVIPER13 said:
I uploaded 2 parts of the answer

No time to check it thoroughly now, but 2 cooents:
1. you're using i j k again when you shouldn't.
2. curl(grad f) = 0 always. The curl of the gradient of a function is always zero. (Not all functions have gradients).
3 your writing is hard for me to read but it looks like you wrote grad when you meant div.
 
Is my formula even close to correct? If I take off I,j, and k and does it make it a curl when you take the cross product of a gradient?
 
Sorry that was one long run on sentence. I meant to say will it be ok if I take off I,j, and k?
 
DODGEVIPER13 said:
Sorry that was one long run on sentence. I meant to say will it be ok if I take off I,j, and k?

No. The gradient of a function is a vector. Therefore you need the three unit vectors. Do't use i j k unless you're in an xyz cartesian coordinate system. Use the ones I gave you previously.

The curl can only be taken of a vector. There is no such thing as the curl of a scalar.

It's a mathematical identity that curl (grad f) = 0 for any f. It's very good to remember that identity.
 
Ok is my formula ok? I'm going to go look again but I believe Wikipedia had that listed I can add unit vectors that's no problem.
 
DODGEVIPER13 said:
Ok is my formula ok? I'm going to go look again but I believe Wikipedia had that listed I can add unit vectors that's no problem.

If wikipedia listed it I'm sure it was right. But they must have had the unit vectors too?
(Now I know how you did so well with the gradients, right?) :smile:
 
  • #10
Ugggg that is all Wikipedia lists I'm going to go to my instructors web page and check there
 
  • #11
##\hat{i},\hat{j},\hat{k}## are just labels for unit vectors. They traditionally represent the unit vectors in Cartesian coordinates but you can call them whatever you want, they're just labels. Generally one would write ##\hat{e}_1,\hat{e}_2,\hat{e}_3## to represent unit vectors in arbitrary coordinates. If you are using spherical coordinates, then you need to use the correct formulas for ##\nabla f, \nabla \cdot V, \nabla \times V, \nabla^2 f## in spherical coordinates. You can find them easily online; for example ##\nabla = \hat{e}_r\partial_r + \frac{1}{r}\hat{e}_{\theta}\partial_{\theta} + \frac{1}{r\sin\theta} \hat{e}_{\varphi}\partial_{\varphi}##.
 
  • #12
DODGEVIPER13 said:
Ugggg that is all Wikipedia lists I'm going to go to my instructors web page and check there

Never mind, I screwed you up & forgot you're now doing divergences, not gradients.

Divergence of a vector is a scalar so you don't attach the unit vectors.

Sorry!
 
  • #13
actually I screwed up the problem never said anything about divergence! That being said I corrected what I did and have uploaded it hopefully its ok!
 

Attachments

  • EPSON017.jpg
    EPSON017.jpg
    13.6 KB · Views: 518
  • EPSON018.jpg
    EPSON018.jpg
    7.2 KB · Views: 518
  • #14
DODGEVIPER13 said:
actually I screwed up the problem never said anything about divergence! That being said I corrected what I did and have uploaded it hopefully its ok!

Oh, OK. I think I mistook this for another of your threads whichI think did have div's in them.

I am too lazy to check all your math steps but for curl[grad(f)] the answer must be zero so I'm afraid something went awry there.

Why don't you run grad(f) thru wolfram alpha to make sure you got that part right.
 
  • #15
ok how do I use wolfram for gradients?
 
  • #16
DODGEVIPER13 said:
ok how do I use wolfram for gradients?

Stand by, I'll give it a shot, haven't done that myself yet ...

EDIT: OK, punch in " gradient of sin(theta)*cos(phi)/r " in their top window.

They don't include the unit vectors. They give you the r, theta and phi components in that order, separated by commas, instead. Dumb, but better than screwing up solving it ourselves!
 
Last edited:
  • #17
ok uploaded something else I can could use some assistance with
 

Attachments

  • EPSON023.jpg
    EPSON023.jpg
    6 KB · Views: 490
  • #18
DODGEVIPER13 said:
ok uploaded something else I can could use some assistance with

Can't read that. What happened with grad f?

Back in 1 hr.
 
  • #19
Evaluate the divergence of the following:
(A) A=xyUx+y^2Uy-xzUz
(B) B=pz^2Up+psin^2(phi)Uphi+2pzsin^2(phi)Uz
(C) C=rUr+rcos^2(theta)Uphi
 
  • #20
The previous post was in reference to my uploaded answer that could not be read.
 
  • #21
(A) y+2y-x
(B) z^2+sin(2phi)+2psin^2(phi)
(C) 1
These are my answers
 
  • #22
DODGEVIPER13 said:
(A) y+2y-x
(B) z^2+sin(2phi)+2psin^2(phi)
(C) 1
These are my answers

Unfortunately, B and C are incorrect. They are tricky so work carefully. And check your results with wolfram.

For example, B=pz2Up + psin2(phi)Uphi + 2pzsin2(phi)Uz

so what is ∂Bρ/∂ρ + Bρ/ρ? Not z2.
 
Last edited:
  • #23
div B=pz^2+psin^2(phi)+2pzsin^2(phi) I entered that in wolfram it didnt work what syntax should I use.
 
  • #24
DODGEVIPER13 said:
div B=pz^2+psin^2(phi)+2pzsin^2(phi) I entered that in wolfram it didnt work what syntax should I use.

look at what I came up with for the gradient and improvise! Play around with it for a while. I pointed out that it gave the gradient in comma-separated chunks, omitting the unit vectors. Wolfram will have examples of how to enter a vector to get the divergence.

I would suggest using r instead of rho.

Answer my post 22.
 
  • #25
Bp/p
 
  • #26
Whoops I meant what is Bp/p was that in the formula
 
  • #27
div (rho(z)^2,(rho)sin^2(phi),2(rho)zsin^2(phi)) tried this on wolfram worked but gave the answer in Cartesian
 
  • #28
DODGEVIPER13 said:
div (rho(z)^2,(rho)sin^2(phi),2(rho)zsin^2(phi)) tried this on wolfram worked but gave the answer in Cartesian

Did you look carefully? When I ran grad V3 it gave it in cartesian but also in spherical.
 
  • #29
DODGEVIPER13 said:
Whoops I meant what is Bp/p was that in the formula

sure was! ∂Bρ/∂ρ + Bρ/ρ is the Bρ part of div B.
 
  • #30
Hmm Bp/p isn't a derivative I am failing to see what I can do with this. I am going to go on a long shot here and guess that the unit vectors cancel as they multiply together, and p cancels the other p and leaves me with z^2 again? Then z^2+z^2 heh that can't be right, what am doing wrong anymore hints?
 
  • #31
DODGEVIPER13 said:
Hmm Bp/p isn't a derivative I am failing to see what I can do with this. I am going to go on a long shot here and guess that the unit vectors cancel as they multiply together, and p cancels the other p and leaves me with z^2 again? Then z^2+z^2 heh that can't be right, what am doing wrong anymore hints?

B = Bρ Uρ + ...
= ρz2 Uρ + ...

div B = ∂Bρ/∂ρ + Bρ/ρ + ...
= z2 + ρz2/ρ = z2 + z2 = 2z2

So you got it right, although I don't know exactly what you meant to say. You can see that the
ρ in the numerator and denominator of the second term do cancel.
 
  • #32
ok will the rest of the terms work like this too?
 
  • #33
DODGEVIPER13 said:
ok will the rest of the terms work like this too?

You need to look up the general formula for the divergence in cylindrical coordinates. Then perform the indicated math.

Same goes for your C vector which is in spherical coordinates. You need to practice translating those general formulas into the specific expressions corresponding to your A, B and C.

It so happens that the Bρ component of div B is the only one that has a non-derivative term in it. This is true only for cylindrical coordinates.

When you get to taking the curl you need to be comfortable in using Cramer's rule to solve the appropriate determinant.
 
  • #34
ok my work is uploaded.
 

Attachments

  • EPSON026.jpg
    EPSON026.jpg
    15.2 KB · Views: 373
Back
Top