# Divergence in cylindrical/spherical coordinates

Tags:
1. Sep 14, 2014

### deedsy

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

I'm just having trouble understanding a step in my notes from class.. We're talking about how to derive the divergence in other coordinate systems.

2. Relevant equations

So, we are deriving this divergence formula in spherical coordinates

$\oint \vec{A}\cdot d\vec{A} = \int (∇ \cdot \vec{A}) dv$

3. The attempt at a solution

To do that, we create a small unit of spherical-like volume, and see it's contribution to $\oint \vec{A}\cdot d\vec{A}$. We'll need to do this for all 6 faces of this small volume...and added together, it will give us the divergence formula in spherical coordinates.

So, for our small volume we use in spherical coords, we found that the contribution from the $\pm \hat{r}$ faces was $[\frac{\partial A_r}{\partial r} + \frac{2 A_r}{r_0}] r_0^2 sin(\theta_0) dr d\theta d\phi$ ---> which is our $\int (∇ \cdot \vec{A}) dv$ for these 2 faces

Now when you look at the r-component of the divergence in spherical coordinates online, you'll see this written as
$(∇ \cdot \vec{A})_\hat{r} = \frac{1}{r^2} \frac{\partial (r^2 A_r)}{\partial r}$

In my notes, we did write it this way in the next step, but I guess I missed why you could re-write it that way. I'm thinking it should be easy (since it's just one step to get there)

Last edited: Sep 14, 2014
2. Sep 14, 2014

### Staff: Mentor

Try working it backward ie take the partial of r^2A sub r and what do you get?

The r^2sin(theta)drdthetadphi is the dv piece