1 Introduction

Let \(M\) be a connected, simple connected, finite dimensional differentiable manifold. A distribution \({\mathcal H}\) on \(M\) is a subbundle of the tangent bundle \(TM\). The distribution \({\mathcal H}\) is supposed to be non-integrable; the integrable case leads to a foliation on \(M\), case which is not interesting from our point of view. The distribution \({\mathcal H}\) is usually given as the linear hull of a set \(\{X_1, X_2, \ldots , X_m\}\) of smooth vector fields on \(M\), with \(m<dim M\). The vector fields \(X_j\) are assumed orthonormal with respect to a metric \(g: {\mathcal H} \times {\mathcal H}\rightarrow {\mathcal F}(M)\), called the sub-Riemannian metric induced by the vector fields \(X_j\). The set of smooth functions defined on \(M\) was denoted by \({\mathcal F}(M)\). The triplet \((M, {\mathcal H}, g)\) is called a sub-Riemannian manifold.

The first approach of sub-Riemannian geometry was initiated by Vranceanu [11] at the beginning of the last century, under the name of non-holonomic geometry. Sub-Riemannian geometry is also known under the name of Carnot–Carathéodory geometry.

The distribution \({\mathcal H}\) satisfies the bracket generating condition 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 aforementioned condition has been used independently by Chow and Rashevskii ([7, 10]) to prove global connectedness of \(M\) by curves tangent to \({\mathcal H}\); it was also used by Hörmander [8] as a sufficient, but not necessary condition for the differential operator \(\sum _j X_j^2\) to be hypoelliptic. It is worth noting that there are sub-Riemannian manifolds on which the global connectedness holds but the bracket-generating condition fails, see for instance [1] and [4].

The geometric objects that can be characterized only by using the vector fields \(X_j\) and the metric \(g\) form the intrinsic geometry of the sub-Riemannian manifold. As a general philosophy and real endeavor in sub-Riemannian geometry is to express different geometric objects intrinsically. For instance, the missing direction of the Heisenberg distribution \({\mathcal H}\) has been characterized as the cut locus of the sub-Riemannian geodesics starting from the origin, see for instance [3, 6]. A good reference book for subRiemannian geometry is [2].

The present paper continues the line of the above philosophy. The goal of this work is to address the open problem asked in [2, p. 51]:

Given m smooth functions \(a_j \in {\mathcal F}(M)\), find a function \(f \in {\mathcal F}(M)\) that satisfies the system

$$\begin{aligned} X_1(f)&= a_1 \nonumber \\ \cdots&= \cdots \nonumber \\ X_m(f)&= a_m. \end{aligned}$$
(1.1)

Does the problem have always a solution? Is the solution unique?

The uniqueness and solution regularity are treated below for any sub-Riemannian system of equations of type (1.1). The existence problem will be addressed in this paper only for some particular types of sub-Riemannian distributions, such as Grushin and Heisenberg.

Uniqueness. The uniqueness (up to an additive constant) of the solution \(f\) of the system (1.1) 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. In this case \([X_i, X_j]f=0\), and by a finite number of iterations we obtain \(Y(f)=0\), for any vector field \(Y\) on \(M\). This obviously implies \(f=c\), constant.

Solution regularity. Applying the vector \(X_j\) to the \(j\)th equation of the system (1.1) 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}$$

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

The only question remaining to be addressed is the solution existence. A first step towards this goal had been done in [2, p. 53 (see Theorem 2.9.8)] and the paper [5]. The first one provides integrability conditions for the Heisenberg distribution, while the latter uses symmetry reductions from the Heisenberg and Engel distributions to provide integrability conditions for the Grushin and Martinet distributions.

The goal of this paper is to use a direct and elementary method to prove the integrability conditions for Grushin distributions of step 2 and 3 as well as for Heisenberg-type distributions. From the point of view of step uniformity these distributions behave differently; for the first one the step jumps one unit along the line \(\{x=0\}\), while for the latter the step is constant and equal to 2 everywhere. In the case of uniform step distributions the exactness conditions are equivalent with a zero-curl vector field. When the distribution step exhibits jumps the exactness conditions are non-classical, in the sense that there are some extra functions that appear in the relations. In this case we employ the method of completing to a zero-curl vector field. Some results of paper [5], which initially were proved using complexes of differential operators, are proved here using the aforementioned direct methods.

The plan of the paper is as follows. Section 2 reviews a few basic notions of differential geometry useful in later sections. Section 3 deals with necessary and sufficient conditions for the system (1.1) to have solutions in the case of the Heisenberg-type distributions, which provides a generalization of Theorem 3. Section 4 is dedicated to the study of Grushin-type distributions, while the classical example of Grushin step 2 distribution is treated in Sect. 5. The Grushin step 3 distributions are treated in Sect. 6, while the last section is dedicated to conclusions.

2 Basic notions

