Derive the divergence formula for spherical coordinates

In summary: R+Δr,θ,\phi) - f_r(R,θ,\phi))}{Δr} + \frac{1}{r sinθ} \frac{((sin(θ+Δθ)...}{Δθ} \frac{(f_θ(r,\Theta+Δθ,\phi) - f_θ(r,\Theta,\phi))}{Δθ} + \frac{1}{r sinθ} \frac{(f_\phi(r,θ,\Phi+Δ\phi) - f_\phi(r,θ,\Phi))}{Δ\phi}I apply the limit which makes any part of the volume formula become extremely small
  • #1
hover
343
0

Homework Statement


The formula for divergence in the spherical coordinate system can be defined as follows:

[itex]\nabla\bullet\vec{f} = \frac{1}{r^2} \frac{\partial}{\partial r} (r^2 f_r) + \frac{1}{r sinθ} \frac{\partial}{\partial θ} (f_θ sinθ) + \frac{1}{r sinθ}\frac{\partial f_\phi}{\partial \phi} [/itex]

where [itex]\vec{f} = f_r \widehat{r} + f_θ \widehat{θ} + f_\phi \widehat{\phi}[/itex]

Derive the divergence formula for the spherical coordinate system.

Homework Equations



One way to define divergence is as follows:

[itex]\nabla\bullet\vec{f} = \lim_{volume\rightarrow 0} \frac{flux \space through \space the \space volume}{volume}[/itex]

Volume in spherical coordinates can be defined as follows:

[itex] V = volume = r^2 sin(θ) Δθ Δ\phi Δr[/itex]

The Attempt at a Solution


Just before you read into my solution, I do successfully derive the divergence formula. I am questioning if my methodology is correct though. Without further ado here is my attempted solution.

I first write the basic formula from part 2 down:

[itex]\nabla\bullet\vec{f} = \lim_{V\rightarrow 0}\frac{\hat{dS_r}\bullet\vec{f} + \hat{dS_θ} \bullet\vec{f} + \hat{dS_\phi} \bullet\vec{f}}{V}[/itex]

I fill in all the dS vectors:

[itex]= \lim_{V\rightarrow 0}\frac{\hat{r} r^2 sinθ Δθ Δ\phi \bullet\vec{f} + \hat{θ} r sinθ Δr Δ\phi \bullet\vec{f} + \hat{\phi} r Δr Δθ \bullet\vec{f}}{V}[/itex]

I apply all dot products:

[itex] = \lim_{V\rightarrow 0}\frac{r^2 sinθ Δθ Δ\phi f_r + r sinθ Δr Δ\phi f_θ + r Δr Δθ f_\phi}{V}[/itex]

I take the volume formula from part 2 and put it in the denominator:

[itex] = \lim_{V\rightarrow 0}\frac{r^2 sinθ Δθ Δ\phi f_r + r sinθ Δr Δ\phi f_θ + r Δr Δθ f_\phi}{r^2 sin(θ) Δθ Δ\phi Δr}[/itex]

I cancel like terms with each other:

[itex] = \lim_{V\rightarrow 0}\frac{1}{r^2 Δr} (r^2 f_r) + \frac{1}{r sinθ Δθ} (f_θ sinθ) + \frac{1}{r sinθ Δ\phi} (f_\phi)[/itex]

I apply the limit which makes any part of the volume formula become extremely small:

[itex] = \frac{1}{r^2}\frac{∂}{∂r} (r^2 f_r) + \frac{1}{r sinθ} \frac{∂}{∂θ} (f_θ sinθ) + \frac{1}{r sinθ} \frac{∂}{∂ \phi}(f_\phi)[/itex]

This solution I found definitely matches the formula for divergence is spherical coordinates. I guess my question is is my methodology for solving this problem ok??

Thanks,
hover
 
Physics news on Phys.org
  • #2
I don't think your solution makes any sense. Your first equation in your "attempt at solution" does not express the real definition of divergence. I think you might be confused by
hover said:
One way to define divergence is as follows:

[itex]\nabla\bullet\vec{f} = \lim_{volume\rightarrow 0} \frac{flux \space through \space the \space volume}{volume}[/itex]
"Flux through a volume" is not a normally used phrase. Surfaces can have flux through them, but a volume has a closed surface so you have to be careful about what you mean by this. Divergence is the limit [as volume approaches zero] of the net flux going out of the volume. So for example, if the volume was a small cube, a flux going rightward into the left side of the cube would have to be subtracted from the flux going rightward out of the right side of the cube.

[itex]\nabla\bullet\vec{f} = \lim_{V\rightarrow 0}\frac{\hat{dS_r}\bullet\vec{f} + \hat{dS_θ} \bullet\vec{f} + \hat{dS_\phi} \bullet\vec{f}}{V}[/itex]
So you have a problem with this equation. It is only basically looking at the flux through one half the surface of your volume. You need to subtract flux on one side of the volume from the other side--just like with any derivative you're looking at differences between nearby points.

Also, the step you take between your second to last and last equations is not even remotely correct. You can't turn a 1/Δx into ∂/∂x the way you've written. If you do it correctly, remembering you want to be subtracting something in the numerator of those terms you have in the second to last equation, you should end up with something like Δf/Δx which you are allowed to turn into ∂f/∂x.
 
Last edited:
  • #3
The idea is, however, correct.

You can apply
[tex]\int_{\Delta V} \mathrm{d}^3 \vec{x} \; \vec{\nabla} \cdot \vec{f} = \int_{\partial \Delta V} \mathrm{d}^2 \vec{A} \cdot \vec{f}[/tex]
to an infinitesimal volume [itex]\Delta V[/itex] spanned by coordinate lines.

On the left-hand side you can just take [itex]\vec{\nabla} \cdot{\vec{f}} \, \Delta V[/itex]. On the right-hand side, you must be a bit more careful and have to apply the changes of the arguments of [itex]\vec{f}[/itex] on the 6 surfaces into account. Only then all three differentials in the volume element can be cancelled, and only then you get the correct formula for the divergence in spherical coordinates, which is correctly given in your problem statement.
 
  • #4
OK! Both of your analyses of my solution make sense and I think I understand why it is lacking. This is why I posted my first solution here because, while I did get the right answer, some of the steps in my first solution felt forced. Let me repost my refined solution now.

Homework Equations



One way to define divergence is as follows:

[itex]\nabla\bullet\vec{f} = \lim_{volume\rightarrow 0} \frac{flux \space through \space surface \space areas}{volume}[/itex]

Volume in spherical coordinates can be defined as follows:

[itex] V = volume = r^2 sin(θ) Δθ Δ\phi Δr[/itex]

The Attempt at a Solution


I first write the basic formula from part 2 down. The change that is made in this first step is that I write the flux going through ALL surface areas:

[itex]\nabla\bullet\vec{f} = \lim_{V\rightarrow 0}\frac{\hat{dS_r}\bullet\vec{f}(R+Δr,θ,\phi) -\hat{dS_r}\bullet\vec{f}(R,θ,\phi) + \hat{dS_θ} \bullet\vec{f}(r,\Theta+Δθ,\phi) - \hat{dS_θ} \bullet\vec{f}(r,\Theta,\phi) + \hat{dS_\phi} \bullet\vec{f}(r,θ,\Phi+Δ\phi) - \hat{dS_\phi} \bullet\vec{f}(r,θ,\Phi)}{V}[/itex]

I fill in all the dS vectors:

[itex] = \lim_{V\rightarrow 0}\frac{\hat{r} (r+Δr)^2 sinθ Δθ Δ\phi\bullet\vec{f}(R+Δr,θ,\phi) -\hat{r} r^2 sinθ Δθ Δ\phi\bullet\vec{f}(R,θ,\phi) + \hat{θ} r sin(θ+Δθ) Δr Δ\phi \bullet\vec{f}(r,\Theta+Δθ,\phi) - \hat{θ} r sinθ Δr Δ\phi \bullet\vec{f}(r,\Theta,\phi) + \hat{\phi} r Δr Δθ \bullet\vec{f}(r,θ,\Phi+Δ\phi) - \hat{\phi} r Δr Δθ \bullet\vec{f}(r,θ,\Phi)}{V}[/itex]

I apply all dot products:

[itex] = \lim_{V\rightarrow 0}\frac{(r+Δr)^2 sinθ Δθ Δ\phi f_r(R+Δr,θ,\phi) -r^2 sinθ Δθ Δ\phi f_r(R,θ,\phi) + r sin(θ+Δθ) Δr Δ\phi f_θ(r,\Theta+Δθ,\phi) - r sinθ Δr Δ\phi f_θ(r,\Theta,\phi) + r Δr Δθ f_\phi(r,θ,\Phi+Δ\phi) - r Δr Δθ f\phi(r,θ,\Phi)}{V}[/itex]

I take the volume formula from part 2 and put it in the denominator:

[itex] = \lim_{V\rightarrow 0}\frac{(r+Δr)^2 sinθ Δθ Δ\phi f_r(R+Δr,θ,\phi) -r^2 sinθ Δθ Δ\phi f_r(R,θ,\phi) + r sin(θ+Δθ) Δr Δ\phi f_θ(r,\Theta+Δθ,\phi) - r sinθ Δr Δ\phi f_θ(r,\Theta,\phi) + r Δr Δθ f_\phi(r,θ,\Phi+Δ\phi) - r Δr Δθ f\phi(r,θ,\Phi)}{r^2 sin(θ) Δθ Δ\phi Δr}[/itex]

I cancel like terms with each other:

[itex] = \lim_{V\rightarrow 0}\frac{1}{r^2 Δr} ((r+Δr)^2 -r^2) (f_r(R+Δr,θ,\phi) - f_r(R,θ,\phi))) + \frac{1}{r sinθ Δθ} ((sin(θ+Δθ) - sinθ)(f_θ(r,\Theta+Δθ,\phi) - f_θ(r,\Theta,\phi))) + \frac{1}{r sinθ Δ\phi} (f_\phi(r,θ,\Phi+Δ\phi) - f_\phi(r,θ,\Phi))[/itex]

In this new step, I slightly rewrite the equation to make it obvious that this equation is full of definitions of derivatives.

[itex] = \lim_{V\rightarrow 0}\frac{1}{r^2} \frac{((r+Δr)^2 -r^2) (f_r(R+Δr,θ,\phi) - f_r(R,θ,\phi))}{Δr} + \frac{1}{r sinθ} \frac{(sin(θ+Δθ) - sinθ)(f_θ(r,\Theta+Δθ,\phi) - f_θ(r,\Theta,\phi))}{Δθ} + \frac{1}{r sinθ} \frac{(f_\phi(r,θ,\Phi+Δ\phi) - f_\phi(r,θ,\Phi))}{Δ\phi}[/itex]

When I apply the limit, it makes any part of the volume formula become extremely small. This means that Δr, Δθ and Δ[itex]\phi[/itex] approach 0:

[itex] = \frac{1}{r^2}\frac{∂}{∂r} (r^2 f_r) + \frac{1}{r sinθ} \frac{∂}{∂θ} (f_θ sinθ) + \frac{1}{r sinθ} \frac{∂}{∂ \phi}(f_\phi)[/itex]

End of solution.

This new solution makes more sense than my last one and doesn't seem as forced. Does it look ok to you guys?

Thanks,
hover
 
  • #5
hover said:
I take the volume formula from part 2 and put it in the denominator:

[itex] = \lim_{V\rightarrow 0}\frac{(r+Δr)^2 sinθ Δθ Δ\phi f_r(R+Δr,θ,\phi) -r^2 sinθ Δθ Δ\phi f_r(R,θ,\phi) + r sin(θ+Δθ) Δr Δ\phi f_θ(r,\Theta+Δθ,\phi) - r sinθ Δr Δ\phi f_θ(r,\Theta,\phi) + r Δr Δθ f_\phi(r,θ,\Phi+Δ\phi) - r Δr Δθ f\phi(r,θ,\Phi)}{r^2 sin(θ) Δθ Δ\phi Δr}[/itex]

I cancel like terms with each other:

[itex] = \lim_{V\rightarrow 0}\frac{1}{r^2 Δr} ((r+Δr)^2 -r^2) (f_r(R+Δr,θ,\phi) - f_r(R,θ,\phi))) + \frac{1}{r sinθ Δθ} ((sin(θ+Δθ) - sinθ)(f_θ(r,\Theta+Δθ,\phi) - f_θ(r,\Theta,\phi))) + \frac{1}{r sinθ Δ\phi} (f_\phi(r,θ,\Phi+Δ\phi) - f_\phi(r,θ,\Phi))[/itex]

