1 Introduction

Magnetic fields created by current flows are the vector fields of particular interest and importance in physics. They appear in several branches of sciences such as electrical engineering [2], spectroscopy [6], medicine [8].

In order to define a magnetic field, mathematically consider a smooth curve \(L\subset \mathbb{R }^3\), parameterized by the map \(l:I\ni \tau \rightarrow l(\tau )\in \mathbb{R }^3\), where \(I\subset \mathbb{R }\) is an interval, \(L\) represents the electric wire, and \(J\) is the current intensity associated with it. Using the Biot–Savart law [4], we can compute the magnetic field \(\mathbf{B}\) generated by a steady current associated with a current distribution \((L,J)\) as follows:

$$\begin{aligned} \mathbf{B}(\mathbf{r})=\frac{\mu _{0}J}{4\pi }\int \limits _{I}\frac{l^{\prime }(\tau ) \times (\mathbf{r}-l(\tau ))}{|\mathbf{r}-l(\tau )|^3}\mathrm d \tau , \end{aligned}$$
(1)

where \(\mu _0\) is a magnetic constant, which is the value of the magnetic permeability in a classical vacuum, \(l^{\prime }(\tau )=\mathrm d l/\mathrm d \tau , |\cdot |\) represents the Euclidean norm in \(\mathbb{R }^3\), and \(\times \) represents the vector product. A magnetic field \(\mathbf{B}\) created by a configuration \((L_1,J_1),\cdots ,(L_n,J_1)\) is obtained via linear superposition, that is, \(\mathbf{B}=\mathbf{B}_1+\cdots +\mathbf{B}_n\), where each \(\mathbf{B}_i\) is obtained from the Biot–Savart law (1). Consequently, the resulting vector field \(\mathbf{B}\) is defined everywhere in \(\mathbb{R }^3\setminus (\bigcup _{i=0}^{n} L_i)\).

It is well known that in general, magnetic field lines can be very complicated, for example, they can be knotted, quasi–periodic and give rise to Hamiltonian chaos. As it was pointed out by some authors [3, 5], it is still believed that magnetic fields created by wires cannot be too complicated, especially the ones induced by a planar rectilinear configuration. This belief, and some calculations performed by Stefanescu [7] motivated him to state the following conjecture.

Stefanescu’s conjecture [7]: There exists an algebraic first integral for any magnetic field originated by a configuration of piecewise rectilinear wires.

For a definition of the first integral, see Sect. 2.

In what follows using the example of the vector field induced by three planar configurations of rectilinear wires (see Fig. 1),

Fig. 1
figure 1

Magnetic lines of the Biot–Savart vector fields induced by three planar rectilinear configuration of wires

we prove that it does not admit an analytic first integral globally defined, contradicting Stefanescu conjecture in the analytic category.

The following theorem is our main result:

Theorem 1

The magnetic field \(\mathbf{B}\) associated with the rectilinear wires on the x = 0 plane with a unit current flow given by

$$\begin{aligned}&L_1=\{x=0,\,\,\,y=-1\},\,\,\quad \mathrm{in \,the \,positive} \,z \,\mathrm{direction},\\&L_2=\{x=0,\,\,\,y=1\},\qquad \,\, \mathrm{in \,the \,negative} \,z \,\mathrm{direction},\\&L_3=\{x=0,\,\,\,z=0\},\qquad \,\, \mathrm{in \,the \,positive} \,y \,\mathrm{direction}, \end{aligned}$$

does not admit a global real analytic first integral.

The knowledge of the first integrals of a vector field is very useful in order to understand the topological structure of the orbits. It can also be viewed as a measure of complexity of this structure. Thus, our main result confirms that a magnetic field induced even by a planar configuration of wires is not as simple as it was thought first (see [5] and [7]).

We conclude this introduction with some general remarks about the integrability of magnetic fields created by planar configuration of wires.