Let \((M, g)\) be a Riemannian manifold and \(\mathcal {X}(M)\) denote the set of vector fields on \(M\). Let \(X \in \mathcal {X}(M)\). The curl of \(X\) is the 2-covariant, antisymmetric tensor, \(A\), defined by

$$\begin{aligned} A(U, V) = g(\nabla _V X, U) - g(\nabla _U X, V),\qquad \forall U, V\in \mathcal {X}(M) \end{aligned}$$
(2.1)

where \(\nabla \) denotes the Levi–Civita connection of \((M, g)\). A concurrent notation for the tensor \(A\) is \(curl X\). Since \(\nabla \) is a metrical connection we have

$$\begin{aligned} V g(X, U)&= g(\nabla _V X, U) + g(X, \nabla _V U)\\ Ug(X, V)&= g(\nabla _U X, V) + g(X, \nabla _U, V). \end{aligned}$$

Subtracting and using that \(\nabla \) is torsion-free yields the following formula for the curl of the vector field \(X\) (see [3])

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

It is worthy to note that \(A(X, X) =0\) and \(A(X, Y) = - A(Y, X)\).

The vector field \(X\) is a gradient vector field if there is a function \(f\) defined on the manifold \(M\) such that \(grad\, f = X\). The gradient is taken with respect to the metric \(g\), i.e., \(g(grad\, f, U) = U(f)\), \(\forall U \in \mathcal {X}(M)\).

We assume the following result known. Let \(M\) be a connected and simply connected manifold. Then \(X\) is a gradient vector field if and only if \(curl\, X =0\).

Let \({\mathcal C}^{(0)}={\mathcal H}\), and consider the iterated commutator sets

$$\begin{aligned} {\mathcal C}^{(n+1)}=[{\mathcal C}^{(n)}, {\mathcal H}] = \{ [{\mathcal C}^{(n)}, X]; X \in \Gamma ({\mathcal H}) \}. \end{aligned}$$

A distribution \(\mathcal H\) is called nilpotent if there is an integer \(k\ge 1\) such that \({\mathcal C}^{(k)}=0\). The smallest \(k\) with this property is called the nilpotence class of the distribution, see e.g., [9].

A large class of nilpotent distributions is obtained in the case when the coefficients of the vector fields \(X_j\) are polynomials. This includes, as particular cases, the Heisenberg-type distributions, with nilpotence class 2.

The nilpotence and the bracket generating properties are in general independent properties. There are examples of nilpotent distributions which are not bracket generating; and there are bracket generating distributions which are not nilpotent (see [2, p. 48]). However, there are distributions which have both properties, for instance the Heisenberg distribution.

The next result is well-known; it is included here for the sake of completeness and continuity of ideas and it corresponds to a step 1 distribution (a foliation).

Let \((M, g)\) be a two-dimensional, connected and simply connected Riemannian manifold. Assume there are two global vector fields \(X\) and \(Y\) on \(M \) that are linearly independent at each point.

Theorem 1

Let \([X, Y] =0\). Then, for a pair of smooth functions \(a\) and \(b\) defined on \(M\), we have

