# Smarter way to solve a continuity equation?

1. Sep 29, 2010

### stufletcher

1. The problem statement, all variables and given/known data
The density in 3-D space of a certain kind of conserved substance is given by
$$$\rho (x,y,z, t) = At^{-\frac{3}{2}}e^{-\frac{r^2}{4kt}}$$$

where $$\mathbf r = x\mathbf i + y\mathbf j +z\mathbf k$$ and $$r = |\mathbf r|$$. The corresponding flux vector is given by
$$\mathbf J(\mathbf r, t) = Bt^{-\frac{5}{2}}e^{-\frac{r^2}{4kt}}\mathbf r$$
Here, A, B, k and positive constants.

2. Relevant equations

Show that $$\rho, \mathbf J$$ satisfy the conservation equation $$\frac{\partial \rho}{\partial t}$$$$+ \nabla \cdot \mathbf J = 0$$ only if $$A = 2B$$

3. The attempt at a solution
So I've looked at this, found the derivative for the density function, had a fair play with the div function, i'm just wondering if there is a smarter way to solve this then actually deriving the partial derivative and the div function and re-arranging? I have a feeling there is something inherent, for example like the divergence theorum, that i can use?

mind you in the time it took me to get the tex working i could have solved the thing, but i'm still curious

Last edited: Sep 29, 2010
2. Sep 29, 2010

One smarter way would be by using (first understanding the derivation, of course) Eqs. (49,50) from the entry "http://mathworld.wolfram.com/SphericalCoordinates.html" [Broken]".

Last edited by a moderator: May 5, 2017
3. Sep 29, 2010

### stufletcher

Hmm. To be honest I dont know where to start. For example, how to i manage the position vector? Do i replace x, y, z with $$r cos \theta sin \phi$$ etc, then do the divergence? It starts to look very messy ... $$t^{-\frac{5}{2}}e^{-\frac{r}{4kt}} r cos \theta sin \phi$$ for the x component for example

4. Sep 30, 2010

$$r$$ in the exponential is not the position vector. It is its length - one of the coordinates of the spherical system. It will stay as such. $$\theta,\phi$$ simply do not appear in the formula - which simplifies the calculations.