It is clear that the Biot–Savart magnetic field created by a straight line wire, which we assume is perpendicular to the \(z=0\) plane, has two independent polynomial first integrals: \(F_1(x, y, z)=z\) and \(F_2(x, y, z)=x^2+y^2\). Also, if a magnetic field is created by two rectilinear wires, then there is always at least one polynomial first integral. Finally, magnetic fields created by planar configuration of wires possess two independent smooth first integrals in a sufficiently small tubular neighborhood of each current line, provided that the tubular neighborhood does not enclose any non-regular point (see [1, Corollary 1]). This is only a local result and does not say anything about the existence of the global first integral.

Finally, we point out that our main theorem does not contradict the existence of an algebraic but non-polynomial first integral. Thus, we conjecture the following.

Conjecture: The magnetic field induced by the configuration given in Theorem 1 does not admit a rational first integral.

In the following section, we prove Theorem 1 which is our main result.

2 Proof of Theorem 1

Before proving our main result, we introduce an auxiliary statement that we shall use. Consider

$$\begin{aligned} \dot{\mathbf{x}}=f(\mathbf{x}),\quad {\mathbf{x}}=(x_1,...,x_n)\in \mathbb{C }^n, \end{aligned}$$
(2)

where \(f(\mathbf{x})=(f_1(\mathbf{x}),\ldots ,f_n(\mathbf{x}))\) is an \(n\)–dimensional vector–function such that \(f(\mathbf{0})=\mathbf{0}\). We say that a non-constant analytic function \(H:U \rightarrow \mathbb C \), where \(U\) is an open connected subset of \(\mathbb C ^n\), is the analytic first integral of (2) if

$$\begin{aligned} \sum _{i=1}^{n}f_i(\mathbf{x})\frac{\partial H}{\partial x_i}\equiv 0. \end{aligned}$$

When \(U\) is an open connected subset of \(\mathbb R ^n\) and \(H:U \rightarrow \mathbb R \), we say that it is a real analytic first integral.

Lemma 2

System

$$\begin{aligned} \dot{x}=-2(x^2+z^2)+z(x^2+1),\quad \dot{z}=-x(x^2+1). \end{aligned}$$
(3)

has no global real analytic first integrals.

Proof

We proceed by contradiction. Assume that \(h=h(x,z)\) is a global real analytic first integral. We set \(X=x^2 +z^2\) and \(Z=z\). Then, we have that system (3) becomes

$$\begin{aligned} \dot{X} = \mp 4 \sqrt{X-Z^2} X, \quad \dot{Z} = \mp \sqrt{X-Z^2}( X -Z^2 +1). \end{aligned}$$

Moreover, if we set \(H=H(X,Z)=h(x,z)\), we have that \(H\) satisfies

$$\begin{aligned} 4 X \frac{\partial H}{\partial X} + (X-Z^2 +1) \frac{\partial H}{\partial Z} =0. \end{aligned}$$

Solving this partial differential equation, we get that

$$\begin{aligned} H= K\left( \frac{e^{-\sqrt{X}} (1+\sqrt{X} + Z)}{\sqrt{X}-Z-1} \right), \end{aligned}$$

where \(K\) is any function of \(\frac{e^{-\sqrt{X}} (1+\sqrt{X} + Z)}{\sqrt{X}-Z-1}\). Therefore, we obtain the following first integral of the restricted system (3)

$$\begin{aligned} h(x,z)=K \left(\frac{e^{-\sqrt{x^2+z^2}} (1+\sqrt{x^2+z^2} + z)}{\sqrt{x^2+z^2}-z-1} \right). \end{aligned}$$

It is easy to check that the function

$$\begin{aligned} F=\frac{e^{-\sqrt{x^2+z^2}} \left(1+\sqrt{x^2+z^2} + z\right)}{\sqrt{x^2+z^2}-z-1}=\frac{e^{-\sqrt{x^2+z^2}}\left(1+\sqrt{x^2+z^2} + z\right)^2}{x^2-2z-1} \end{aligned}$$

is not globally defined, and \(1/F\) is not analytic at the origin; thus, there is no global analytic first integral. This completes the proof of the lemma. \(\square \)

Proof of Theorem 1

