# Green's function solution in 2D for the potential of solenoids in the Lorenz gauge

My main goal is to find a general expression for the potential in the Lorenz gauge of some solenoidal (not necessarily circular) current density using the Green's function. I assume that the current density does not necessarily have some azimuthal symmetry, but it is $$z$$-independent (defined in the direction of the axis of the solenoid). I was hoping to reduce it to 2D by taking a slice of the 3D case ($$xy$$-plane, assuming symmetry along $$z$$) but the known Laplacian Green's function in 2D diverges logarithmic at infinity. The potential then takes the form $$A^\mu (\vec{x}) = \frac{1}{2\pi}\int d^2\vec{x}' J^\mu(\vec{x}')\ln\left(\frac{|\vec{x} - \vec{x}'|}{R}\right) \tag{1}$$ where we confine the space within some sufficiently large disk of radius $$R$$. Without $$R$$, the potential would just diverge.

As a check, I tried to apply this to an infinitely long solenoid with radius $$r_0$$, the solution of which is known to be $$A^i(x) = \Theta(r-r_0)\frac{I}{2}\frac{r_0^2}{r} + \Theta(r_0 - r)\frac{I}{2}r \tag{2}$$ which is only in the $$\hat{\phi}$$ direction in polar coordinates. However, if we use (1) for the current density of an infinitely long solenoid, it does not give the known solution in (2). Moreover, the resulting magnetic field outside the solenoid is non-zero (which has to be).

What I do know is that in order to use the Green's function solution for the vector potential in the Lorenz gauge, the Green's function must vanish on the boundary, such that if the surface integral vanishes, then the Lorenz gauge condition is satisfied iff the divergence of the current is zero (which is what we want).

As far as what I've searched, I have not found any similar answer. So my questions are,

• does a 2D green's function exist that meets the criteria of the Lorenz gauge?
• does any body know an existing solution to this problem using Green's function?
• is there a different gauge that can be used?
• can I form an ansatz around the known $$r$$-dependence (in the case of an ideal infinitely long solenoid) inside and outside the solenoid to more general solenoidal current densities (at least for those with $$\phi$$-dependence)?
• Or is there any way (even without using Green's functions) to arrive at an expression for the vector potential for a solenoid-like current density (at least with $$z$$-independence)? As long as the current is conserved, the potential can be written in terms of a multipole expansion, and it arrives at (2) for an ideal solenoid.

Any help is appreciated! Thanks so much in advance! ^_^

EDIT: What I did is the following. For an infinitely long solenoid of radius $$r_0$$, I model the current as $$J^{i}(\vec{x}') = \frac{I\delta(r'-r_0)}{r'}\hat{\phi}$$ for some constant $$I$$.

I then checked what the vector potential would be while expanding the Green's function. $$\ln|\vec{x}-\vec{x}'| = \ln r_> - \sum_m^\infty \frac{1}{m}\left(\frac{r_<}{r_>}\right)^m \cos[m(\phi-\phi')]$$ Reducing the problem to 2D (assuming $$z$$-independence) $$A^i (\vec{x}) = \frac{1}{2\pi}\Theta(r-r_0)\left\{\ln \left(\frac{r}{R}\right) \int d^2 \vec{x}' J^i(\vec{x}') - \sum_m^\infty \frac{1}{mr^m} \int d^2 \vec{x}' J^i(\vec{x}') r'^m\cos[m(\phi-\phi')]\right\} + \frac{1}{2\pi}\Theta(r_0-r)\left\{ \int d^2 \vec{x}' J^i(\vec{x}')\ln \left(\frac{r'}{R}\right) - \sum_m^\infty \frac{r^m}{m} \int d^2 \vec{x}' J^i(\vec{x}')\frac{\cos[m(\phi-\phi')]}{r'^m}\right\}$$

$$A^i (\vec{x}) = \frac{1}{2\pi}\Theta(r-r_0)\left\{\ln \left(\frac{r}{R}\right) \int_0^R r' dr' \int_0^{2\pi} d\phi' \frac{I\delta(r'-r_0)}{r'} - \sum_m^\infty \frac{1}{mr^m} \int_0^R r' dr' \int_0^{2\pi} d\phi' \frac{I\delta(r'-r_0)}{r'} r'^m\cos[m(\phi-\phi')]\right\} + \frac{1}{2\pi}\Theta(r_0-r)\left\{ \int_0^R r' dr' \int_0^{2\pi} d\phi' \frac{I\delta(r'-r_0)}{r'}\ln \left(\frac{r'}{R}\right) - \sum_m^\infty \frac{r^m}{m} \int_0^R r' dr' \int_0^{2\pi} d\phi' \frac{I\delta(r'-r_0)}{r'}\frac{\cos[m(\phi-\phi')]}{r'^m}\right\}$$

And because of the cosines, the higher multipoles become 0, only leaving the monopole terms:

$$A^i(\vec{x}') = \frac{1}{2\pi}\Theta(r-r_0)\ln \left(\frac{r}{R}\right) \int_0^R r' dr' \int_0^{2\pi} d\phi' \frac{I\delta(r'-r_0)}{r'} + \frac{1}{2\pi}\Theta(r_0-r) \int_0^R r' dr' \int_0^{2\pi} d\phi' \frac{I\delta(r'-r_0)}{r'}\ln \left(\frac{r'}{R}\right)$$