Now you are on the right track but I believe you have an algebraic mistake going between the two lines in the quote above. You factored things in a way that introduces some cross terms that shouldn't be there. For example
(r+Δr)2fR(r+Δr)-r2fR(r) ≠ ((r+Δr)2-r2)(fR(r+Δr)-fR(r))
since the right hand expression would have cross terms not in the left hand side. [Also, the RHS gives the wrong sign on one of the terms you do want.]

Instead you want to identify derivatives like [(r+Δr)2fR(r+Δr) - r2fR(r)]/Δr = ∂/∂r [r2fR]
 
Last edited:
  • Like
Likes 1 person
  • #6
Jolb said:
Now you are on the right track but I believe you have an algebraic mistake going between the two lines in the quote above. You factored things in a way that introduces some cross terms that shouldn't be there. For example
(r+Δr)2fR(r+Δr)-r2fR(r) ≠ ((r+Δr)2-r2)(fR(r+Δr)-fR(r))
since the right hand expression would have cross terms not in the left hand side. [Also, the RHS gives the wrong sign on one of the terms you do want.]

Instead you want to identify derivatives like [(r+Δr)2fR(r+Δr) - r2fR(r)]/Δr = ∂/∂r [r2fR]
Oh! Actually that makes perfect sense! A little while afterward I thought about the new solution I wrote down and saw that if the limit of (r+Δr)^2-r^2)/Δr is taken, you get 2r which isn't apart of the derived solution. The same thing can be said for the second term dealing with θ. Like you said, it really just is a simple algebraic mistake. I think I keep skipping a few steps because I know what I want to achieve. Well that and writing in Latex here and checking what is written over and over can be a lot of work with equations like these so I guess I was bound to overlook some error at some point.

