1 Introduction

Integrability conditions for an elliptic systems of equations was well studied. In this case the system of equations can be described locally as a set of m vector fields \(X_j= \partial _{x_j}\) on \(\mathbb {R}^m\), such that for given m smooth functions \(a_j(x)\), we ask for finding a function f satisfying

$$\begin{aligned} \partial _{x_1}f= & {} a_1(x) \nonumber \\ \cdots= & {} \cdots \\ \partial _{x_m}f= & {} a_m(x).\nonumber \end{aligned}$$
(1.1)

Standard results of ODE systems state that the system (1.1) has a solution if and only if the following integrability conditions hold

$$\begin{aligned} \partial _i a_j(x) = \partial _j a_i(x), \qquad 1\le i, j \le m. \end{aligned}$$

The necessity of this condition is mainly based on the vanishing commutator relations \([\partial _{x_i}, \partial _{x_j}]=0\), and the fact that the number of vector fields equals the dimension of the space. None of these conditions do not hold in the case of sub-elliptic systems, as will be made clear in the following.

A sub-elliptic system is a system of equations, where the number of equations is less than the dimension of the space. The precise definition is given in the following. Consider n vector fields \(X_1, \ldots , X_n\) defined locally on a manifold M, with \(n< \dim M\). The system

$$\begin{aligned} X_1(f)= & {} a_1 \nonumber \\ \cdots= & {} \cdots \\ X_n(f)= & {} a_n\nonumber \end{aligned}$$
(1.2)

with \(a_j\) smooth functions on M is a sub-elliptic system. The problem of studying the existence of solution f was asked for instance in [2, p. 51].

To have uniqueness (up to an additive constant) for the solution f of the system (1.2), we need to ask extra conditions on the vector fields \(X_j\). The uniqueness is equivalent with the fact that the associated homogeneous system has a constant solution, i.e., if \(X_i(f) =0\), \(i=0,\ldots ,m\), then \(f=c\), constant. This follows easily if the horizontal distribution is bracket-generating, i.e., if the vector fields \(X_j\), together with finitely many of their iterated brackets span the tangent space of the space M at each point. This means that for each \(x\in M\), there is an \(r>1\) such that

$$\begin{aligned} X_i,\ldots , [X_i, X_j], \ldots , [X_i,[X_j, X_k]], \ldots , [\ldots [X_{i_1}, \ldots ,[X_{i_r}, X_{i_{r+1}}]]\ldots ] \end{aligned}$$

span \(T_xM\).

The bracket generating condition implies also the regularity of solution f. Applying the vector \(X_j\) to the jth equation of system (1.2) and summing over j yields

$$\begin{aligned} \sum _j X_j^2 (f) = \sum _j X_i(a_i) \in {\mathcal F}(M). \end{aligned}$$

Assuming that the bracket generating condition holds, then by Hörmander’s theorem (see [7]) the operator \(\sum _j X_j^2\) is hypoelliptic, and hence f must be smooth. Hence, if a solution of the system (1.2) exists, then it is smooth; in fact all solutions are \(C^{\infty }\)-smooth, since any two solutions differ by a constant.

Therefore, the only non trivial problem is the existence of a solution f for the system (1.2). It turns out that this is equivalent with some integrability conditions satisfied by the vector fields \(X_j\), and the integrability conditions depend on the vector fields. Since \(X_i\) and \(X_j\) do not commute, we cannot hope to obtain an integrability relation as simple as \(X_i a_j = X_j a_i\).

The progress towards finding integrability conditions covers so far Heisenberg, Grushin and Martinet distributions. The integrability conditions were found in the case of Heisenberg vector fields on \(\mathbb {R}^3\) in [2, p. 53], and then generalized to Heisenberg and Grushin manifolds in the paper [5]. The article [4] uses symmetry reductions from the Heisenberg and Engel distributions to provide integrability conditions for the Grushin and Martinet distributions. A Poincaré lemma for the Heisenberg group is found in [6]. The present paper continues the idea of paper [5] to find the integrability conditions on the Engel distribution and, in general, for Engel manifolds. The novelty of the study of these manifolds is that they are of constant step 3, while the Heisenberg distributions are on step 2.

The present paper provides a variant of Poincaré’s Lemma in the integral form for the case of the Engel’s vector fields. This is a continuation of the work done in articles [4] and [5] and [6]. The present paper produces an explicit integral formula for the solution of the Engel’s sub-elliptic system. It is worth noting that the Engel’s group in its matrix form was introduced in [8], while a different version of the Engel’s group was studied in [1].

One good reason for investigating different versions of Poincaré’s Lemma on sub-Riemannian manifolds is to understand how sub-elliptic systems of equations work and how they are different or similar to the well studied elliptic systems. It is our hope that a Poincaré Lemma can become in the sub-Riemannian context as powerful and influential as its elliptical, classical, version.

The plan of the paper is as in the following. In Sect. 2 we review some basic definitions useful in later sections. Section 3 deals with the construction of the Engel’s group, the reduction of Engel’s vector fields, and the definition of Engel’s manifolds. The main result is given and proved in Sect. 4. It is worth noting that even if Engel’s distribution is in \(\mathbb {R}^4\), there are only two integrability conditions needed. Section 5 provides an explicit construction of the solution as the work done by a force along a curve tangent to Engel’s distribution. The solution involves an integral representation containing expressions of the integrability conditions.