We shall consider a magnetic field created by \(L_1, L_2\) and \(L_3\), with the unit current flows in the positive \(z\) direction for \(L_1\), in the negative \(z\) direction in \(L_2\) and in the positive \(y\) direction in \(L_3\). Then, the Biot–Savart law gives us \(\mathbf{B}=\mu _0/2\pi (B_x,B_y,B_z)\), where

$$\begin{aligned} B_x&= \frac{-(y+1)}{x^2+(y+1)^2}+\frac{y-1}{x^2+(y-1)^2}+ \frac{z}{x^2+z^2},\nonumber \\ B_y&= \frac{x}{x^2+(y+1)^2}-\frac{x}{x^2+(y-1)^2},\\ B_z&= \frac{-x}{x^2+z^2}\nonumber \end{aligned}$$
(4)

(we recall that we do not use directly Biot–Savart law. Notice that the vector field \(B=(B_x,B_y,B_z)\) is given by three straight lines. Using superposition, we obtain that \(B=B_1+B_2+B_3\) where each \(B_j\) for \(j=1,2,3\) is the vector field associated with only one infinite straight line. To compute \(B_j\) for each \(j=1,2,3\), we use a well-known theorem given in the classical book [4]).

Doing a simple rescaling of the time in the vector field \(\mathbf{B}\) (i.e., setting \(d t = (x^2 +(y+1)^2)(x^2 +(y-1)^2)(x^2+z^2) \, d \tau \) ) which does not affect the integrability, and writing this vector field as a system of differential equations, we get

$$\begin{aligned} \dot{x}&= 2\left(x^2+z^2\right)\left(y^2-x^2-1\right)+z\left[x^2+(y+1)^2\right]\left[x^2+(y-1)^2\right],\nonumber \\ \dot{y}&= -4xy\left(x^2+z^2\right),\\ \dot{z}&= -x\left[x^2+(y+1)^2\right]\left[x^2+(y-1)^2\right].\nonumber \end{aligned}$$
(5)

We shall prove that system (5) does not admit an analytic first integral.

We note that \(y=0\) is an invariant plane of system (5). If \(h=h(x,y,z)\) is an analytic first integral of system (5), it can be written in the form \(h(x,y,z)=h_0(x,z) + y g(x,y,z)\) where \(h_0\) and \(g\) are analytic functions in their variables. Furthermore, without loss of generality, we can assume that \(h_0\) is either zero or an analytic first integral of system (5) restricted to \(y=0\).

Consider the restriction of (5) to \(y=0\), that is,

$$\begin{aligned} \dot{x}=-2\left(x^2+z^2\right)\left(x^2+1\right)+z\left(x^2+1\right)^2,\quad \dot{z}=-x\left(x^2+1\right)^2. \end{aligned}$$

Rescaling the time variable by \((x^2+1)\) (i.e., setting \(d\tau = (x^2+1) \, dt\)), we get system (3). In view of Lemma 2, we obtain that it has no global analytic first integrals.

Hence, if \(h\) is an analytic first integral of system (5), it can be written in the form \(h(x,y,z)=yg(x,y,z)\), where \(g\) is an analytic function in the variables \((x,y,z)\). We write \(g\) as a formal power series in the variable \(y\) as

$$\begin{aligned} g(x,y,z)=\sum _{j\ge 0} g_j(x,z) y^j, \end{aligned}$$

where each \(g_j\) is a formal power series in the variables \((x,z)\). Then, substituting \(h\) in (5) and canceling out \(y\), we get that \(g\) satisfies the following relation:

$$\begin{aligned} A(x,y,z)\frac{\partial g}{\partial x} -4xy(x^2+z^2)\frac{\partial g}{\partial y}-B(x,y,z) \frac{\partial g}{\partial z} - 4 x (x^2 +z^2) g=0, \end{aligned}$$
(6)

where

$$\begin{aligned} A(x,y,z)&= 2\left(x^2+z^2\right)\left(y^2-x^2-1\right)+z\left[x^2+(y+1)^2\right]\left[x^2+(y-1)^2\right],\\ B(x,y,z)&= x\left[x^2+(y+1)^2\right]\left[x^2+(y-1)^2\right]. \end{aligned}$$

We will show that \(g=0\). We proceed by contradiction. We assume that \(g \ne 0\), and we consider two complementary cases:

