# Spherical coordinate of a vector when divergence of the vector is zero

$$\nabla \cdot \mathbf{\delta u_{perp}} = 0$$ where $$\mathbf{\delta u_{perp}}$$ is a function of both x and y coordinates and perpendicular to z axis. Moreover, $$\delta u_{perp}$$ along z axis is $$0$$.
I need to prove that in spherical coordinates $$\mathbf{\delta u_{perp}} = \delta u (-\sin \phi, \cos \phi)$$

I was trying : Let's consider the vector field $$\mathbf{\delta u_{perp}}$$ in Cartesian coordinates, where $$\mathbf{\delta u_{perp}} = (\delta u_x, \delta u_y, \delta u_z)$$. Given that $$(\nabla \cdot \mathbf{\delta u_{perp}} = 0)$$, we can express the divergence in Cartesian coordinates as:

$$\nabla \cdot \mathbf{\delta u_{perp}} = \frac{\partial \delta u_x}{\partial x} + \frac{\partial \delta u_y}{\partial y} + \frac{\partial \delta u_z}{\partial z} = 0$$

Since $$(\mathbf{\delta u_{perp}})$$ is only a function of $$(x)$$ and $$(y)$$ and is zero along the $$(z)$$-axis, the partial derivative with respect to $$(z)$$ is zero, i.e., $$(\frac{\partial \delta u_z}{\partial z} = 0)$$.

Now, expressing the vector field $$(\mathbf{\delta u_{perp}})$$ in spherical coordinates $$((r, \theta, \phi))$$. The spherical coordinates are related to Cartesian coordinates as follows:

$$x = r \sin \theta \cos \phi$$ $$y = r \sin \theta \sin \phi$$ $$z = r \cos \theta$$

Expressing the Cartesian components of $$(\mathbf{\delta u_{perp}})$$ in terms of spherical coordinates as $$(\delta u_x = \delta u_r \sin \theta \cos \phi)$$, $$(\delta u_y = \delta u_r \sin \theta \sin \phi)$$, and $$(\delta u_z = \delta u_r \cos \theta)$$, where $$(\delta u_r)$$ is the radial component.

Now, the divergence in spherical coordinates:

\begin{align} \nabla \cdot \mathbf{\delta u_{perp}} &= \frac{1}{r^2} \frac{\partial}{\partial r}(r^2 \delta u_r \sin \theta \cos \phi) + \frac{1}{r \sin \theta} \frac{\partial}{\partial \theta}(\delta u_r \sin \theta \cos \phi) \\ &\quad + \frac{1}{r \sin \theta} \frac{\partial}{\partial \phi}(\delta u_r \sin \theta \sin \phi) \end{align}

Now, we need to evaluate these partial derivatives and set the result equal to zero to satisfy $$(\nabla \cdot \mathbf{\delta u_{perp}} = 0)$$. Since the original problem statement provides a specific solution, we can check if the given solution is consistent with the requirement $$(\nabla \cdot \mathbf{\delta u_{perp}} = 0)$$.

Given $$(\nabla \cdot \mathbf{\delta u_{perp}} = 0)$$, we find that:

$$\frac{1}{r^2} \frac{\partial}{\partial r}(r^2 \delta u_r \sin \theta \cos \phi) + \frac{1}{r \sin \theta} \frac{\partial}{\partial \theta}(\delta u_r \sin \theta \cos \phi) + \frac{1}{r \sin \theta} \frac{\partial}{\partial \phi}(\delta u_r \sin \theta \sin \phi) = 0$$

Now, how can I prove $$(\mathbf{\delta u_{perp}} = \delta u (-\sin \phi, \cos \phi))$$?

• Is $\delta u$ supposed to be the magnitude of $\delta\mathbf{u}_\text{perp}$? Dec 30, 2023 at 15:42
• Can you take the derivative yourself and post what you get? Dec 30, 2023 at 16:02
• @KyleKanos, $\delta u = |\mathbf{\delta u}|$. $\delta u_{perp}$ is in the x-y plane where $\delta u _ z = 0$. Thanks Dec 31, 2023 at 21:08

I follow what you are doing up until this point:

Expressing the Cartesian components of $$(\mathbf{\delta u_{perp}})$$ in terms of spherical coordinates as $$(\delta u_x = \delta u_r \sin \theta \cos \phi)$$, $$(\delta u_y = \delta u_r \sin \theta \sin \phi)$$, and $$(\delta u_z = \delta u_r \cos \theta)$$, where $$(\delta u_r)$$ is the radial component. Now, the divergence in spherical coordinates: \begin{align} \nabla \cdot \mathbf{\delta u_{perp}} &= \frac{1}{r^2} \frac{\partial}{\partial r}(r^2 \delta u_r \sin \theta \cos \phi) + \frac{1}{r \sin \theta} \frac{\partial}{\partial \theta}(\delta u_r \sin \theta \cos \phi) \\ &\quad + \frac{1}{r \sin \theta} \frac{\partial}{\partial \phi}(\delta u_r \sin \theta \sin \phi) \end{align}

It looks like you've inserted $$\delta u_x$$ into the divergence equation and ignored the other components (which is wrong in two different ways). What you should do instead is write only the spherical components of vector here: $$\nabla \cdot \delta\mathbf{u}_\text{perp} = \frac{1}{r^2} \frac{\partial}{\partial r}(r^2 \delta u_r) + \frac{1}{r \sin \theta} \frac{\partial}{\partial \theta}(\delta u_\theta \sin \theta)+\frac{1}{r \sin \theta} \frac{\partial}{\partial \phi}(\delta u_\phi)$$ And then find the components $$\delta u_r,\,\delta u_\theta,\,\delta u_\phi$$ necessary to find this sum being zero and that $$\partial_z\delta\mathbf{u}_\text{perp}=0$$.

But that's doing it the hard way. The easier way is start with the divergence in Cartesian coordinates, $$\nabla\cdot\delta \mathbf{u}_\text{perp}=\frac{\partial\delta u_x}{\partial x}+\frac{\partial\delta u_y}{\partial y}+\frac{\partial\delta u_z}{\partial z}=0$$ Since you know that $$\delta\mathbf{u}_\text{perp}$$ is a function of the form $$f(x,y)$$, then, as you point out, $$\partial_z\delta u_z=0$$, and you are left with requiring that, $$\frac{\partial\delta u_x}{\partial x}+\frac{\partial\delta u_y}{\partial y}=0\tag{1}$$ The simplest solution would be that $$\delta u_x\propto y$$ and $$\delta u_y\propto x$$ so that the derivatives are each zero and then easily sums to zero. Other possible solutions would allow for non-zero derivative components, for example $$\delta u_x=x^2y$$ and $$\delta u_y=-y^2x$$ so that both derivatives are non-zero and sum to zero.

In either case, once you have a potential solution to Eq (1), you can transform it from Cartesian coordinates into spherical ones and compare. Of course, you should also verify it is correct by inserting the spherical form into the spherical-coordinate divergence equation.

• Thank you so much! Dec 30, 2023 at 18:52
• @Tasnim: The StackExchange model uses upvotes and accepts as ways to say thanks, rather than just comments. Dec 30, 2023 at 19:58