2 Basic notions

In this section we review a few notions from differential geometry, which will be useful in later sections of the paper. Let (Mg) be a Riemannian manifold and let U be a vector field on M. The curl of U is the 2-covariant, antisymmetric tensor, A, defined by

$$\begin{aligned} A(X, Y) = Y g(U, X) - X g(U, Y) + g(U, [X, Y]). \end{aligned}$$
(2.1)

A concurrent notation for the tensor A is \(\mathop {\mathrm{curl}} \nolimits \,U\). We also note that \(A(X, X) =0\) and \(A(X, Y) = - A(Y, X)\).

The gradient of a smooth function f is a vector field, \(\mathop {\mathrm{grad}} \nolimits \,f\), defined by

$$\begin{aligned} g(\mathop {\mathrm{grad}} \nolimits \, f, Y) = Y(f),\qquad \forall Y \in \mathcal {X}(M). \end{aligned}$$

The vector field U is a gradient vector field on the manifold M if there is a smooth function f defined on the manifold M such that \(\mathop {\mathrm{grad}} \nolimits \, f = X\).

The relation between \(\mathop {\mathrm{curl}} \nolimits \) and gradient is given by \(\mathop {\mathrm{curl}} \nolimits (\mathop {\mathrm{grad}} \nolimits \,f) =0\), for any smooth function f on M. More precisely, the following result holds:

Let M be a connected and simply connected manifold. Then X is a gradient vector field if and only if \(\mathop {\mathrm{curl}} \nolimits \, X =0\).

This result works on Riemannian manifolds. A proof of this result can be found in Calin and Chang [3]. The goal of this paper is to study a similar problem on Engel manifolds, which are particular cases of sub-Riemanain manifolds. Using the bracket generating property we shall reduce the sub-Riemannian problem to a Riemannian one and then apply the aforementioned result.

3 Engel’s group

3.1 Matrix version

We shall start with the matrix version of the Engel’s group. Consider the set of upper-triangular matrices of the form

$$\begin{aligned} G = \left\{ \left( \begin{array}{cccc} 1 &{}\quad a &{}\quad c &{}\quad d \\ 1 &{}\quad 1 &{}\quad b &{}\quad \frac{1}{2}b^2 \\ 0 &{}\quad 0 &{}\quad 1 &{}\quad b \\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 1 \\ \end{array} \right) ; (a, b, c, d) \in \mathbb {R}^4 \right\} . \end{aligned}$$

Since the matrix multiplication provides

$$\begin{aligned}&\left( \begin{array}{cccc} 1 &{}\quad a_1 &{}\quad c_1 &{}\quad d_1 \\ 1 &{}\quad 1 &{}\quad b_1 &{}\quad \frac{1}{2}b^2_1 \\ 0 &{}\quad 0 &{}\quad 1 &{}\quad b_1\\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 1 \\ \end{array} \right) \cdot \left( \begin{array}{cccc} 1 &{}\quad a_2 &{}\quad c_2 &{}\quad d_2 \\ 1 &{}\quad 1 &{}\quad b_2 &{}\quad \frac{1}{2}b^2_2 \\ 0 &{}\quad 0 &{}\quad 1 &{}\quad b_2 \\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 1 \\ \end{array} \right) \\&\quad = \left( \begin{array}{cccc} 1 &{}\quad a_1+a_2 &{}\quad c_1+c_2+a_1b_2 &{}\quad d_1+d_2+\frac{1}{2} a_1 b_2^2 + c_1 b_2 \\ 1 &{}\quad 1 &{}\quad b_1+b_2 &{}\quad \frac{1}{2}(b_1 +b_2)^2 \\ 0 &{}\quad 0 &{}\quad 1 &{}\quad b_1 +b_2 \\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 1 \\ \end{array} \right) \end{aligned}$$

it follows that G has a group structure. This group can be also considered as a group on \(\mathbb {R}^4\) with the following composition law

$$\begin{aligned}&(x_1, x_2, x_3, x_4) * (y_1, y_2, y_3, y_4) = (z_1, z_2, z_3, z_4),\\&\quad z_1 = x_1 + y_1\nonumber \\&\quad z_2 = x_2 + y_2\nonumber \\&\quad z_3 = x_3 + y_3 + x_1 y_2\nonumber \\&\quad z_4 = x_4 + y_4 + \frac{1}{2} x_1 y_2^2 + x_3 y_2.\nonumber \end{aligned}$$
(3.1)

It can be shown that the right invariant vector fields of this group are

$$\begin{aligned} X_1&= \partial _{x_1} + x_2 \partial _{x_3} + \frac{1}{2} x_2^2 \partial _{x_4}\\ X_2&= \partial _{x_2}\\ X_3&= \partial _{x_3} + x_2 \partial _{x_4}\\ X_4&= \partial _{x_4}. \end{aligned}$$

The only non-vanishing brackets are given by

$$\begin{aligned}{}[X_2, X_1]= X_3, \;[X_2, X_3] = X_4. \end{aligned}$$

Swapping coordinates \(x_1\) and \(x_2\) provides the following version of the vector fields on \(\mathbb {R}^4\)

$$\begin{aligned} Y_1&= \partial _{x_1}\\ Y_2&= \partial _{x_2} + x_1 \partial _{x_3} + \frac{1}{2} x_1^2 \partial _{x_4}\\ Y_3&= \partial _{x_3} + x_1 \partial _{x_4}\\ Y_4&= \partial _{x_4}, \end{aligned}$$