Case 1: g is not divisible by y. In this case, we have that \(g_0=g_0(x,z)\ne 0\), and \(g_0\) satisfies (6) restricted to \(y=0\), that is,

$$\begin{aligned} \left(x^2+1\right)\left[z\left(x^2+1\right)-2\left(x^2+z^2\right)\right]\frac{\partial g_0}{\partial x}-x\left(x^2+1\right)^2\frac{\partial g_0}{\partial z}-4x\left(x^2+z^2\right) g_0=0. \nonumber \\ \end{aligned}$$
(7)

It follows from (7) that \(g_0\) must be divisible by \((x^2+1)\). Therefore, it is of the form \(g_0=(x^2 +1)^m f\), with \(m \ge 1\) and \(f=f(x,z)\) is a formal power series in its variables. Then, introducing \(g_0\) in (7) and canceling out \((x^2+1)^m\), we get that \(f\) satisfies the following equation:

$$\begin{aligned} -\left(x^2+1\right)\left[2\left(x^2+z^2\right)-z\left(x^2+1\right)\right] \frac{\partial f}{\partial x} -x\left(x^2+1\right)^2 \frac{\partial f}{\partial z} - E(x,z)f=0, \end{aligned}$$
(8)

where

$$\begin{aligned} E(x,z)=2mx(1+x^2)z-4(1+m)x(x^2 + z^2). \end{aligned}$$

From (8), we deduce that \(f\) must be divisible by \((x^2+1)\). Proceeding inductively, we conclude that \(g_0\) must be divisible by \(x^2 +1\) infinitely many times and hence \(g_0=0\).

Case 2: g is divisible by y. In this case, we have that \(g_0=\cdots =g_{m-1}=0\) and

$$\begin{aligned} g=\sum _{j\ge m} y^j g_j(x,z)=y^m \sum _{j \ge 0} g_{m+j} y^j=y^m G,\qquad m \ge 1, \end{aligned}$$

where

$$\begin{aligned} G=G(x,y,z)=\sum _{j \ge 0} g_{m+j} y^j. \end{aligned}$$

We note that \(g_m=G(x,0,z)\). Then, imposing that \(g\) satisfies (6) and simplifying by \(y^m\), we obtain

$$\begin{aligned} A(x,y,z)\frac{\partial G}{\partial x}-4xy(x^2+z^2)\frac{\partial G}{\partial y}-B(x,y,z) \frac{\partial g}{\partial z} -4(m+1)x(x^2+z^2)G=0. \end{aligned}$$
(9)

Restricting (9) to \(y=0\), we get that \(g_m\) satisfies

$$\begin{aligned} (x^2+1)[z(x^2+1)-2(x^2+z^2)]\frac{\partial g_m}{\partial x} -x(x^2+1)^2 \frac{\partial g_m}{\partial z}-4(m+1)x(x^2+z^2) g_m=0. \nonumber \\ \end{aligned}$$
(10)

It follows from (10) that \(g_m\) must be divisible by \((x^2+1)\). Therefore, it is of the form \(g_m=(x^2 +1)^l f\), with \(l \ge 1\) and \(f=f(x,z)\) is a formal power series in its variables. Introducing \(g_m\) in (10) and canceling out \((x^2+1)^l\), we get that \(f\) satisfies the following equation:

$$\begin{aligned} -(x^2+1)[2(x^2+z^2)-z(x^2+1)]\frac{\partial f}{\partial x} -x(x^2+1)^2 \frac{\partial f}{\partial z} +F(x,z) f=0, \end{aligned}$$
(11)

where

$$\begin{aligned} F(x,z)=2mx(1+x^2)z-4(1+m+l)x(x^2+z^2). \end{aligned}$$

Then, from (11), we deduce that \(f\) must be divisible \((x^2+1)\). Proceeding inductively, we conclude that \(g_m\) must be divisible by \(x^2 +1\) infinitely many times and hence \(g_m=0\).

In summary, we get that \(g=0\) which yields \(h=0\), and consequently, system (1) is not analytically integrable. This concludes the proof of the theorem. \(\square \)