[Math] Finding a vector field such that its curl equals a given vector field

calculuscurlmultivariable-calculusvector analysisVector Fields

Let $$g(x,y,z) = \frac{(x,y,z+1)}{(x^2+y^2+(z+1)^2)^{3/2}}$$ where $z \gt 0$. Find a vector field $f$, such that $$\nabla \times f = g$$

My attempt. I know that
$$\operatorname{curl}\vec f = \vec\nabla\times\vec f=\left(\frac{\partial f_z}{\partial y} – \frac{\partial f_y}{\partial z}\right)\hat x+\left(\frac{\partial f_x}{\partial z} – \frac{\partial f_z}{\partial x}\right)\hat y+\left(\frac{\partial f_y}{\partial x} – \frac{\partial f_x}{\partial y}\right)\hat z$$
for vector fields over $\mathbb{R}^3$. I'm trying to find $f=(f_x,f_y,f_z)$ which satisfies the following equations:

$$\frac{\partial f_z}{\partial y} – \frac{\partial f_y}{\partial z} = \frac{1}{(x^2+y^2+(z+1)^2)^{3/2}}$$

$$\frac{\partial f_x}{\partial z} – \frac{\partial f_z}{\partial x} = \frac{1}{(x^2+y^2+(z+1)^2)^{3/2}}$$

$$\frac{\partial f_y}{\partial x} – \frac{\partial f_x}{\partial y} = \frac{1+{1/z}}{(x^2+y^2+(z+1)^2)^{3/2}}$$

How can I work it out from here? Is there any usual way to do this? Or do I need to go on each $f_i$ and try finding how to make it satisfy the equations?

Best Answer

To make things easier, first change the $x,y,z$ coordinates to a new system of Cartesian coordinates $x',y',z'$ parallel to the original one but with the origin at $(0,0,-1)$, so $x'=x$, $y'=y$, $z'=z+1$. In the new coordinate system the vector $\vec g$ is:

$$\vec g = \frac{(x',y',z')}{(x^{\prime 2}+y^{\prime 2}+z^{\prime 2})^{3/2}} = \frac{\vec r}{r^3}\,,$$

where $\vec r=(x',y',z')$ is the radial vector field (from the new origin of coordinates) and $r$ its magnitude. This brings up the symmetry of the problem (and its physical connection; $\vec g$ is proportional to the electric field of a static electric charge at the new origin of coordinates, or to the the magnetic field produced by a Dirac's magnetic monopole at that point). Although you can work in Cartesian coordinates, to take advantage of the symmetry it is probably easier to work using standard spherical coordinates $r,\theta,\phi$, and that is what I am going to do, later converting back to Cartesian coordinates. Before we start it is a good idea to check that $\nabla\cdot\vec g=0$, otherwise the problem has no solution. But the divergence of this vector field is well known ($\vec g$ is essentially the gradient of the Green's function of the Poisson equation):

$$ \nabla\cdot\frac{\vec r}{r^3} = 4\pi\delta^3(\vec r)\,.$$

Although outside the origin the divergence is zero, because it is not zero everywhere in $R^3$, it is not possible to find a vector $\vec f$ that is non-singular everywhere $R^3$ minus the origin and such that $\nabla\times\vec f=\vec g$. However it is going to be possible to find $\vec f$ for the required region $z>0$. Note that the solution to this equation is far from unique, because adding to a solution any gradient also gives a solution. We need only to find one solution, all other solution are obtained form this one by adding an arbitrary gradient. To make the calculations easier we can impose some reasonable condition that will restrict the number of available solutions (physicsits call this to "fix the gauge"). For example, if you want to work in Cartesian coordinates you could require your solution to have $f_z=0$ (physicists call this choice the "axial gauge"). Because $\vec g$ is radial, and the radial component of $\vec f$ does not contribute to it, I am going to make the radial component of $\vec f$, $f_r$ equal to zero. With this choice, using the expression of the curl in spherical coordinates we have for $f_\theta$ and $f_\phi$:

$$ \begin{align} \frac{1}{r\sin{\theta}}\left[\frac{\partial}{\partial\theta}\left(\sin\theta f_\phi\right)-\frac{\partial f_\theta}{\partial\phi}\right] &= \frac{1}{r^2} \\ \frac{\partial}{\partial r}\left(rf_\phi\right) &= 0 \\ \frac{\partial}{\partial r}\left(rf_\theta\right) &= 0 \end{align} $$

The last two equations show that in this gauge ($f_r=0$), $f_\theta$ and $f_\phi$ have to be proportional to $1/r$, which makes also the radial part of the first equation correct. In fact, with this in mind, it is easily seen by inspection of the first equation that the following choice is a solution:

$$f_\phi = \frac{C-\cos\theta}{r\sin\theta},~~f_\theta = 0\,,$$

where $C$ is some constant. Because we want the solution to be valid if $z>0$ we must choose $C=1$. In other words, if $\hat u_\phi$ is the unit vector along the $\phi$ direction, then:

$$\vec f = \frac{1-\cos\theta}{r\sin\theta}\hat u_\phi$$

is a solution to the problem in spherical coordinates. The only thing that remains is to convert back to Cartesian coordinates. If $\hat u_x, \hat u_y, \hat u_z$ are the unit vectors along the Cartesian axes (old and new!), and using: $$\hat u_\phi = -\sin\phi\,\hat u_x+\cos\phi\,\hat u_y$$

and

$$\cos\phi = \frac{x'}{r\sin\theta},~~\sin\phi = \frac{y'}{r\sin\theta}, ~~\cos\theta = \frac{z'}{r},~~r^2\sin^2\theta = x'^2+y'^2$$

we get:

$$\vec f = \frac{y'(z'-r)}{r(x'^2+y'^2) }\hat u_x -\frac{x'(z'-r)}{r(x'^2+y'^2) }\hat u_y\,.$$

Reverting to the original $x,y,z$ coordinate system (just replace $x'~y'$ by $x~y$, and $z'$ by $z+1$) we get the final answer:

$$\vec f = \frac{y(z+1-r)\,\hat u_x-x(z+1-r)\,\hat u_y}{r(x^2+y^2)}$$

with

$$ r=\sqrt{x^2+y^2+(z+1)^2}\,.$$

Note that this solution satisfy the physicists "axial gauge" $f_z=0$, although I was not looking for it. Also note that this solution is regular for $z>-1$, as required, and becomes singular in the half line $x=y=0, z<=-1$.

Related Question