with the commutation relations

$$\begin{aligned}{}[Y_1, Y_2]= Y_3, \;\;[Y_1, Y_3] = Y_4, \quad [Y_2, Y_3]=0. \end{aligned}$$

It is worth noting that the vector fields \(Y_1\), \(Y_2\) are left invariant on the Lie group \( (\mathbb {R}^4, \circ )\) with the composition rule given by (see [2, p. 315])

$$\begin{aligned} x \circ y= & {} \Big ( x_1 + y_1, x_2 + y_2, x_3 + y_3 + \frac{1}{2}(x_1 y_2 - y_1 x_2), \\&\quad x_4 + y_4 + \frac{1}{2} (x_1 y_3 - x_3 y_1) + \frac{1}{12} \Big ( x_1^2 y_2 - x_1 y_1 (x_2 + y_2) + x_2 y_1^2 \Big ) \Big ). \end{aligned}$$

3.2 Engel’s distribution

The rank 2 distribution \({\mathcal E}\) generated on \(\mathbb {R}^4\) by the vector fields

$$\begin{aligned} Y_1= & {} \partial _{x_1}\end{aligned}$$
(3.2)
$$\begin{aligned} Y_2= & {} \partial _{x_2} + x_1 \partial _{x_3} + \frac{1}{2}x_1^2 \partial _{x_4} \end{aligned}$$
(3.3)

is called the Engel’s distribution. Since the vector fields \(Y_1\), \(Y_2\), \(Y_3 = [Y_1, Y_2]\), \(Y_4 = [X_1, [Y_1, Y_2]]\) are linearly independent at each point of \(\mathbb {R}^4\), it follows that the step of the distribution \({\mathcal E}\) is constant, equal to 3 everywhere.

On the other side, since \([Y_j, [Y_1, [Y_1, Y_2]]] =0\), \(j=1,2\), then the nilpotence class of \({\mathcal E}\) at each point is also equal to 3 (nesting more than three brackets yields a zero filed).

3.3 The reduced Engel vector fields

The vector field \(Y_2\) has a quadratic coefficient \(x_1^2\). However, performing a transformation of coordinates, the quadratic coefficient reduces to a linear one. This will be done in the following.

Consider the diffeomorphism \(\varphi :\mathbb {R}^4 \rightarrow \mathbb {R}^4\), \(y = \varphi (x)\), given by

$$\begin{aligned}y_1 = x_2,\quad y_2 = x_1, \quad y_3 = x_1 x_2 - x_3,\quad y_4 = \frac{1}{2} x_1^2 x_2 - x_1 x_3 + x_4. \end{aligned}$$

This transforms the previous vector fields into vector fields with linear coefficients

$$\begin{aligned} Z_1= & {} \varphi _*(Y_1) = \partial _{y_1} \end{aligned}$$
(3.4)
$$\begin{aligned} Z_2= & {} \varphi _*(Y_2) = \partial _{y_2} + y_1 \partial _{y_3} + y_3 \partial _{y_4}. \end{aligned}$$
(3.5)

The corresponding commutation relations are

$$\begin{aligned}{}[Z_1, Z_2] = Z_3 = \partial _{x_3}, \quad [Z_1, Z_3] =0, \quad [Z_2, Z_3] = -\partial _{y_4} = Z_4. \end{aligned}$$

3.4 Engel pair of vector fields

Two vector fields \(Z_1, Z_2\) on a 4-dimensional manifold M form an Engel pair if the commutations relations are given by

$$\begin{aligned}{}[Z_1, Z_2] = Z_3, \quad [Z_1, Z_3] = 0, \quad [Z_2, Z_3] = Z_4, \end{aligned}$$
(3.6)

and all other iterated Lie brackets vanish.

For instance, the vector fields \(\{Z_1, Z_2\}\) given by (3.4) and (3.5) form an Engel pair of vector fields. Also, the vector fields \(\{Y_2, Y_1\}\) given by (3.2) and (3.3) form an Engel pair.

3.5 Engel manifold

An Engel manifold is a manifold which resembles locally the Engel’s group. More precisely, we have the following definition.

Definition 1

An Engel manifold is a 4-dimensional manifold M that is endowed with a rank 2 distribution that is locally spanned by an Engel pair of vector fields.

In particular, \(\mathbb {R}^4\) together with the distribution \(\mathcal {E} =\mathrm{span}\{Y_1, Y_2\}\) is an Engel manifold.

The next section deals with integrability conditions on an Engel manifold. In particular, these also apply to the Engel’s group.

4 Integrability conditions

The goal of the present section is to find integrability conditions for the sub-Riemannian system

$$\begin{aligned} Z_1 f= & {} a_1, \end{aligned}$$
(4.1)
$$\begin{aligned} Z_2 f= & {} a_2, \end{aligned}$$
(4.2)

where \(\{Z_1, Z_2\}\) is an Engel pair. Since the distribution spanned by \(Z_1\) and \(Z_2\) is bracket generating, the solution f is unique up to an additive constant.

Theorem 1

Let M be a 4-dimensional manifold, such that \(\{Z_1, Z_2\}\) is an Engel pair of vector fields on M. For a pair of smooth functions \(a_1\) and \(a_2\) defined on M, we have