$$\begin{aligned} \left\{ \begin{array}{l} X f = a \\ Y f = b \end{array} \right. \Longleftrightarrow X b = Ya. \end{aligned}$$

Proof

Since \(\{X, Y\}\) are linearly independent at each point, we may assume the Riemannian metric \(g\) is chosen such that \(\{X, Y\}\) are orthonormal. Under these conditions the gradient of any function \(f\) is given by

$$\begin{aligned} grad\, f = (X f) X + (Yf) Y. \end{aligned}$$

Consider the vector field \(U = aX + b Y\). Then

$$\begin{aligned} \left\{ \begin{array}{l} X f = a \\ Y f = b \end{array} \right. \Longleftrightarrow grad\, f = U \Longleftrightarrow curl\, U =0. \end{aligned}$$
(2.3)

By the definition of curl,

$$\begin{aligned} curl\, U =0 \Longleftrightarrow Wg(U, Z) - Z g(U, W) = g(U, [W, Z]) \end{aligned}$$

for any vector fields \(W\) and \(Z\). Since it suffices that the previous relation holds on the basis \(\{X, Y\}\), we have

$$\begin{aligned} curl\, U =0 \Longleftrightarrow Y a - X b = g(U, [Y, X]), \end{aligned}$$
(2.4)

where we used \(a= g(U, X)\) and \(b = g(U, Y)\). Since \([X, Y] = 0\), relation (2.4) becomes

$$\begin{aligned} curl\, U =0 \Longleftrightarrow Y a - X b = 0. \end{aligned}$$
(2.5)

From (2.3) and (2.5) we get

$$\begin{aligned} \left\{ \begin{array}{l} X f = a \\ Y f = b\\ \end{array} \right. \Longleftrightarrow Y a = X b. \end{aligned}$$
(2.6)

\(\square \)

3 Heisenberg-type distributions

Let \(X\) and \(Y\) be two vector fields on the three-dimensional manifold \(M\), such that

$$\begin{aligned}{}[X, Y]\not =0, \qquad [X, [X, Y]] = [Y, [X, Y]] =0, \end{aligned}$$

and \(X, Y, [X, Y]\) are linearly independent at each point.

Theorem 2

Let \(M\) be a three-dimensional manifold, such that \(\{X, Y\}\) defines a step 2 distribution of nilpotence class 2. For a pair of smooth functions \(a\) and \(b\) defined on \(M\), we have

$$\begin{aligned} \left\{ \begin{array}{l} X^2 b = (XY + [X, Y]) a \\ Y^2 a = (YX -[X, Y]) b\\ \end{array} \right. \Longleftrightarrow \left\{ \begin{array}{l} \exists ~a~smooth~function~f \\ such~that\; Xf = a ~and~ Y~f = b.\\ \end{array} \right. \end{aligned}$$

Proof

Let \(T = [X, Y]\) and consider the Riemannian metric \(g\) with respect to which \(\{X, Y, T\}\) is an orthonormal basis at each point. Then the gradient of \(f\) becomes \(grad\, f = X(f) X + Y(f) Y + T(f) T\). Consider the smooth function \(c = X b - Ya\). We shall complete to a three-dimensional problem by using the sequence of equivalences

$$\begin{aligned} \left\{ \begin{array}{l} X f = a \\ Y f = b\\ \end{array} \right. \Longleftrightarrow \left\{ \begin{array}{l} X f = a \\ Y f = b \\ T f = c.\\ \end{array} \right. \Longleftrightarrow grad\, f = U \Longleftrightarrow curl\, U =0, \end{aligned}$$

where \(U = aX + bY + cT\) and \(grad\) and \(curl\) are taken with respect to the metric \(g\). Let \(A= curl\, U\). Since a tensor is zero if and only if it vanishes on a basis, then

$$\begin{aligned} curl \, U =0 \Longleftrightarrow \left\{ \begin{array}{l} A(X, Y) =0 \\ A(T, X) =0 \\ A(T, Y) =0.\\ \end{array} \right. \end{aligned}$$
(3.1)

Hence it suffices to show the identities on the right side of (3.1). From the curl’s formula (2.2) we have

$$\begin{aligned} A(X, Y)&= Y g(U, X) - X g(U, Y) + g(U, [X, Y])\\&= Y a - X b - g(U, [Y, X])\\&= Ya - Xb + c \\&= 0,\\ A(T, X)&= X g(U, T) - T g(U, X) + g(U, \underbrace{[T, X]}_{=0}) \\&= Xc - Ta \\&= X^2 b - XY a - T a\\&= X^2 b - (X Y +[X, Y]) a\\&= 0, \end{aligned}$$

Similarly, we can show that \(A(T, Y) = 0\), which ends the proof. \(\square \)

In the following we provide a few examples of vector fields which satisfy the previous theorem.

3.1 Heisenberg distribution

The prototype distribution of a constant step 2 everywhere is the Heisenberg distribution. For this case we recover the following result:

Theorem 3

Let \(X_1= \partial _x - 2y \partial _t\), \(X_2 = \partial _y + 2x \partial _t\) be the Heisenberg vector fields on \(\mathbb {R}^3\). The system \(X_1 f = a\), \(X_2 f = b\) has a solution \(f\in {\mathcal F}(\mathbb {R}^3)\) if and only if

$$\begin{aligned} X_1^2 b&= (X_1 X_2 + [X_1, X_2]) a\\ X_2^2 a&= (X_2 X_1 + [X_2, X_1] ) b. \end{aligned}$$

A similar result holds also for the non-symmetrical Heisenberg distribution obtained by taking \(M = \mathbb {R}^3\) and

$$\begin{aligned} X = \partial _x, \quad Y = \partial _y - x \partial _z. \end{aligned}$$

4 Grushin-type distributions of step 2

Let \((M, g)\) be a two-dimensional, connected and simply connected Riemannian manifold. Assume there are two global vector fields \(X\) and \(Y\) on \(M \) that are linearly independent at each point. Assume that \(X, Y\) have a nonzero bracket, while their second brackets iteration vanishes. This corresponds to a step 2 example.

Proposition 1

Let \([X, Y] \not =0\) and \([X, [X, Y]] = [Y, [X, Y]] =0\). If for a given pair of smooth functions defined on \(M\) there is a smooth function \(f\) such that

$$\begin{aligned} \left\{ \begin{array}{l} X f = a \\ Y f = b,\\ \end{array} \right. \end{aligned}$$
(4.1)

then \(a\) and \(b\) satisfy the system

$$\begin{aligned} \left\{ \begin{array}{ll} X^2 b = (X Y + [X, Y])a \\ Y^2 a = (Y X +[Y, X])b.\\ \end{array} \right. \end{aligned}$$
(4.2)

Proof

First notice the equivalence

$$\begin{aligned} \left\{ \begin{array}{ll} X^2 b = (XY + [X, Y])a \\ Y^2 a = (YX +[Y, X])b\\ \end{array} \right. \Longleftrightarrow \left\{ \begin{array}{ll} X(Xb - Ya) = [X, Y]a\\ Y(Xb - Ya) = [X, Y] b.\\ \end{array} \right. \end{aligned}$$

Since \(X b = X Y f\) , \(Ya = YXf\), using that \(X\) and \([X, Y]\) commute we obtain

$$\begin{aligned} X(Xb - Ya) = X(XY f - YX f) = X[X, Y] f = [X, Y] X f = [X, Y]a, \end{aligned}$$

which corresponds to the first of the above relations. The second one can be proved in a similar way. \(\square \)

The next question is whether conditions (4.2) suffice for the existence of a function \(f\) satisfying the system (4.1). We shall see that this holds for some cases but fail for others.

We shall establish first a relation between conditions (4.2) and the curl of the vector field \(U = aX + bY\).

Theorem 4

Let \(U = aX + bY\) and denote \(A=curl\, U\). If \([X, Y]\not =0\) and \([X, [X, Y]] = [Y, [X, Y]] =0\), then

$$\begin{aligned} - X^2 b + (XY + [X, Y]) a&= A([Y, X], X) -X A(Y, X)\\ Y^2 a - (YX + [Y, X]) b&= A([Y, X], Y) - Y A(Y, X). \end{aligned}$$

Proof

From the curl’s formula (2.2) we have

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

so

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

The definition formula of curl (2.1) implies

$$\begin{aligned} g(\nabla _X U, [Y, X]) = g(\nabla _{[Y, X]} U, X) +A([Y, X], X). \end{aligned}$$
(4.4)

Applying \(X\) to the left side of relation (4.3) and using relation (4.4) we have

$$\begin{aligned} X g(U, [Y, X])&= g(\nabla _X U, [Y, X]) + g(U, \nabla _{X} [Y, X]) \nonumber \\&= A([Y, X], X) + g(\nabla _{[Y, X]} U, X) \nonumber \\&+ g(U, \nabla _{[Y, X]} X + \underbrace{[X, [Y, X]]}_{=0}) \nonumber \\&= A([Y, X], X) + g(\nabla _{[Y, X]} U, X) + g(U, \nabla _{[Y, X]} X ) \nonumber \\&= A([Y, X], X) + [Y, X] g(U, X) \nonumber \\&= A([Y, X], X) + [Y, X] a, \end{aligned}$$
(4.5)

where \(\nabla \) stands for the Levi–Civita connection.

Applying \(X\) to the right side of relation (4.3) we obtain

$$\begin{aligned} X A(Y, X) + XY a - X^2 b. \end{aligned}$$

Equating against (4.5) yields

$$\begin{aligned} -X^2 b + (XY + [X, Y]) a = A([Y, X], X) - X A(Y, X). \end{aligned}$$

Similarly, applying \(Y\) to both sides of relation (4.3) yields the second relation. \(\square \)

Corollary 1

If \(curl\, U = 0\) then

$$\begin{aligned} X^2 b&= (XY + [X, Y]) a \\ Y^2 a&= (YX + [Y, X]) b. \end{aligned}$$

Proof

It follows from Theorem 4 by taking \(A=0\). \(\square \)

The converse of Corollary 1 is not necessarily true, unless some extra conditions are required. We shall discuss about this in the following.

Let \( [X, Y] =\alpha X + \beta Y\). Using that \(A\) is a skew-symmetric tensor

$$\begin{aligned} A([Y, X], X)&= -\beta A(Y, X)\\ A([Y, X], Y)&= \alpha A(Y, X). \end{aligned}$$

By Theorem 4 the conditions

$$\begin{aligned} - X^2 b + (XY + [X, Y]) a&= 0\\ Y^2 a - (YX + [Y, X]) b&= 0 \end{aligned}$$

are equivalent to

$$\begin{aligned} X A(Y, X)&= -\beta A(Y, X)\\ Y A(Y, X)&= \alpha A(Y, X). \end{aligned}$$

Since \(A(X, X) = A(Y, Y)=0\), \(A(X, Y) = - A(Y, X)\), the only nonzero component of the curl is \(\rho = A(X, Y)\) with

$$\begin{aligned} X \rho&= -\beta \rho \end{aligned}$$
(4.6)
$$\begin{aligned} Y \rho&= \alpha \rho . \end{aligned}$$
(4.7)

The following result deals with a condition under which Eqs. (4.6) and (4.7) imply \(\rho =0\), and hence \(A=0\).

Proposition 2

Assume

$$\begin{aligned} X^2 b&= (XY + [X, Y]) a \\ Y^2 a&= (YX + [Y, X]) b. \end{aligned}$$

If \( X \alpha + Y \beta \not =0\) then

  1. (i)

    \(\rho \equiv 0;\)

  2. (ii)

    there a smooth function \(f\) such that \(Xf =a\), \(Yf =b\).

Proof

\((i)\) Multiplying Eqs. (4.6) and (4.7) by \(Y\) and \(X\) respectively yields

$$\begin{aligned} YX \rho&= - (Y\beta ) \rho - \beta (Y \rho )\\ XY \rho&= (X\alpha ) \rho + \alpha (X\rho ). \end{aligned}$$

Subtracting we get

$$\begin{aligned}{}[X, Y] \rho = (X \alpha + Y \beta ) \rho + \alpha (X \rho ) + \beta (Y \rho ). \end{aligned}$$

Comparing with

$$\begin{aligned}{}[X, Y] \rho = \alpha (X \rho ) + \beta (Y \rho ) \end{aligned}$$

yields

$$\begin{aligned} (X \alpha + Y \beta ) \rho =0. \end{aligned}$$

which after using the hypothesis implies \(\rho \equiv 0\).

(ii) The condition \(\rho \equiv 0\) implies \(curl\, U =0\); and hence there is a function \(f\) that solves the system \(Xf =a, \;Yf =b\). \(\square \)

It is worth noting that \(X \alpha + Y \beta = div\, [X,Y] \), so the hypothesis of the previous result states that the vector field \([X,Y]\) is not incompressible.

Completing to a zero-curl vector. What happens if the condition \(X \alpha + Y \beta \not =0\) does not hold? In this case we shall complete to a zero-curl vector field. We notice that if \(\rho \) is a solution of the system (4.6) and (4.7) then \(-\rho \) is also a solution. Then we look for a second vector field \(V = \bar{a} X + \bar{b} Y\) such that \(\bar{A}(X, Y) = -\rho \), where \(\bar{A}= curl \, V\), with

$$\begin{aligned} - X^2 \bar{b} + (XY + [X, Y]) \bar{a}&= 0\\ Y^2 \bar{a} + (YX + [Y, X]) \bar{b}&= 0. \end{aligned}$$

Then \(curl\, (U+V) = 0\) and hence there is a function \(f\) satisfying the system

$$\begin{aligned} X f&= a +\bar{a} \end{aligned}$$
(4.8)
$$\begin{aligned} Y f&= b +\bar{b}. \end{aligned}$$
(4.9)

It is worthy to note the role of the extra functions \(\bar{a}\) and \(\bar{b}\) in the closeness condition of these type of sub-Riemannian systems. This technique will be used in the following example.

5 Step 2 Grushin vector fields

Let \(X= \partial _x\), \(Y = x \partial _y\) be vector fields on \(M= \mathbb {R}^2 {\setminus }\{x=0\}\). The metric with respect to which \(\{X, Y\}\) are orthonormal is

$$\begin{aligned} g_{ij} = \left( \begin{array}{cc} 1 &{} 0 \\ 0 &{} \frac{1}{x^2} \\ \end{array} \right) . \end{aligned}$$

Since \([X, Y] \not =0\) and \( [X, [X, Y]] = [Y, [X, Y]]=0\), the hypotheses of Theorem 4 are satisfied. The bracket is given by

$$\begin{aligned}{}[X, Y] = \partial _y = \alpha X + \beta Y = \alpha \partial _x + \beta x \partial _y, \end{aligned}$$

so \(\alpha =0\) and \( \beta = 1/x\). Since

$$\begin{aligned} X\alpha + Y \beta \equiv 0, \end{aligned}$$

then Proposition 1 cannot be applied. Therefore, we need to complete the vector field \(U\) to a zero-curl vector field. First, solve the system (4.6) and (4.7)

$$\begin{aligned} \left\{ \begin{array}{ll} X \rho = -\beta \rho \\ Y \rho = \alpha \rho \\ \end{array} \right. \Longleftrightarrow \left\{ \begin{array}{ll} \partial _x \rho = -\frac{1}{x} \rho \\ x\partial _y \rho = 0 \Longrightarrow \rho = \rho (x).\\ \end{array} \right. \end{aligned}$$

Substituting in the first equation yields \(\rho '(x) = - \frac{\rho (x)}{x}\), with solution \(\rho (x) = \frac{C}{x}\), \(C\) constant. We need to find a vector field \(V = \bar{a} X + \bar{b} Y\), such that \(curl(U+V)=0\); using that \(curl\, V\) is given by

$$\begin{aligned} \bar{A}(X, Y) = Y\bar{a} - X \bar{b} - g(V, [Y, X]) = Y\bar{a} - X \bar{b} +\bar{a} \alpha + \bar{b} \beta , \end{aligned}$$

the condition \(curl(U+V)=0\) becomes

$$\begin{aligned} Y\bar{a} - X \bar{b} +\bar{a} \alpha + \bar{b} \beta = -C/x. \end{aligned}$$

We need to find some functions \(\bar{a}\) and \(\bar{b}\) such that the following three equations are satisfied

$$\begin{aligned} \left\{ \begin{array}{l} Y\bar{a} - X \bar{b} +\bar{a} \alpha + \bar{b} \beta = -C/x\\ - X^2 \bar{b} + (XY + [X, Y]) \bar{a}=0 \\ Y^2 \bar{a} + (YX + [Y, X]) \bar{b} = 0\\ \end{array} \right. \Longleftrightarrow \left\{ \begin{array}{l} x\partial _y \bar{a} - \partial _x \bar{b} - {\bar{b}}/{x} = -C/x\\ -\partial _x^2 \bar{b} + (\partial _x (x \partial _y) + \partial _y) \bar{a} =0 \\ x^2 \partial _y^2 \bar{a} + (x \partial _y \partial _x - \partial _y) \bar{b} =0.\\ \end{array} \right. \end{aligned}$$

It is straightforward to verify that \(\bar{a} = 0\) and \(\bar{b} = C\) satisfy the previous system. Hence a vector field satisfying the conditions we are looking for is \(V = C Y\), with \(C\) constant. Substituting \(a+\bar{a} = a\), \(b+\bar{b} = b+C\) into (4.8) and (4.9) leads to the following result.

Proposition 3

Let \(X=\partial _x\) and \(Y = x \partial _x\). For a pair of smooth functions \(a\) and \(b\) defined on \(\mathbb {R}^2 {\setminus }\{x=0\}\),

$$\begin{aligned} \left\{ \begin{array}{l} X^2 b = (XY + [X, Y]) a \\ Y^2 a = (YX -[X, Y]) b\\ \end{array} \right. \Longleftrightarrow \left\{ \begin{array}{l} \exists ~a~smooth~function~f \\ and~a~constant~C~such~that\\ Xf = a~and~ Y f = b + C.\\ \end{array} \right. \end{aligned}$$

6 Grushin-type distributions of step 3

The prototype is given by the Grushin distribution of step 3 on \({\mathbb R}^2\) generated by the vector fields

$$\begin{aligned} X = \partial _x, \qquad Y = x^2 \partial _y. \end{aligned}$$
(6.1)

A computation shows

$$\begin{aligned}&Z = [X, Y] = 2x \partial _y, \qquad W = [X, Z] = 2 \partial _y, \qquad [Y, Z] =0\\&[X, W] = 0, \qquad [Y, W] = 0. \end{aligned}$$

A Grushin-type distribution of step 3 is a two-dimensional, connected and simply connected manifold \(M\) with two global vector fields \(X\) and \(Y\) which satisfy the following relations

$$\begin{aligned}&Z = [X, Y], \qquad W = [X, Z], \qquad [Y, Z] =0\\&[X, W] = 0, \qquad [Y, W] = 0. \end{aligned}$$

The next result is an analog of Theorem 4 for the case of step 3 Grushin-type manifolds. It is worth noting that the nonsymmetric relations \([X, Z] \not =0\), \([X, Z]=0\) yield integrability conditions of different differentiability degrees.

Theorem 5

Let \(U = aX + bY\) and \(A=curl\, U\). If

$$\begin{aligned}&[X, Y]\not =0, \qquad [X, [X, Y]] \not =0,\\&[Y, [X, Y]] =0, \quad [X, [X, [X, Y]]]=0,\quad [Y, [X, [X, Y]]]=0, \end{aligned}$$

then

$$\begin{aligned} -X^3 b + (X^2Y + X[X, Y] + [X,[X, Y]]) a&= -X^2 A(Y, X) +X A([Y, X], X)\\&+ A([X,[Y, X]], X)\\ Y^2 a - (Y X + [Y, X]) b&= A([Y, X], Y) - Y A(Y, X). \end{aligned}$$

Proof

Formula (2.2)

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

yields

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

Using formula (2.1) we get

$$\begin{aligned} g(\nabla _X U, [Y, X]) = g(\nabla _{[Y, X]} U, X) +A([Y, X], X). \end{aligned}$$
(6.3)

Applying \(X\) to the left side of relation (6.2) and using relation (6.3) we have

$$\begin{aligned} X g(U, [Y, X])&= g(\nabla _X U, [Y, X]) + g(U, \nabla _{X} [Y, X]) \nonumber \\&= A([Y, X], X) + g(\nabla _{[Y, X]} U, X) \nonumber \\&+ g(U, \nabla _{[Y, X]} X + {[X, [Y, X]]}) \nonumber \\ \!&= \! A([Y, X], X) \!+\! g(\nabla _{[Y, X]} U, X) \!+\! g(U, \nabla _{[Y, X]} X ) \!+\! g(U, [X, [Y, X]])\nonumber \\&= A([Y, X], X) + [Y, X] g(U, X)+ g(U, [X, [Y, X]]) \nonumber \\&= A([Y, X], X) + [Y, X] a + g(U, [X, [Y, X]]), \end{aligned}$$
(6.4)

where \(\nabla \) stands for the Levi–Civita connection. Applying \(X\) to (6.4) again yields

$$\begin{aligned} X^2 g(U, [Y, X]) = XA([Y, X], X) + X[Y, X] a + Xg(U, [X, [Y, X]]). \end{aligned}$$
(6.5)

The last term of (6.5) can be computed as in the following

$$\begin{aligned} X g(U, [X, [Y, X]])&= g(\nabla _X U, [X, [Y, X]]) + g(U, \nabla _X [X, [Y, X]])\\&= g(\nabla _X U, [X, [Y, X]]) + g(U, \nabla _{[X, [Y, X]]} X + \underbrace{[X, [X, [Y, X]]]}_{=0})\\&= g(\nabla _X U, [X, [Y, X]]) + g(U, \nabla _{[X, [Y, X]]} X)\\ \!&= \! g(\nabla _X U, [X, [Y, X]]) \!+\! [X, [Y, X]] g(U, X) \!-\! g(\nabla _{[X, [Y, X]]} U, X)\\&= A([X,[Y, X]], X) + [X, [Y, X]] g(U, X)\\&= A([X,[Y, X]], X) + [X, [Y, X]] a. \end{aligned}$$

After substituting into (6.5) yields

$$\begin{aligned} X^2 g(U, [Y, X])&= X A([Y, X], X) + A([X,[Y, X]], X) \nonumber \\&+ (X[Y, X]+ [X, [Y, X]]) a. \end{aligned}$$
(6.6)

Applying \(X^2\) to the right side of relation (6.2) we obtain

$$\begin{aligned} X^2 A(Y, X) + X^2Y a - X^3 b. \end{aligned}$$

Equating against (6.6) yields

$$\begin{aligned} -X^3 b + (X^2Y + X[X, Y] + [X,[X, Y]]) a&= -X^2 A(Y, X) +X A([Y, X], X)\\&+ A([X,[Y, X]], X). \end{aligned}$$

For the second relation, the proof is similar with the one given in the proof of Theorem 4. This is obtained by applying \(Y\) to both sides of relation (6.2) and using that \([Y,[X, Y]]=0\). \(\square \)

Corollary 2

In the hypothesis of Theorem 5, the condition \(curl\, U=0\) implies

$$\begin{aligned} X^3 b&= (X^2Y + X[X, Y] + [X,[X, Y]]) a \end{aligned}$$
(6.7)
$$\begin{aligned} Y^2 a&= (Y X + [Y, X]) b. \end{aligned}$$
(6.8)

Proof

Make \(A=0\) in Theorem 5. \(\square \)

The converse of the aforementioned corollary does not hold true in general. The integrability conditions (6.7) and (6.8) are equivalent to

$$\begin{aligned} X^2 A(Y, X)&= X A([Y, X], X) + A ([X, [Y, X]], X) \end{aligned}$$
(6.9)
$$\begin{aligned} Y A(Y, X)&= A([Y, X], Y) \end{aligned}$$
(6.10)

Let \([X, Y] = \alpha X + \beta Y\). The only non-zero component of the curl is \(\rho = A(X, Y)\). Using

$$\begin{aligned}{}[X,[X,Y]] = (X\alpha + \alpha \beta )X + (X \beta + \beta ^2) Y \end{aligned}$$

and the skew-symmetry of the tensor \(A\), we have

$$\begin{aligned} A([X, [Y, X]], X)&= (X \beta +\beta ^2) \rho \\ A([Y, X], X)&= \beta \rho \\ A([Y, X], Y)&= -\alpha \rho . \end{aligned}$$

Substituting in (6.9) and (6.10) yields

$$\begin{aligned} X^2 \rho + \beta \, X\rho + (2X \beta + \beta ^2) \rho&= 0 \end{aligned}$$
(6.11)
$$\begin{aligned} Y \rho&= \alpha \rho . \end{aligned}$$
(6.12)

We shall solve this system of equation in the following particular case.

6.1 The step 3 Grushin distribution

In the case of the vector fields (6.1) we can easily obtain \(\alpha =0,\,\beta = \frac{2}{x}\). Then the system (6.11) and (6.12) becomes

$$\begin{aligned} \partial _x^2 \rho + \frac{2}{x} \, \partial _x\rho + \Big (2 \partial _x \Big ( \frac{2}{x} \Big ) + \frac{4}{x^2}\Big ) \rho&= 0 \\ x^2 \partial _x \rho&= 0 \Longrightarrow \rho = \rho (x), \, x\not =0, \end{aligned}$$

and hence the first equation becomes

$$\begin{aligned} \rho ''(x) + \frac{2}{x} \rho '(x) = 0, \end{aligned}$$

which becomes an Euler equation after multiplying by \(x^2\). The solution is given by \(\rho (x) = \frac{C_1}{x} + C_2 \), with \(C_1\), \(C_2\) constants. Hence \(curl\,(U) \,(X, Y) = \frac{C_1}{x} + C_2 \).

Starting from \(U\), we shall complete to a zero-curl vector field. We notice that if \(\rho \) is a solution of the system (6.11) and (6.12) then \(-\rho \) is also a solution. Then we look for a second vector field \(V = \bar{a} X + \bar{b} Y\) such that \(\bar{A}(X, Y) = -\rho \), where \(\bar{A}= curl \, V\), with

$$\begin{aligned} X^3 \bar{b}&= (X^2Y + X[X, Y] + [X,[X, Y]]) \bar{a} \\ Y^2 \bar{a}&= (Y X + [Y, X]) \bar{b}. \end{aligned}$$

Then \(curl\, (U+V) = 0\) and hence there is a function \(f\) satisfying the system

$$\begin{aligned} X f&= a +\bar{a} \end{aligned}$$
(6.13)
$$\begin{aligned} Y f&= b +\bar{b}. \end{aligned}$$
(6.14)

It suffices to find a vector field \(V = \bar{a} X + \bar{b} Y\), such that \(curl(U+V)=0\); using that \(curl\, V\) is given by

$$\begin{aligned} \bar{A}(X, Y) = Y\bar{a} - X \bar{b} - g(V, [Y, X]) = Y\bar{a} - X \bar{b} +\bar{a} \alpha + \bar{b} \beta , \end{aligned}$$

the condition \(curl(U+V)=0\) becomes

$$\begin{aligned} Y\bar{a} - X \bar{b} +\bar{a} \alpha + \bar{b} \beta = -\frac{C_1}{x}- C_2. \end{aligned}$$

This reduces to finding some functions \(\bar{a}\) and \(\bar{b}\) such that the following three equations are satisfied

$$\begin{aligned} \left\{ \begin{array}{l} Y\bar{a} - X \bar{b} +\bar{a} \alpha + \bar{b} \beta = -\frac{C_1}{x}- C_2\\ X^3 \bar{b} = (X^2Y + X[X, Y] + [X,[X, Y]]) \bar{a} \\ Y^2 \bar{a} = (Y X + [Y, X]) \bar{b}.\\ \end{array} \right. \Longleftrightarrow \left\{ \begin{array}{l} x^2\partial _y \bar{a} - \partial _x \bar{b} + \frac{2}{x} {\bar{b}} = -\frac{C1}{x} - C_2\\ \partial _x^3 \bar{b} = \Big (\partial _x^2 (x^2 \partial _y) + \partial _x (2x\partial _y) + 2\partial _y\Big ) \bar{a}\\ x^4 \partial _y^2 \bar{a} = (x^2 \partial _y \partial _x - 2x\partial _y) \bar{b}.\\ \end{array} \right. \end{aligned}$$

We can check by a direct computation that \(\bar{a} = 0\) and \(\bar{b}= - C_2 x -\frac{C_1}{2}\) satisfy the aforementioned system of equations. Therefore, the desired vector field is \(V = 0\cdot X + (- C_2 x -\frac{C_1}{2}) Y\), with \(C_1\), \(C_2\) constants. Substituting \(a+\bar{a} = a\) and \(b+\bar{b} = b - C_2 x -\frac{C_1}{2}\) into (6.13) and (6.14) and renaming the constants leads to the following result.

Proposition 4

Let \(X=\partial _x\) and \(Y= x^2\partial _y\). For a pair of smooth functions \(a\) and \(b\) defined on \(\mathbb {R}^2 {\setminus }\{x=0\}\),

$$\begin{aligned} \left\{ \begin{array}{l} X^3 {b} \!=\! (X^2Y + X[X, Y] + [X,[X, Y]]) {a} \\ Y^2 {a} \!=\! (Y X + [Y, X]) {b}.\\ \end{array} \right. \!\Longleftrightarrow \! \left\{ \begin{array}{l} \exists \,\textit{a smooth function}\,f \\ \textit{and constants}\,C\,\textit{and}\,D\,\textit{such that}\\ Xf = a \,\textit{and} \,Y f = b + Cx+D. \end{array} \right. \end{aligned}$$

Remark 1

The previous system of equations might have also other solutions \((\bar{a}, \bar{b})\). However, looking for a solution with \(\bar{a} = 0\) is equivalent with keeping the first exactness condition in the simple form \(X f = a\).

7 Conclusions

The integrability conditions of a sub-Riemannian system varies widely from system to system. The general formula for the closeness condition of such system is complicated, especially for the cases of nonconstant step distributions where the spaces generated by the Lie brackets jump in dimension from point to point.

The cases of step 2 and 3 Grushin distributions and the Heisenberg-type distributions are completely solved, while there are many other cases still to investigate. The method of completing to a zero-curl vector field played a central role in our approach and might be useful in more general cases.