It does make sense though and if I fix this simple algebraic error then I do believe that I have a correct derivation for divergence in spherical coordinates.

Thanks! :smile:
 

Related to Derive the divergence formula for spherical coordinates

1. What are spherical coordinates?

Spherical coordinates are a coordinate system used to locate points in three-dimensional space. They consist of a radial distance, an azimuth angle, and an inclination angle.

2. What is the divergence formula for spherical coordinates?

The divergence formula for spherical coordinates is given by:

∇ · F = 1/r² ( ∂(r²F_r)/∂r + (1/sinθ) ∂(sinθF_θ)/∂θ + (1/sinθ) ∂F_φ/∂φ )
where r is the radial distance, θ is the inclination angle, and φ is the azimuth angle.

3. How is the divergence formula derived for spherical coordinates?

The divergence formula for spherical coordinates can be derived using the definition of divergence and the chain rule. By expressing the gradient in terms of spherical coordinates and simplifying, we can arrive at the final formula.

4. What is the physical interpretation of the divergence formula in spherical coordinates?

The divergence formula in spherical coordinates represents the rate at which a vector field is expanding or contracting at a given point. It can also be interpreted as the net flow of the vector field through a small surface surrounding the point.

5. Why is it important to understand the divergence formula in spherical coordinates?

The divergence formula in spherical coordinates is useful in many scientific fields, such as fluid mechanics, electromagnetism, and quantum mechanics. It allows us to analyze vector fields in three-dimensional space and make predictions about their behavior. Understanding this formula is essential for solving complex problems and making accurate predictions in these fields.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
603
  • Calculus and Beyond Homework Help
Replies
9
Views
253
  • Calculus and Beyond Homework Help
Replies
2
Views
679
Replies
33
Views
3K
  • Calculus and Beyond Homework Help
Replies
5
Views
980
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
1K
Replies
1
Views
656
  • Calculus and Beyond Homework Help
Replies
10
Views
2K
Back
Top