$$\begin{aligned}\left\{ \begin{array}{l} Z_1^2 a_2 = (Z_1 Z_2 +[Z_1, Z_2]) a_1\\ Z_2^3 a_1 = (Z_2^2 Z_1 - Z_2 [Z_1, Z_2] - [Z_2, [Z_1, Z_2] ]) a_2 \end{array} \right. \end{aligned}$$
$$\begin{aligned}\Longleftrightarrow \left\{ \begin{array}{l} \exists \hbox { a smooth function } f \\ \hbox { such that}\; Z_1f = a_1 \,\hbox {and}\; Z_2 f = a_2. \end{array} \right. \end{aligned}$$

Proof

\(\Longleftarrow \)”(Closeness) Assume there is a smooth function f on M such that \(Z_1f = a_1\), \( Z_2 f = a_2\). We shall show that the integrability conditions are satisfied by a direct computation.

For the first condition we have the following sequence of equivalences

$$\begin{aligned} Z_1^2 a_2&= (Z_1 Z_2 + [Z_1, Z_2] ) a_1 \Longleftrightarrow \\ Z_1^2 Z_2 f&= (Z_1 Z_2 +[Z_1, Z_2]) Z_1 f \Longleftrightarrow \\ (Z_1^2 Z_2 - Z_1 Z_2 Z_1)f&= [Z_1, Z_2]Z_1 f \Longleftrightarrow \\ Z_1(Z_1Z_2 - Z_2 Z_1) f&= [Z_1, Z_2] Z_1 f \Longleftrightarrow \\ Z_1[Z_1, Z_2]f&= [Z_1, Z_2]Z_1 f \Longleftrightarrow \\ [Z_1, [Z_1, Z_2]]f&= 0 \Longleftrightarrow \\ [Z_1, Z_3]f&= 0, \end{aligned}$$

which holds true for any smooth function f. This implies that the first integrability condition is satisfied.

The second integrability condition can be written equivalently as

$$\begin{aligned} Z_2^3 a_1&= (Z_2^2 Z_1 - Z_2 [Z_1, Z_2] - [Z_2, [Z_1, Z_2]]) a_2 \Longleftrightarrow \\ Z_2^3 a_1&= (Z_2^2 Z_1 - Z_2 Z_3 - [Z_2, Z_3]) a_2 \Longleftrightarrow \\ Z_2^3 a_1 - Z_2^2 Z_1 a_2&= -Z_2 Z_3 a_2 - Z_2 Z_3 a_2 + Z_3 Z_2 a_2 \Longleftrightarrow \\ Z_2^2 (Z_2 a_1 - Z_1 a_2)&= -Z_2 Z_3 a_2 - Z_4 a_2 \Longleftrightarrow \\ Z_2^2 (Z_2 Z_1 - Z_1 Z_2)f&= -Z_2 Z_3 Z_2 f - Z_4 Z_2 f \Longleftrightarrow \\ - Z_2^2 Z_3 f&= -Z_2 Z_3 Z_2 f - Z_4 Z_2 f \Longleftrightarrow \\ (Z_2 Z_3 Z_2 - Z_2 Z_2 Z_3) f&= - Z_4 Z_2 f \Longleftrightarrow \\ Z_2 [Z_3, Z_2] f&= - Z_4 Z_2 f \Longleftrightarrow \\ -Z_2 Z_4 f&= - Z_4 Z_2 f \Longleftrightarrow \\ [Z_4, Z_2] f&=0, \end{aligned}$$

which holds true for any smooth function f, since \(Z_2\) and \(Z_4\) commute. This implies that the second integrability condition holds true.

\(\Longrightarrow \)”(Exactness) Assume the integrability conditions

$$\begin{aligned} Z_1^2 a_2 =&(Z_1 Z_2 +[Z_1, Z_2]) a_1\\ Z_2^3 a_1 =&(Z_2^2 Z_1 - Z_2 [Z_1, Z_2] - [Z_2, [Z_1, Z_2] ]) a_2 \end{aligned}$$

are satisfied. We shall show that exists a smooth function f such that \(Z_1f = a_1\), \( Z_2 f = a_2\).

Let \(Z_3\) and \(Z_4\) be the vector fields defined by relation (3.6). Since \(\{Z_1, Z_2, Z_3, Z_4\}\) form a basis of the tangent space to M, we can consider the Riemannian metric g on M with respect to which \(\{Z_j\}_j\) is an orthonormal basis at each point. Then the gradient of any smooth function f on M can be written as

$$\begin{aligned} \mathop {\mathrm{grad}} \nolimits \, f = \sum _{j=1}^4 Z_j(f) Z_j. \end{aligned}$$

Let

$$\begin{aligned} a_3 =&[Z_1, Z_2]f = Z_1 a_2 - Z_2 a_1 \end{aligned}$$
(4.3)
$$\begin{aligned} a_4 =&[Z_2, Z_3]f = Z_2 a_3 - Z_3 a_2 \end{aligned}$$
(4.4)

be smooth functions and consider the vector field \(U = \sum _j a_j Z_j\) on M. Using the following sequence of equivalences we shall complete to a 4-dimensional problem

$$\begin{aligned}\left\{ \begin{array}{l} Z_1 f = a_1 \\ Z_2 f = a_2 \end{array} \right. \Longleftrightarrow \left\{ \begin{array}{l} Z_1 f = a_1 \\ Z_2 f = a_2 \\ Z_3 f = a_3 \\ Z_4 f = a_4 \end{array} \right. \Longleftrightarrow \mathop {\mathrm{grad}} \nolimits \, f = U \Longleftrightarrow \mathop {\mathrm{curl}} \nolimits \, U =0, \end{aligned}$$

where the operators \(\mathop {\mathrm{grad}} \nolimits \) and \(\mathop {\mathrm{curl}} \nolimits \) are taken with respect to the aforementioned metric g. Since the tensor \(A= \mathop {\mathrm{curl}} \nolimits \, U\) is zero if and only if it vanishes on a basis, then

$$\begin{aligned} \mathop {\mathrm{curl}} \nolimits \, U =0 \Longleftrightarrow \left\{ \begin{array}{l} A(Z_1, Z_2) =0, \quad A(Z_1, Z_3) =0, \quad A(Z_1, Z_4) =0 \\ A(Z_2, Z_3) =0, \quad A(Z_2, Z_4) =0, \quad A(Z_3, Z_4) = 0. \end{array} \right. \end{aligned}$$
(4.5)

Hence, it suffices to show the identities on the right side of (4.5). We shall do this considering each identity at a time.

  1. (i)

    Showing \(A(Z_1, Z_2) = 0\). From the curl’s formula (2.1) we have

    $$\begin{aligned} A(Z_1, Z_2)= & {} Z_2 g(U, Z_1) - Z_1 g(U, Z_2) + g(U, \underbrace{[Z_1, Z_2]}_{=Z_3})\\= & {} Z_2 a_1 - Z_1 a_2 + a_3\\= & {} 0, \end{aligned}$$

    by equation (4.3).

  2. (ii)

    Showing \(A(Z_2, Z_3) = 0\). From the curl’s formula (2.1) we have

    $$\begin{aligned} A(Z_2, Z_3)= & {} Z_3 g(U, Z_2) - Z_2 g(U, Z_3) + g(U, \underbrace{[Z_2, Z_3]}_{=Z_4})\\= & {} Z_3 a_2 - Z_2 a_3 + a_4\\= & {} 0, \end{aligned}$$

    by equation (4.4).

  3. (iii)

    Showing \(A(Z_1, Z_3) = 0 \).

    From the curl’s formula (2.1) we have

    $$\begin{aligned} A(Z_1, Z_3)= & {} Z_3 g(U, Z_1) - Z_1 g(U, Z_3) + g(U, \underbrace{[Z_1, Z_3]}_{= 0})\\= & {} Z_3 a_1 - Z_1 a_3 \\= & {} [Z_1, Z_2] a_1 - Z_1(Z_1 a_2 - Z_2 a_1)\\= & {} ([Z_1, Z_2] - Z_1 Z_2) a_1 - Z_1^2 a_2\\= & {} 0, \end{aligned}$$

    by the first integrability condition.

  4. (iv)

    Showing \(A(Z_2, Z_4) = 0\).

    From the curl’s formula (2.1)

    $$\begin{aligned} A(Z_2, Z_4)= & {} Z_4 g(U, Z_2) - Z_2 g(U, Z_4) + g(U, \underbrace{[Z_2, Z_4]}_{=0}) \\= & {} Z_4 a_2 - Z_2a_4 \\= & {} [Z_2, Z_3]a_2 - Z_2 (Z_2 a_3 - Z_3 a_2)\\= & {} [Z_2, Z_3]a_2 - Z_2^2 a_3 + Z_2 Z_3 a_2\\= & {} [Z_2, Z_3]a_2 - Z_2^2 (Z_1 a_2 - Z_2 a_1) + Z_2 Z_3 a_2\\= & {} Z_2^3 a_1 - (Z_2^2 Z_1 - Z_2 Z_3 + [Z_3, Z_2]) a_2\\= & {} 0, \end{aligned}$$

    by the second integrability condition.

  5. (v)

    Showing \(A(Z_1, Z_4) = 0 \). From the curl’s formula (2.1)

    $$\begin{aligned} A(Z_1, Z_4)= & {} Z_4 g(U, Z_1) - Z_1 g(U, Z_4) + g(U, \underbrace{[Z_1, Z_4]}_{=0}) \nonumber \\= & {} Z_4 a_1 - Z_1 a_4. \end{aligned}$$
    (4.6)

    It suffices to show that \(Z_4 a_1 = Z_1 a_4\). Recall from cases (iii) and (iv) that

    $$\begin{aligned} Z_1 a_ 3 = Z_3 a_1, \qquad Z_2 a_4 = Z_4 a_2. \end{aligned}$$

    Using that \(Z_1\) and \(Z_3\) commute, we have

    $$\begin{aligned} Z_1 a_4&= Z_1 (Z_2 a_3 - Z_3 a_2) \nonumber \\&=Z_1Z_2a_3 -Z_1Z_3 a_2\nonumber \\&= Z_1Z_2a_3 -Z_3Z_1a_2. \end{aligned}$$
    (4.7)

    and

    $$\begin{aligned} Z_4 a_1&= [Z_2,Z_3]a_1 = Z_2Z_3 a_1 -Z_3Z_2 a_1 \nonumber \\&= Z_2Z_1a_3 -Z_3Z_2a_1. \end{aligned}$$
    (4.8)

    Using (4.7) and (4.8) we have the following sequence of equivalences

    $$\begin{aligned} Z_1 a_4&= Z_4 a_1 \Longleftrightarrow \\ Z_1Z_2a_3 -Z_3Z_1a_2&= Z_2Z_1a_3 -Z_3Z_2a_1 \Longleftrightarrow \\ (Z_1Z_2-Z_2Z_1)a_3&= Z_3Z_1a_2-Z_3Z_2 a_1 \Longleftrightarrow \\ [Z_1,Z_2]a_3&= Z_3(Z_1a_2 -Z_2 a_1) \Longleftrightarrow \\ Z_3 a_3&= Z_3 a_3, \end{aligned}$$

    which holds true. Therefore \(Z_4 a_1 = Z_1 a_4\) and hence from (4.6) it follows that \(A(Z_1, Z_4) =0\).

  6. (vi)

    Showing \(A(Z_3, Z_4) = 0\).

    From the curl’s formula (2.1)

    $$\begin{aligned} A(Z_3, Z_4)= & {} Z_4 g(U, Z_3) - Z_3 g(U, Z_4) + g(U, \underbrace{[Z_3, Z_4]}_{=0})\nonumber \\= & {} Z_4 a_3 - Z_3 a_4. \end{aligned}$$
    (4.9)

    Since \([Z_1, Z_4] = [Z_2, Z_4] =0\), then \(Z_4\) commutes with \(Z_1\) and \(Z_2\). Recall from (v) that \(Z_4a_1 = Z_1 a_4\). Therefore

    $$\begin{aligned} Z_4 a_3&= Z_4 (Z_1 a_2 - Z_2 a_1) = Z_4 Z_1 a_2 - Z_4 Z_2 a_1 \\&= Z_1 Z_4 a_2 - Z_2 Z_4 a_1 \\&= Z_1 Z_2 a_4 -Z_2 Z_1 a_4 \\&=(Z_1Z_2-Z_2Z_1)a_4 = [Z_1, Z_2]a_4 = Z_3 a_4. \end{aligned}$$

    Substituting in (4.9) yields \(A(Z_3, Z_4)=0\).

Since \(A(Z_i, Z_j) =0\), then from (4.5) it follows that \(\mathop {\mathrm{curl}} \nolimits U =0\), which leads to the desired relation. \(\square \)

5 Solution construction

Section 4 provides necessary and sufficient integrability conditions for the existence of the solutions of the sub-Riemannian system (4.1 and 4.2). The bracket generating condition of the Engel vector fields implies both the uniqueness and smoothness (via Hörmander’s theorem) of the solution. This section deals with an explicit construction of the solution f of the system (4.1 and 4.2).

We shall construct the solution f preserving the remarkable physical significance as in the classical version of the Poincaré lemma in dimension 2. We shall briefly recall this construction. Consider a and b continuous functions defined on the open and contractible set U in \(\mathbb {R}^2\). Let \(r(t) = t(x, y) = (tx, ty) = \big ( x(t), y(t) \big )\), \(0\le t\le 1\), be the straight line segment from the origin to the point (xy). Then the work done by the 1-form \(\omega = a dx + b dy\) from the origin to the point (xy) along the curve r(t) is given by

$$\begin{aligned} f(x, y)&= \int _0^1 a(tx, ty) x + b(tx, ty) y \, \mathrm{d}t. \end{aligned}$$

A straightforward computation provides

$$\begin{aligned} \left( \begin{array}{c} \partial _x f(x, y) \\ \partial _y f(x, y) \\ \end{array} \right) = \left( \begin{array}{c} a(x, y) \\ b(x, y) \\ \end{array} \right) + \int _0^1 \left( \begin{array}{c} ty \\ -tx \\ \end{array} \right) \Big ( \frac{\partial b}{\partial x} - \frac{\partial a}{\partial y}\Big )\, \mathrm{d}t. \end{aligned}$$
(5.1)

Obviously, if the condition

$$\begin{aligned} \frac{\partial a}{\partial y} = \frac{\partial b}{\partial x} \end{aligned}$$

is satisfied, then f(xy) satisfies the system \(\partial _x f = a\), \(\partial _y f = b\).

We shall work out a relation of type (5.1) in the case of the Engel vector fields (3.4 and 3.5). Recall first the equivalences

$$\begin{aligned}&\left\{ \begin{array}{l} Z_1 f = a_1 \\ Z_2 f = a_2 \end{array} \right. \Longleftrightarrow \left\{ \begin{array}{l} Z_1 f = a_1 \\ Z_2 f = a_2 \\ Z_3 f = a_3 \\ Z_4 f = a_4 \end{array} \right. \Longleftrightarrow \left\{ \begin{array}{l} \partial _{y_1} f = a_1 \\ \partial _{y_2} f + y_1 \partial _{y_3} f + y_3 \partial _{y_4} f = a_2 \\ \partial _{y_3} f = a_3 = Z_1 a_2 - Z_2 a_1\\ -\partial _{y_4} f = a_4 = Z_2 a_3 - Z_3 a_2 \end{array} \right. \\&\quad \Longleftrightarrow \left\{ \begin{array}{l} \partial _{y_1} f = a_1 \\ \partial _{y_2} f = a_2- y_1 a_3 + y_3 a_4 \\ \partial _{y_3} f = a_3 \\ \partial _{y_4} f = -a_4 \end{array} \right. \Longleftrightarrow \nabla f = V, \end{aligned}$$

where the components of V are

$$\begin{aligned} V_1 = a_1,\quad V_2 = a_2- y_1 a_3 + y_3 a_4,\quad V_3 = a_3,\quad V_4 = - a_4. \end{aligned}$$
(5.2)

Theorem 2

Let \(Z_1= \partial _{y_1}\), \(Z_2 = \partial _{y_2} + y_1 \partial _{y_3} + y_3 \partial _{y_4}\) be the Engel vector fields on \(\mathbb {R}^4\) and consider

$$\begin{aligned} f(\mathbf {r}) = \int _0^1 V(t\mathbf {r}) \cdot \mathbf {r} \, \mathrm{d}t, \end{aligned}$$
(5.3)

where \(\mathbf {r} = (y_1, y_2, y_3, y_4) \). Define the expressions

$$\begin{aligned} C_1&= Z_1^2 a_2 - (Z_1Z_2 +[Z_1, Z_2]) a_1\\ C_2&= Z_2^3 a_1 - (Z_2^2 Z_1 - Z_2 [Z_1, Z_2] - [Z_2, [Z_1, Z_2]])a_2 \end{aligned}$$

Then

$$\begin{aligned} (Z_1 f )(\mathbf {r})&= a_1(\mathbf {r})+\int _0^1 \Big ( (y_3 - y_1 y_2)C_1 - (y_4 - y_2 y_3) Z_2 C_1 \Big )(t\mathbf {r})\, \mathrm{d}t\\ (Z_2 f )(\mathbf {r})&= a_2(\mathbf {r}) + \int _0^1 \Big ( (y_4 - y_2 y_3) C_2 \Big )(t\mathbf {r})\, \mathrm{d}t. \end{aligned}$$

Proof

Define the \(4\times 4\) skew-symmetric matrix

$$\begin{aligned} \Omega _{ij} = \frac{\partial V_j}{\partial y_i} -\frac{\partial V_i}{\partial y_j}. \end{aligned}$$

We start by computing the partial derivatives of \(f(\mathbf {r})\). A straightforward computation involving the product and chain rules provides

$$\begin{aligned} \frac{\partial }{\partial y_1} f(\mathbf {r})&= \frac{\partial }{\partial y_1} \int _0^1 \sum _{i=1}^ 4 V_i(t\mathbf {r}) y_i \, \mathrm{d}t =\int _0^1 \Big ( V_1(t\mathbf {r}) + \sum _{i=1}^4 \frac{\partial V_i}{\partial y_i}(t\mathbf {r}) \Big ) \, \mathrm{d}t \\&= \int _0^1 \Big ( \frac{\partial (tV_1(t\mathbf {r}))}{\partial t} - \sum _{j=2}^4t \frac{\partial V_1}{\partial y_j}(t\mathbf {r}) y_j + \sum _{j=2}^4 \frac{\partial V_j}{\partial y_1}(t\mathbf {r}) ty_j\Big ) \, \mathrm{d}t\\&= V_1(\mathbf {r}) + \int _0^1 \sum _{j=1}^4 \Omega _{j1} (t\mathbf {r}) ty_j \, \mathrm{d}t. \end{aligned}$$

Similarly, we have

$$\begin{aligned} \frac{\partial }{\partial y_i} f(\mathbf {r}) = V_i(\mathbf {r}) + \int _0^1 \sum _{j=1}^4 \Omega _{ji} (t\mathbf {r}) ty_j \, \mathrm{d}t, \; \; \forall i=1,\ldots ,4, \end{aligned}$$

which can be written as

$$\begin{aligned} \nabla f(\mathbf {r}) = V(\mathbf {r}) + \int _0^1 \Omega (t\mathbf {r})\cdot (t\mathbf {r}) \, \mathrm{d}t. \end{aligned}$$
(5.4)

Multiplying by the matrix \(\displaystyle A = \left( \begin{array}{cccc} 1 &{} 0 &{} 0 &{} 0 \\ 0 &{} 1 &{} y_1 &{} y_3 \\ \end{array} \right) \) on the left of the relation (5.4) we obtain

$$\begin{aligned} A \nabla f(\mathbf {r})&= A V(\mathbf {r}) + \int _0^1 A (\Omega (t\mathbf {r})\cdot (t\mathbf {r})) \, \mathrm{d}t \Longleftrightarrow \\ \left( \begin{array}{c} Z_1f \\ Z_2f \\ \end{array} \right) (\mathbf {r})&= \left( \begin{array}{c} a_1 \\ a_2 \\ \end{array} \right) {(\mathbf {r})} + \int _0^1 A (\Omega (t\mathbf {r})\cdot (t\mathbf {r})) \, \mathrm{d}t \end{aligned}$$

The relation

$$\begin{aligned} A (\Omega (t\mathbf {r})\cdot (t\mathbf {r})) =\left( \begin{array}{c} (y_3 - y_1 y_2)C_1 - (y_4 - y_2 y_3) Z_2 C_1 \\ (y_4 - y_2 y_3) C_2 \\ \end{array} \right) \end{aligned}$$

is lengthy to be calculated by hand, but can be directly verified by MATHEMATICA software. \(\square \)

In the following we shall provide a sub-Riemannian description for the solution \(f(\mathbf {r})\). Let \(\mathcal {H} = \mathrm{span}\{Z_1, Z_2\}\). Then \(p\rightarrow \mathcal {H}_p \subset \mathbb {R}^4\) is a rank 2 distribution of constant step, equal to 3 everywhere. The Riemannian metric \(g_p: \mathcal {H}_p \times \mathcal {H}_p \rightarrow {\mathbb {R}}\) with respect to which \(\{Z_1, Z_2\}\) are orthonormal, i.e., \(g(Z_i, Z_j) =\delta _{ij}\), is unique and called the sub-Riemannian metric defined by \(Z_i\). The metric g can be used to measure magnitudes of vectors in \(\mathcal {H}\) as well as lengths of curves tangent to \(\mathcal {H}\).

Let \(\gamma (t) = \big (y_1(t), y_2(t), y_3(t), y_4(t) \big )\) be a smooth curve in \(\mathbb {R}^4\). We would like to find the constraints satisfied by \(\gamma \) such that \(\dot{\gamma }(t) \in \mathcal {H}_{\gamma (t)}\). The velocity can be written as

$$\begin{aligned} \dot{\gamma }(t)&= \dot{y}_1(t)\partial _{y_1} + \dot{y}_2(t)\partial _{y_2}+ \dot{y}_3(t)\partial _{y_3}+ \dot{y}_4(t)\partial _{y_4}\\&= \dot{y}_1 Z_1 + \dot{y}_2 Z_2 + (\dot{y}_3 - y_1 \dot{y}_2) Z_3 - (\dot{y}_4 - y_3 \dot{y}_2) Z_4. \end{aligned}$$

Hence, the condition \(\dot{\gamma }(t) \in \mathcal {H}_{\gamma (t)}\) is equivalent to the non-holonomic constraints

$$\begin{aligned} \dot{y}_3 - y_1 \dot{y}_2 =0, \qquad \dot{y}_4 - y_3 \dot{y}_2 =0. \end{aligned}$$
(5.5)

In this case \(\dot{\gamma }= \dot{y}_1 Z_1 + \dot{y}_2 Z_2 \) and thus \(g(\dot{\gamma },\dot{\gamma }) = \dot{y}_1^2 + \dot{y}_2^2\), and the length of the curve \(\gamma (t)\), \(0\le t\le 1\) is given by \(\displaystyle \ell (\gamma ) = \int _0^1 \, d \gamma = \int _0^1 \sqrt{\dot{y}_1^2(t)+ \dot{y}_2^2(t)} \, \mathrm{d}t \).

Using the fundamental theorem of calculus

$$\begin{aligned} \int _c Y \cdot dc = \int _0^1 \langle Y, c'(t) \rangle \, \mathrm{d}t = f\big (c(1)\big ) - f\big (c(0)\big ), \end{aligned}$$

it follows that the integral

$$\begin{aligned} f(\mathbf {r}) = \int _0^1 V(t\mathbf {r}) \cdot \mathbf {r} \, \mathrm{d}t \end{aligned}$$
(5.6)

depends only on the end points of the curve \(c(t) = t\mathbf {r}\). Hence, we have the freedom of choosing any curve, in particular a curve \(\gamma (t)\) tangent to the distribution \(\mathcal {H}\).

Let \(U = a_1 Z_1 + a_2 Z_2\) be the vector field associated with our system \(Z_1 f = a_1\), \(Z_2 f = a_2\). Then using (5.2) and the constraints (5.5) we have

$$\begin{aligned} \int _0^1 \langle V, \gamma '(t) \rangle \, \mathrm{d}t&= \int _0^1 (V_1 \dot{y}_1 +V_2 \dot{y}_2 + V_3 \dot{y}_3 + V_4 \dot{y}_4 ) \, \mathrm{d}t \\&=\int _0^1 (a_1 \dot{y}_1 + a_2 \dot{y}_2) \, \mathrm{d}t + \int _0^1 a_3 (\dot{y}_3 - y_1 \dot{y}_2) \, \mathrm{d}t\\&\quad - \int _0^1 a_4 (\dot{y}_4 - y_3 \dot{y}_2)\, \mathrm{d}t\\&= \int _0^1 (a_1 \dot{y}_1 + a_2 \dot{y}_2) \, \mathrm{d}t = \int _0^1 g(a_1Z_1 + a_2 Z_2, \dot{y}_1 Z_1 + \dot{y}_2Z_2) \, \mathrm{d}t \\&= \int _0^1 g(U, \dot{\gamma }) \, \mathrm{d}t. \end{aligned}$$

Therefore the solution can be written as

$$\begin{aligned} f(\mathbf {r}) = \int _0^1 g(U_{\gamma (t)}, \dot{\gamma }(t) )\, \mathrm{d}t, \end{aligned}$$

where \(\gamma (t)\) is a curve tangent to the distribution \(\mathcal {H}\) with \(\gamma (0) = 0\) and \(\gamma (1) = \mathbf {r}=(y_1, y_2, y_3, y_4)\). This is the work done by the force U along the curve \(\gamma (t)\) joining the origin and \(\mathbf {r}\). We conclude with the following consequence of Theorem 2:

Corollary 1

If integrability conditions \(C_1=0\), \(C_2 =0\) hold, then the unique (up to an additive constant) solution of the system

$$\begin{aligned} Z_1 f = a_1, \qquad Z_2 f = a_2 \end{aligned}$$

is given by

$$\begin{aligned} f(\mathbf {r}) = \int _0^1 g(U_{\gamma (t)}, \dot{\gamma }(t) )\, \mathrm{d}t. \end{aligned}$$