$$A^i(\vec{x}') = \Theta(r-r_0)I\ln \left(\frac{r}{R}\right) + \Theta(r_0-r) I\ln \left(\frac{r_0}{R}\right)$$

• In the 3D case, the relation between J and A (in Lorenz gauge) is given by the retarded potential. See en.wikipedia.org/wiki/Retarded_potential#In_the_Lorenz_gauge
– Bio
Commented May 2 at 3:35
• Hi @Bio! Thanks for the help! Does the form of the Green's function here also solve the 2D Poisson equation with the 2D Laplacian? As far as I know I don't think it does, although I haven't really carried out the calculation explicitly myself. All that I know is that Green's function for the 2D laplacian varies with $\ln r$, which is divergent at infinity. I can perhaps regularize the divergence by confining the space within some disk of radius R such that when $r = R, G = 0$. But despite this, it doesn't really give the correct magnetic field, which is supposed to be 0 outside the solenoid. Commented May 2 at 7:00

There are some wrong assumptions here. Firstly, your integral (1) actually does give answer (2), how did you find the opposite conclusion?!

Also, the fact that the Green function diverges at infinity is irrelevant if you evaluate the field at finite $$r$$. Actually, including $$R$$ in the Green function does not help you to change the fact that it diverges at infinity, but it is of course allowed since it adds only a constant.

Adding a constant will in fact not change integral (1) since the current will change sign if you integrate around the loop (for a circular current that is trivial to see, it gives $$\cos\phi$$ so the constant in $$G$$ would drop out).

So the first 3 questions of the list have simply answer "yes".

As for the more general solenoidal current densities, you can of course use a multipole expansion as you propose. But it is a but unclear what the purpose would be, because for each deformed circle shape the magnetic field would still be zero outside the solenoid, and uniform along the $$z$$-axis within the solenoid.

[EDIT] PS: To compute things you can use Mathematica with some help:

(*  Compute |r'-r| after making r'=1 by scaling *)
r21=Sqrt[(r-Cos[p])^2+Sin[p]^2]
As=Assumptions->{r>1}

Integrate[Log[r21], {p,0,2Pi}, As]
(*  OK: Out[4]= 2 Pi Log[r]  *)

Integrate[Cos[p] Log[r21], {p,0,2Pi}, As]
(*  This seems to work. If not, first take derivative
as in the following:   *)
Id=Integrate[Cos[p] D[ Log[r21], r ] , {p,0,2Pi}, As]
(*  then anti-derivative:  *)
Integrate[Id,r]
(* Result is:
Pi
Out[10]= -(--)
r
*)

• Hi @Jos Bergervoet! Thank you very much for your reply. It's reassuring to know that an answer exists to my problem and perhaps it is a mistake on my end. Let me explain what I did. To verify that it works for an infinitely long solenoid, I assumed my current density is $$J^\mu = \frac{I \delta(r' - r_0)}{r'}$$. If, for example, I expand $\ln |\vec{x}-\vec{x}'|$, the first term is $\ln r_{>}$. So when I look outside the solenoid $r > r'$, it comes out of the integral, and I am left with $\ln r$ for the potential. Could you please point out which of these assumptions are incorrect? Commented May 2 at 8:28
• Your lhs is a 4-vector $J^{\mu}$, but the rhs does not have 4 components! Actually that rhs describes a uniform charge so you are computing the electirc potential of a charged cylinder and you then (correctly) find the $\ln r$ result. But for the current you should just pick one component, for instance $J^1$ to compute, and then the rhs will have $\delta(r'-r_0)\cos\varphi$ in it. Commented May 2 at 8:54
• Oh my mistake for the confusion. I meant to write that it is a 4-vector with only a $\phi$ component. But for an infinitely (circular) long solenoid does there have to be a $\cos \phi$ in the current density? Or is this in Cartesian coordinates? I did the integration in polar coordinates. Should I have performed the integration in Cartesian coordinates? Commented May 2 at 9:00
• Polar is fine, but indeed the $\cos\varphi$ is there, currents on opposite sides have different sign, they must have different physical effect whatever you do to integrate them. Commented May 2 at 9:16
• I apologize if I'm being too incessant, won't the $\cos\phi$ just result in 0? I do assume that there is a constant current distributed on the surface of the solenoid. Does the current density I provided correctly model the problem? The way I see it now, I'm not sure if (1) would result into (2) because of the delta function, which would result into just the same function evaluated at $r_0$ isn't it? Commented May 2 at 12:49