1 Introduction

The Pompeiu problem traces back to 1929, and has been one of the most extensively investigated issues both in applied and abstract mathematics. Even if the original formulation given by Pompeiu in his basic papers [5,6,7] included some supplementary assumptions, nowadays the vague appellation of Pompeiu problem may label any question which sounds like this:

Let \(D \subseteq {{\mathbb {R}}}^n\) be a measurable set and f a continuous real-valued function on \({{\mathbb {R}}}^n\) whose integral on every set “congruent” to D takes a constant value c. Must then the function f be itself constant?

If a domain \(D\subseteq {{\mathbb {R}}}^n\) is such that the above question is answered in the positive for every continuous function \(f:{{\mathbb {R}}}^n\rightarrow {{\mathbb {R}}}\) satisfying the assumption, then D is said to have the Pompeiu property (of course, this depends also on the definition of “congruent” we are considering). In the literature, at our best knowledge, all papers devoted to the Pompeiu problem are concerned with the case where D is convex, or at least connected. For example, it is well-known that, when considering rigid motions (translations composed with rotations), any ball in \({{\mathbb {R}}}^n\) fails to enjoy the Pompeiu property, while it holds for some classes of domains whose boundary is homeomorphic to \({{\mathbb {S}}}^{n-1}\) (as ellipses and regular polygons in the plane, see [1,2,3] and the survey paper [9]). Before entering into the analysis of the present paper, let us mention that the Pompeiu’s problem is interconnected with different recent research fields; let us mention, for instance, the papers [4] and [8] where the regularity of the boundary of a convex domain is linked to the presence of the Pompeiu’s property for the same domain.

As far as only connected domains are investigated, the Pompeiu problem is of no interest in \({{\mathbb {R}}}\): clearly, for every bounded interval [ab], the function \(f(x)=\sin \big (\frac{2\pi }{b-a}x\big )\) is non-constant and such that its integral is 0 on every subset of \({{\mathbb {R}}}\) congruent to [ab] (in fact, this is just a special case of the above-mentioned result, that no ball in \({{\mathbb {R}}}^n\) may enjoy the Pompeiu property). However, once the connectedness assumption is dropped, the one-dimensional case becomes non-trivial, and this corresponds exactly to the kind of investigation carried out in the present paper.

More specifically, our study has been focused on the following situation. Let I be a finite union of disjoint bounded intervals of the real line and let \(\textrm{Iso}({{\mathbb {R}}})\) be the group of isometries of \({{\mathbb {R}}}\) (recall that every isometry from the subset I to \({{\mathbb {R}}}\) is the restriction of some isometry from the whole of \({{\mathbb {R}}}\) (on)to \({{\mathbb {R}}}\)). Denoting with \(\Sigma \) an arbitrary subgroup of \(\textrm{Iso}({{\mathbb {R}}})\), we address the following question: when is it true that for every continuous function \(f:{{\mathbb {R}}}\rightarrow {{\mathbb {R}}}\), the implication

$$\begin{aligned} \left( \exists C \in {{\mathbb {R}}}\quad \forall \sigma \in \Sigma \quad \int _{\sigma (I)}f = C \right) \quad \implies \quad f\,constant \end{aligned}$$
(1)

holds? (Notice, in passing, that if (1) fails for some constant C then it fails for every constant \(C' \in {{\mathbb {R}}}\)).

In our study, we have tackled question (1) in two cases: namely, \(\Sigma =\textrm{Tr}({{\mathbb {R}}})\), the set of all translations of the real line, and \(\Sigma =\textrm{Iso}({{\mathbb {R}}})\). The results obtained in the two cases have turned out to be quite different.

In Proposition 2.3infra we prove that, whenever I is the union of two bounded disjoint intervals, it fails to enjoy the Pompeiu property with respect to \(\Sigma =\textrm{Tr}({{\mathbb {R}}})\). In fact, the argument used for the proof outlines an inductive procedure to obtain a non-constant real function whose integral on every translation-image of I is constant. As we point out in Remark 2.4, the result extends to any finite union of disjoint bounded intervals, by an analogous but technically heavier (and tedious) proof.

On the other hand, when taking \(\Sigma =\textrm{Iso}({{\mathbb {R}}})\), even for the union of two disjoint intervals the situation appears to be multi-faceted, and the answer to the basic question depends on the relationships between the three fundamental quantities involved: the length of the two intervals and their gap. Theorem 2.12infra gives a necessary and sufficient condition for I to enjoy the Pompeiu property in this case; in particular, the statement emphasizes the crucial rôle played by the rational or irrational character of some ratios related to the three quantities above.

Contrary to the results obtained for translations, when \(\Sigma =\textrm{Iso}({{\mathbb {R}}})\) passing from two to three intervals considerably boosts the complexity of the problem. In this paper we do not investigate in detail the three-interval (nor the more-interval) case. However, we prove that from every two-interval set (even enjoying the Pompeiu property) we may always obtain, by adding a third interval, a set for which the property does not hold; and we also give an example of a situation where the opposite phenomenon happens. The former result appears, in particular, to be somehow anti-intuitive, as it could seem reasonable that increasing the complexity of the set, the probability of getting the Pompeiu property increases as well. This should show how interesting and probably twisted would be a systematic study of the Pompeiu problem for multi-interval sets, when taking \(\Sigma =\textrm{Iso}({{\mathbb {R}}})\).

2 The two-interval case

In this section we study conjecture (1) stated in the introduction, when we deal with continuous functions and I is the disjoint union of two non-trivial compact intervals.

In a first result we take into account the non-trivial subset \(\textrm{Tr}({{\mathbb {R}}})\subset \textrm{Iso}({{\mathbb {R}}})\) of translations on the real line: in this case (1) is false, and we will prove the existence on infinitely many non-constant functions satisfying the integral condition. On the other hand, when also reflections are allowed, we will find a necessary and sufficient condition on I in order to obtain a positive answer.

We start proving that the integral condition, when \(\sigma \) varies in the set of translations \(\textrm{Tr}({{\mathbb {R}}})\), is equivalent to a pointwise one.

Lemma 2.1

Let \(a<b<c<d\) and \(f \in {\mathcal {C}}({{\mathbb {R}}})\). Then the following two conditions are equivalent:

  1. (I)

    \(\displaystyle F(t):= \int _{a+t}^{b+t}f(x)dx + \int _{c+t}^{d+t}f(x)dx\) is constant as t varies in \({{\mathbb {R}}}\);

  2. (P)

    \(f(a+t) + f(c+t) = f(b+t) + f(d+t)\), for every \(t \in {{\mathbb {R}}}\), i.e.

    $$\begin{aligned} \forall x \in {{\mathbb {R}}},\; f(x) = f(x+a-d) + f(x+c-d) - f(x+b-d). \end{aligned}$$
    (2)

Proof

(I) \( \Rightarrow \) (P) Trivially follows deriving the constant function F.

(P) \( \Rightarrow \) (I) Let \(t',t'' \in {{\mathbb {R}}}\) with \(t'<t''\), and set, for the sake of simplicity \(s:= t''-t'\), \(a':= a+t'\), \(b':= b+t'\), \(c':= c+t'\), \(d':= d+t'\) and

$$\begin{aligned} r':= \int _{a+t'}^{b+t'}f(x)dx + \int _{c+t'}^{d+t'}f(x)dx = \int _{a'}^{b'}f(x)dx + \int _{c'}^{d'}f(x)dx. \end{aligned}$$

Our aim is to prove that

$$\begin{aligned} r'':= \int _{a+t''}^{b+t''}f(x)dx + \int _{c+t''}^{d+t''}f(x)dx =r'. \end{aligned}$$

Using assumption (2) and the definition of \(r'\), we see that

$$\begin{aligned} \begin{aligned} r''&= \int _{a'+s}^{b'+s}f(x)dx + \int _{c'+s}^{d'+s}f(x)dx \\ {}&= r' - \int _{a'}^{a'+s}f(x)dx + \int _{b'}^{b'+s}f(x)dx - \int _{c'}^{c'+s}f(x)dx \\ {}&\quad \quad + \left( \int _{d'}^{d'+s} [f(x+a-d) + f(x+c-d) - f(x+b-d)] dx \right) . \end{aligned} \end{aligned}$$
(3)

Now, straightforward changes of variables show that

$$\begin{aligned} \begin{aligned} \int _{d'}^{d'+s} f(x+a-d) dx&= \int _{d'+a-d}^{d'+s+a-d} f(z) dz = \int _{a'}^{a'+s} f(z) dz, \\ \int _{d'}^{d'+s} f(x+c-d) dx&= \int _{c'}^{c'+s} f(z) dz,\\ \int _{d'}^{d'+s} f(x+b-d) dx&= \int _{b'}^{b'+s} f(z) dz, \end{aligned} \end{aligned}$$

and we conclude by replacing in (1). \(\square \)

Remark 2.2

The previous lemma still holds when \(f \in L^1_{loc}({{\mathbb {R}}})\) if we read the pointwise equality on \({{\mathbb {R}}}\) except a zero-measure set.

Proposition 2.3

Let \(I=[a,b]\cup [c,d]\), for some \(a<b<c<d\), and \(\Sigma =\textrm{Tr}({{\mathbb {R}}})\). Then conjecture (3) is false in the realm of continuous functions.

Proof

Let \(C\in {{\mathbb {R}}}\) and \(f_0 \in {\mathcal {C}}([a,d])\) be such that

$$\begin{aligned} f_0(d) = f_0(a)+f_0(c)-f_0(b) \quad \text {and} \quad \int _I f_0(x)dx =C. \end{aligned}$$

We now consider the sequence of functions \((f_n)_{n\ge 1}\) defined by the recurrence relation:

$$\begin{aligned} f_n(x):= {\left\{ \begin{array}{ll} &{} f_{n-1}(x+b-a) - f_{n-1}(x+c-a) + f_{n-1}(x+d-a), \\ {} &{} \qquad \qquad \quad \text {if } x \in [a-n(b-a),a-(n-1)(b-a)), \\ {} &{} f_{n-1}(x), \quad \text {if } x \in [a-(n-1)(b-a),d+(n-1)(d-c)], \\ {} &{} f_{n-1}(x+a-d) + f_{n-1}(x+c-d) - f_{n-1}(x+b-d), \\ {} &{} \qquad \qquad \quad \text {if } x \in (d+(n-1)(d-c),d+n(d-c)]. \end{array}\right. } \end{aligned}$$

Actually, for every n, \(f_n\) is an extension of \(f_{n-1}\); it is then straightforward to verify that each \(f_n\) is well defined and continuous on \([a-n(b-a),d+n(d-c)]\), and that \(f_n\) converges to some \(f \in {\mathcal {C}}({{\mathbb {R}}})\). Such limit function, by definition, also verify the pointwise relation (2), hence, by Lemma 2.1, its integral on \(\sigma (I)\) does not depend on the translation \(\sigma \). We conclude observing that, when \(\sigma \) is the identity

$$\begin{aligned} \int _I f(x)dx = \int _I f_0(x)dx = C. \end{aligned}$$

\(\square \)

Remark 2.4

Both Lemma 2.1 and Proposition 2.3 still hold when I is the disjoint union of more then two compact intervals, that is

$$\begin{aligned} I = \bigcup _{i=1}^N [a_i,b_i], \quad a_1< b_1< a_2< \ldots< a_N < b_N. \end{aligned}$$

We omit the proofs since they are the perfect analogue of the ones we have proposed.

When the set \(\Sigma \) coincides with the set of all isometries of the real line (i.e., translations, reflections and their compositions), then the situation turns out to be quite different and, instead of the negative result of Proposition 2.3, we obtain a necessary and sufficient condition in order the Pompeiu’s conjecture to hold. In a similar way to the statement of Proposition 2.3, in the argument we are going to carry out we will consider a set \(I=[a,b]\cup [c,d]\), with \(a<b<c<d\) arbitrarily fixed real numbers. Since the problem is clearly isometric-invariant, the fundamental quantities involved are the lengths of the two intervals [ab],[cd] and of the hole between them. Thus, we define

$$\begin{aligned} \ell := b-a, \qquad H:= c-b, \qquad L:= d-c, \end{aligned}$$

which yields the equality \(I=[0,\ell ] \cup [\ell +H,\ell +H+L]\). Moreover, since reflections are also allowed, it is not restrictive to assume that \(L\ge \ell \). Furthermore, given \(\alpha< \beta< \gamma < \delta \) and a (measurable) function \(f:{{\mathbb {R}}}\rightarrow {{\mathbb {R}}}\), we define

$$\begin{aligned}{}[\lambda , \xi , \Lambda ;\alpha ] = [\lambda , \xi , \Lambda ;\alpha ]_f:= \int _{\alpha }^{\beta } f(x) dx +\int _{\gamma }^{\delta } f(x) dx, \end{aligned}$$

and similarly

$$\begin{aligned}{}[\lambda , \xi , \Lambda ^-;\alpha ]:= \int _{\alpha }^{\beta } f(x) dx -\int _{\gamma }^{\delta } f(x) dx, \qquad [\lambda ^-, \xi , \Lambda ^-;\alpha ]:= -[\lambda , \xi , \Lambda ;\alpha ], \end{aligned}$$

whenever \(\lambda := \beta -\alpha \), \(\Lambda := \delta -\gamma \) and \(\xi := \gamma -\beta \). With this notation, for all \(C \in {{\mathbb {R}}}\)

$$\begin{aligned}{} & {} \left( \forall \sigma \in \Sigma =\textrm{Iso}({{\mathbb {R}}}) \quad \int _{\sigma (I)}f = C \right) \nonumber \\{} & {} \quad \iff \quad \left( \forall x \in {{\mathbb {R}}}\quad \left[ \ell ,H,L; x\right] = \left[ L,H,\ell ;x\right] =C \right) . \end{aligned}$$
(4)

Lemma 2.5

If \(f:{{\mathbb {R}}}\rightarrow {{\mathbb {R}}}\) is such that one of the two equivalent assumptions of (4) holds (with \(\ell ,L,H\) as above), then letting \(H'=3H+L+\ell \) we have the equalities

$$\begin{aligned} \left[ \ell ,H',L;x\right] = C = \left[ L,H',\ell ;x\right] \quad \text {for every }x \in {{\mathbb {R}}}. \end{aligned}$$

Moreover,

$$\begin{aligned} \frac{L-\ell }{L+H} \in {{\mathbb {Q}}}\quad \iff \quad \frac{L-\ell }{L+H'} \in {{\mathbb {Q}}}. \end{aligned}$$
(5)

Proof

On the one hand we have, for every \(x \in {{\mathbb {R}}}\),

$$\begin{aligned}{}[\ell ,H,L;x] =C \quad \text {and} \quad [L, H, \ell ;\ell +H+x] =C; \end{aligned}$$

hence, subtracting term by term the latter equation from the former one (we refer to Fig. 1),

$$\begin{aligned}{}[\ell , H+L+H, \ell ^-;x]=0 \quad \text {for every } x \in {{\mathbb {R}}}. \end{aligned}$$

On the other hand, since \([\ell , H, L;\ell +H+L+H+x] = C\) also holds for any \(x \in {{\mathbb {R}}}\), then summing term by term we obtain the first of the required equalities

$$\begin{aligned}{}[\ell ,H+L+H+\ell +H,L;x] = C. \end{aligned}$$

In a completely symmetric way, it is also proved the second one.

As for the equivalence displayed in (5), letting \(\alpha = \frac{L-\ell }{L+H'}\) and \(\beta = \frac{L-\ell }{L+H}\) we see that \(\alpha =\frac{\beta }{3-\beta }\) and \(\beta = \frac{3\alpha }{1+\alpha }\). \(\square \)

Fig. 1
figure 1

Procedure to reduce to the case where \(H>L=\max (L,\ell )\)

From now on, f will be a (arbitrarily fixed) continuous function for which one of the two equivalent conditions given by (4) holds. For the sake of simplicity, in the next results we will also use the following labelling

(H1):

\(\displaystyle \frac{\ell }{L} \notin {{\mathbb {Q}}}\);

(H2):

\(\displaystyle \frac{L-\ell }{2(L+H)} = \frac{n}{m}\), with n and m coprime natural numbers;

(\(\lnot \)H2):

\(\displaystyle \frac{L-\ell }{L+H} \notin {{\mathbb {Q}}}\);

(H3):

\(\displaystyle \frac{L+\ell }{H} \notin {{\mathbb {Q}}}\).

Remark 2.6

Let us observe that when \(\ell = L\) assumption (H1) does not hold, (H2) holds, while we can not say anything about (H3). In this case Lemma 2.7 does not give any information on the function f and Lemmata 2.8, 2.9 and 2.10 can not be applied. Nevertheless, Theorem 2.12 still holds since in this case (\(\lnot \)H1) is satisfied and the proof is straightforward.

Lemma 2.7

If (H3), then f is \((L-\ell )\)-periodic.

Proof

Let us define the auxiliary function

$$\begin{aligned} \varphi (x):= \int _{x}^{x+(L-\ell )} f(s) ds,\quad \text {for every } x \in {{\mathbb {R}}}; \end{aligned}$$

we are then reduced to prove that \(\varphi \) is a constant function. By assumption, for every \(x \in {{\mathbb {R}}}\), there holds

$$\begin{aligned}{}[L, H, \ell ;x] =C \quad \text {and} \quad [\ell , H, L;x] =C, \end{aligned}$$

hence, subtracting the second equation from the first one (the reader can visualize such a procedure in Fig. 2), we obtain

$$\begin{aligned}{}[L-\ell ,H-(L-\ell ),(L-\ell )^-;x+\ell ]=0, \quad \text {for every } x \in {{\mathbb {R}}}, \end{aligned}$$

or, equivalently,

$$\begin{aligned} \varphi (x) = \varphi (x+H), \quad \text {for every } x \in {{\mathbb {R}}}. \end{aligned}$$

On the other hand, the assumption can be read as

$$\begin{aligned}{}[L, H, \ell ;x] =C \quad \text {and} \quad [\ell , H, L;x+(L-\ell )] =C, \end{aligned}$$

implying \( [L-\ell ,H+2\ell ,(L-\ell )^-;x]=0, \) for every \(x \in {{\mathbb {R}}}\), or, equivalently,

$$\begin{aligned} \varphi (x) = \varphi (x+H+L+\ell ), \quad \text {for every } x \in {{\mathbb {R}}}. \end{aligned}$$

Since \((H+L+\ell )/H\) is not rational, and the continuous function \(\varphi \) is at the same time H-periodic and \((H+L+\ell )\)-periodic, then \(\varphi \) is necessarily constant.

\(\square \)

Fig. 2
figure 2

the picture at left represents the procedure to obtain the H-periodicity for the function \(\varphi \); at right, the one for the \((H+L+\ell )\)-periodicity

Lemma 2.8

If (H1) and (H2) then (H3).

Proof

By assumption (H2) we have \(H = \frac{(m-2n)L - m\ell }{2n}\) and

$$\begin{aligned} \frac{L+\ell }{H} = 2n\frac{\frac{L}{\ell } + 1}{(m-2n)\frac{L}{\ell } - m}, \end{aligned}$$

that is not a rational number if (and only if) (H1) holds. \(\square \)

Lemma 2.9

If (\(\lnot \)H2), then f is \((L+\ell )\)-periodic.

Proof

Thanks to Lemma 2.5, we may assume (up to replacing H with \(H'=3H+L+\ell \)) that \(H>L\); notice, in particular, that \(H'\) still satisfies (\(\lnot \)H2) once H does.

Let us define the auxiliary function

$$\begin{aligned} \psi (x):= \int _{x}^{x+(L+\ell )} f(s) ds,\quad \text {for every } x \in {{\mathbb {R}}}: \end{aligned}$$

we claim that \(\psi \) is at the same time \(2(L+H)\)- and \(2(\ell +H)\)-periodic. Since assumption (\(\lnot \)H2) is equivalent to \(\frac{\ell +H}{L+H} \notin {{\mathbb {Q}}}\) (just write \(\frac{\ell +H}{L+H} = 1-\frac{L-\ell }{L+H}\)), we will then conclude that \(\psi \) is a constant function, hence f is \((L+\ell )\)-periodic.

By assumption, we see that

$$\begin{aligned}{}[L, H, \ell ;x] = C \quad \text {and} \quad [\ell , H, L;x+L] =C, \quad \text {for every } x \in {{\mathbb {R}}}; \end{aligned}$$

taking into account that \(H>L\), we may sum both terms of the above equalities (see Fig. 3) to obtain

$$\begin{aligned}{}[L+\ell , H-\ell , L+\ell ;x] = 2C, \quad \text {for every } x \in {{\mathbb {R}}}. \end{aligned}$$
(6)

By translating of \(L+H\) the above equality and changing the sign, we see that

$$\begin{aligned}{}[(L+\ell )^-, H-\ell , (L+\ell )^-;x+L+H] = -2C, \quad \text {for every } x \in {{\mathbb {R}}}; \end{aligned}$$
(7)

again, summing both terms of (6) and (7), it follows that

$$\begin{aligned}{}[L+\ell , 2H+L-\ell , (L+\ell )^-;x] = 0, \quad \text {for every } x \in {{\mathbb {R}}}, \end{aligned}$$

which is equivalent to the \(2(H+L)\)-periodicity of \(\psi \).

Swapping L with \(\ell \) we obtain the \(2(H+\ell )\)-periodicity of \(\psi \). \(\square \)

Fig. 3
figure 3

procedure to obtain the \((L+H)\)-periodicity of \(\psi \)

Lemma 2.10

If (H1) and (H2) then f is \(2(L+H)\)-periodic.

Proof

Since, by Lemmata 2.7 and 2.8, f is \((L-\ell )\)-periodic, there exists a constant \(k \in {{\mathbb {R}}}\) such that \(\left( \int _x^{x+L-\ell }f(s) ds\right) /(L-\ell ) = k\), for any \(x \in {{\mathbb {R}}}\). Let us define the \((L-\ell )\)-periodic function

$$\begin{aligned} g(x) = f(x) - k, \qquad x \in {{\mathbb {R}}}. \end{aligned}$$

By definition, \(\int _x^{x+L-\ell }g = 0\) for any \(x \in {{\mathbb {R}}}\); furthermore g satisfies (4), indeed (since f satisfies such an assumption for some constant \(C \in {{\mathbb {R}}}\))

$$\begin{aligned} \int _{\sigma (I)}g(s) ds = \int _{\sigma (I)}f(s) ds - k (L+\ell ) = C - k (L+\ell ). \end{aligned}$$

We term \(C_g =C - k (L+\ell )\) and we plan to prove that g (and, as a consequence, f) is \(2(L+H)\)-periodic.

Let us consider the set

$$\begin{aligned} \Delta = \left\{ mL+n(L-\ell ): m,n \in {{\mathbb {Z}}}\right\} ; \end{aligned}$$

since, by assumption, \(\frac{L}{L-\ell }\) is not rational, the set \(\Delta \) is dense in \({{\mathbb {R}}}\). It turns out, as we will show later, that for every \(m,n \in {{\mathbb {Z}}}\), denoting \(t = mL+n(L-\ell )\) the corresponding element in \(\Delta \), there holds

$$\begin{aligned} \int _{x}^{x+t} g(s) ds + \int _{x+L+H}^{x+L+H+t} g(s) ds = mC_g,\quad \text {for every } x \in {{\mathbb {R}}}. \end{aligned}$$
(8)

Differentiating by x the previous equation, we obtain, for every \(x \in {{\mathbb {R}}}\), that the continuous function

$$\begin{aligned} h_x(t):= g(x+t)-g(x)+g(x+L+H+t)-g(x+L+H), \quad t \in {{\mathbb {R}}}, \end{aligned}$$

vanishes on the dense set \(\Delta \subset {{\mathbb {R}}}\), hence it vanishes on the whole of \({{\mathbb {R}}}\) and we conclude that

$$\begin{aligned} g(x+L+H+t)-g(x+L+H) = -\left[ g(x+t)-g(x) \right] , \quad \text {for every } t,x \in {{\mathbb {R}}}. \end{aligned}$$
(9)

From the last equation, we deduce, for every \(t,x \in {{\mathbb {R}}}\), the following integral relation,

$$\begin{aligned} \begin{aligned}&\int _{x+L+H}^{x+L+H+t}[g(s)-g(x+L+H)]ds\\&\quad = \int _{x}^{x+t}[g(s'+L+H)-g(x+L+H)]ds' \\&\quad = \int _{x}^{x+t}[g((s'-x)+x+L+H)-g(x+L+H)]ds' \\&\quad = -\int _{x}^{x+t}[g(s')-g(x)]ds' \end{aligned} \end{aligned}$$

that can be written as

$$\begin{aligned}{} & {} \int _{x+L+H}^{x+L+H+t}g(s)ds +\int _{x}^{x+t}g(s)ds \\{} & {} \quad = [g(x+L+H) +g(x)]t, \quad \text {for every } t,x \in {{\mathbb {R}}}. \end{aligned}$$

We now deduce the \(2(L+H)\)-periodicity of g comparing the previous relation with equation (8). Indeed, for every \(x \in {{\mathbb {R}}}\) and \(t = mL+n(L-\ell ) \in \Delta \) there holds

$$\begin{aligned}{}[g(x+L+H) +g(x)]t = mC_g; \end{aligned}$$

choosing \(m=0\) and \(n\ne 0\) we see that \(g(x+L+H) = -g(x)\) for every \(x \in {{\mathbb {R}}}\), whence \(g(x+2(L+H)) = -g(x+L+H) = g(x)\).

Thus, we are left to prove equation (8). To this end, we will use “induction” on \({{\mathbb {Z}}}\).

When \(m=0\) the equation follows from the fact that \(\int _a^{a+L-\ell }g=0\), for every \(a \in {{\mathbb {R}}}\). If \(m\ge 0\) and we assume (8) holds for that m, then we have the equalities

$$\begin{aligned} \begin{aligned} \int _{x+L+H}^{x+L+H+(m+1)L+n(L-\ell )} g(s) ds&= \int _{x+L+H}^{x+L+H+mL+n(L-\ell )} g(s) ds \\ {}&\quad + \int _{x+L+H+mL+n(L-\ell )}^{x+L+H+(m+1)L+n(L-\ell )} g(s) ds \\ {}&= - \int _{x}^{x+mL+n(L-\ell )} g(s) ds \\ {}&\quad + mC_g + \int _{x+L+H+mL+n(L-\ell )}^{x+L+H+(m+1)L+n(L-\ell )} g(s) ds. \end{aligned} \end{aligned}$$

Thus we will be done if we can prove that

$$\begin{aligned} \begin{aligned} \int _{x+L+H+mL+n(L-\ell )}^{x+L+H+(m+1)L+n(L-\ell )} g(s) ds&= C_g + \int _{x}^{x+mL+n(L-\ell )} g(s) ds\\&\quad - \int _{x}^{x+(m+1)L+n(L-\ell )} g(s) ds \\ {}&= C_g - \int _{x+mL+n(L-\ell )}^{x+(m+1)L+n(L-\ell )} g(s) ds, \end{aligned} \end{aligned}$$

which is equivalent to (replacing \(a =x+mL+n(L-\ell )\))

$$\begin{aligned} \int _{a+L+H}^{a+L+H+L} g(s) ds + \int _{a}^{a+L} g(s) ds = C_g. \end{aligned}$$

Since g has vanishing integral on intervals with length \(L-\ell \), the first integral in the previous equality is \(\int _{a+L+H}^{a+L+H+\ell } g(s) ds\); the equality holds true by the definition of the constant \(C_g\). To conclude our proof we still have to consider the case where \(m<0\). Replacing \(x'=x+mL+n(L-\ell )\) the left hand side of equation (8) reads as

$$\begin{aligned} - \int _{x'}^{x'-mL-n(L-\ell )}g(s) ds - \int _{x'+L+H}^{x'+L+H-mL-n(L-\ell )}g(s) ds, \end{aligned}$$

which is equal to \(-(-mC_g) = mC_g\) using what we have already proved for positive values of m. \(\square \)

Corollary 2.11

If (H1) and (H2) with m even, then f is \((L+H)\)-periodic.

Proof

By Lemmata 2.7, 2.8 and 2.10 the function f is at the same time \((L-\ell )-\) and \(2(L+H)\)-periodic. Let \(k \in {{\mathbb {N}}}\) be such that \(m=2k\), then, by assumption (H2), n is odd and we conclude writing

$$\begin{aligned} L+H = k(L-\ell ) + \frac{1-n}{2}2(L+H). \end{aligned}$$

\(\square \)

Theorem 2.12

Let \(I=[a,b]\cup [c,d]\) for some \(a<b<c<d\), and \(\Sigma = \textrm{Iso}({{\mathbb {R}}})\). Then conjecture (1) holds for \(f \in {\mathcal {C}}({{\mathbb {R}}})\) if and only if

$$\begin{aligned} (H1)\,\wedge \,\,\Big (\,\big (\,(\lnot H2)\,\wedge \,(H3)\,\big ) \vee \,\big (\,(H2)\,\text { with m even}\,\big )\Big ). \end{aligned}$$
(10)

Proof of the necessary condition

Assume (10) fails. As is easy to check, this means that

$$\begin{aligned} \lnot (\text {H1})\,\vee \,\,\big (\,(\text {H2})\text { with } m\text { odd }\big )\,\vee \,\Big ( \lnot (\text {H3})\,\wedge \,\lnot \big (\,(\text {H2})\text { with }m\text { even }\big )\,\Big ). \end{aligned}$$
(11)

In order to disprove (1) suppose first that (H1) fails. Then there exist \(s >0\) and \(n_1, n_2 \in {{\mathbb {N}}}\) such that

$$\begin{aligned} L = n_1 s\quad \text {and} \quad \ell = n_2 s; \end{aligned}$$

letting f to be any s-periodic, non-constant continuous function, there exists \(C \in {{\mathbb {R}}}\) such that

$$\begin{aligned} \forall x \in {{\mathbb {R}}}\qquad \int _{x}^{x+s} f(t) dt =C, \end{aligned}$$
(12)

hence

$$\begin{aligned} \int _{\sigma (I)} f(x) dx = (n_1+n_2)C, \end{aligned}$$

for every \(\sigma \in \textrm{Iso}({{\mathbb {R}}})\).

Suppose now that (H2) holds for some odd value of m: this means that \(\frac{L-\ell }{2(L+H)}=\frac{n}{2h+1}\) for some \(n\in {{\mathbb {N}}}^+\) and \(h\in {{\mathbb {N}}}\). Therefore, there is \(s>0\) such that \(L-\ell = ns\) and \(2(L+H) = (2h+1)s\)—equivalently, \(L+H = hs+\frac{s}{2}\). In this case,

$$\begin{aligned} f(x) = \sin \left( \frac{2\pi }{s}x \right) \end{aligned}$$

turns out to be the required non-constant function which contradicts (1). Indeed, notice first that f is an s-periodic function such that its integral on every interval whose length is an integer multiple of s is 0, and with the supplementary property that \(f\big (x+\frac{s}{2}\big )=-f(x)\) for every \(x\in {{\mathbb {R}}}\). Then we see that, for every \(a\in {{\mathbb {R}}}\),

$$\begin{aligned} \begin{aligned} \int _a^{a+L}f(x)dx+\int _{a+L+H}^{a+L+H+\ell }f(x)dx&= \int _a^{a+L}f(x)dx+\int _{a+L+H}^{a+L+H+\ell }f(x)dx\\&\qquad +\int _{a+L+H+\ell }^{a+2L+H}f(x)dx\\&= \int _a^{a+L}f(x)dx+\int _{a+hs+\frac{s}{2}}^{a+hs+\frac{s}{2}+L}f(x)dx\\&= \int _a^{a+L}f(x)dx+\int _a^{a+L}f\Big (x+hs+\frac{s}{2}\Big )dx\\&= \int _a^{a+L}f(x)dx+\int _a^{a+L}-f(x)dx=0. \end{aligned} \end{aligned}$$

Symmetrically, since the interval \([a-L+\ell ,a]\) has length \(L-\ell =ns\), for every \(a\in {{\mathbb {R}}}\) we see that:

$$\begin{aligned} \begin{aligned} \int _a^{a+\ell }f(x)dx+\int _{a+\ell +H}^{a+\ell +H+L}f(x)dx&= \int _{a-L+\ell }^af(x)dx+\int _a^{a+\ell }f(x)dx\\&\qquad +\int _{a+\ell +H}^{a+\ell +H+L}f(x)dx\\&= \int _{a-L+\ell }^{a+\ell }f(x)dx+\int _{a-L+\ell +hs+\frac{s}{2}}^{a+\ell +hs+\frac{s}{2}}f(x)dx\\&= \int _{a-L+\ell }^{a+\ell }f(x)dx+\int _{a-L+\ell }^{a+\ell }f\Big (x+hs+\frac{s}{2}\Big )\\&\quad dx=0. \end{aligned} \end{aligned}$$

Finally, if \(\lnot \)(H3) holds, then \(L+\ell +H = n_1s\) and \(H = n_2s\) for some \(s \in {{\mathbb {R}}}\) and \(n_1,n_2 \in {{\mathbb {N}}}\). Then for any non-constant s-periodic function f we see that \(\int _{\sigma (I)} f(x) dx = (n_1-n_2)C\) for every \(\sigma \in \textrm{Iso}({{\mathbb {R}}})\), where C has the same definition as in (12). \(\square \)

Proof of the sufficient condition

On the one hand, if (H1), (\(\lnot \)H2) and (H3) hold then, by Lemmata 2.7 and 2.9, f is both \((L-\ell )\)- and \((L+\ell )\)-periodic. Since, by assumption (H1), \(\frac{L-\ell }{L+\ell } \notin {{\mathbb {Q}}}\), f is necessarily a constant function. On the other hand, if (H1) and (H2) with m even hold then, by Corollary 2.11, f turns out to be \((L+H)\)-periodic; hence g (the translation of f defined in the proof of Lemma 2.10) is also \((L+H)\)-periodic, and from equation (9) we obtain that g (hence f) is necessarily constant. \(\square \)

Remark 2.13

Assumptions (H1) and (H2) are completely unrelated to each other. Since the quantity H does not appear in the statement of (H1), it is easy to realize that for every \(L,\ell \in {{\mathbb {R}}}\) with \(L>\ell >0\), there exist \(H',H'',H'''>0\) such that \(\frac{L-\ell }{L+H'}\notin {{\mathbb {Q}}}\), \(\frac{L-\ell }{2(L+H'')}=\frac{n}{m}\) with m odd (nm coprime), and \(\frac{L-\ell }{2(L+H''')}=\frac{n}{m}\) with m even (nm coprime).

As for (H3), it turns out that its validity is often (but not always) determined by that of (H1) and (H2). Indeed, besides Lemma 2.8, it is not hard to show that \(\big (\lnot \text {(H1)}\ \wedge \ \lnot \text {(H2)}\big )\Rightarrow \text {(H3)}\) and that \(\big (\lnot \text {(H1)}\ \wedge \ \text {(H2)}\big )\Rightarrow \lnot \text {(H3)}\). However, when (H1) holds while (H2) fails, then (H3) can equally well be true or false. Consider, for the former case, the values \(L=\sqrt{2}\), \(\ell =1\) and \(H=1\), and, for the latter case, the values \(L=\sqrt{2}\), \(\ell =1\) and \(H=\sqrt{2}+1\). This shows that the (somehow convoluted) characterization provided in the statement of Theorem 2.12 cannot be replaced by a simpler one involving only assumptions (H1) and (H2).

Remark 2.14

Let us observe that conjecture (1) holds whenever the length of the hole between the two intervals coincide with one of their lengths, whose ratio is irrational (i.e. \(\ell /L \notin {{\mathbb {Q}}}\) and \(H \in \{\ell ,L \}\)).

3 One more interval, much more complexity

Proposition 3.1

Let \(\Sigma =\textrm{Iso}({{\mathbb {R}}})\), \(f \in {\mathcal {C}}({{\mathbb {R}}})\) and let \(\ell , L, H, \mathcal {L} > 0\) be such that

$$\begin{aligned} \frac{\ell + L + \mathcal {L}}{H} \in {{\mathbb {Q}}}. \end{aligned}$$

Then conjecture (1) does not hold for the three-interval set

$$\begin{aligned} I = [0,\ell ] \cup [\ell +H,\ell +H+L] \cup [\ell +L+2H,\ell +L+\mathcal {L}+2H]. \end{aligned}$$

Proof

By assumption, there exist \(s \in {{\mathbb {R}}}\) and \(n_1,n_2 \in {{\mathbb {N}}}\) such that

$$\begin{aligned} \ell + L + \mathcal {L} = n_1s \quad \text {and} \quad H = n_2s; \end{aligned}$$

choosing an arbitrary (non-constant) s-periodic function f, there exists \(C \in {{\mathbb {R}}}\) such that

$$\begin{aligned} \int _0^s f(x)dx = \frac{C}{n_1}. \end{aligned}$$

For any \(\sigma \in \Sigma \) the following identity holds

$$\begin{aligned} \int _{\sigma (I)} f(x)dx = \int _{x_{\sigma }}^{x_{\sigma }+\ell +L+\mathcal {L}+2H} f(x) dx - \int _{y_{\sigma }}^{y_{\sigma }+H} f(x) dx - \int _{z_{\sigma }}^{z_{\sigma }+H} f(x) dx \end{aligned}$$

for suitable \(x_\sigma , y_{\sigma }, z_{\sigma } \in {{\mathbb {R}}}\), hence

$$\begin{aligned} \int _{\sigma (I)} f(x)dx = (n_1+2n_2)\frac{C}{n_1} - 2n_2\frac{C}{n_1} = C. \end{aligned}$$

\(\square \)

Remark 3.2

Let us observe that, given \(\ell , L, H > 0\), there exist infinitely many \(\mathcal {L}>0\) satisfying the assumption of the previous proposition. This fact implies, in particular, that given any two-interval set (for which the Pompeiu conjecture may fail or not) we can add a third interval to obtain a set for which the conjecture (1) does not hold.

We conclude with an example of a three-interval set for which the Pompeiu conjecture holds; notice that the first two intervals of such a set constitute a domain which does not enjoy the Pompeiu property.

Fig. 4
figure 4

procedure to prove that function f in Example 3.3 is constant

Example 3.3

Let us consider \(\ell , L >0\) such that \(\frac{\ell }{L} \notin {{\mathbb {Q}}}\), and the three-interval set

$$\begin{aligned} I = [0,\ell ] \cup [2\ell ,3\ell ] \cup [4\ell ,4\ell +L]. \end{aligned}$$

Let f be a continuous function such that its integral on every \(\sigma (I)\), \(\sigma \in \textrm{Iso}({{\mathbb {R}}})\), is constantly equal to C, for some \(C>0\). For the sake of simplicity, we extend in a natural way the notation for the two-interval set, introduced in the previous section, to the three-interval case. Since \(\Sigma =\textrm{Iso}({{\mathbb {R}}})\) we obtain, for every \(x \in {{\mathbb {R}}}\),

$$\begin{aligned}{}[\ell ,\ell ,\ell ,\ell ,L;x+L] = C \quad \text {and} \quad [L,\ell ,\ell ,\ell ,\ell ;x] = C \end{aligned}$$

hence summing term by term (see Fig. 4, first and second lines)

$$\begin{aligned} \int _x^{x+4\ell +2L}f(s)ds = 2C, \quad \forall x \in {{\mathbb {R}}}, \end{aligned}$$

which implies that f is \((4\ell +2L)\)-periodic.

On the other hand since, for every \(x \in {{\mathbb {R}}}\),

$$\begin{aligned}{}[\ell ^-,\ell ,\ell ^-,\ell ,L^-;x+\ell +L] = -C \quad \text {and} \quad [L,\ell ,\ell ,\ell ,\ell ;x] = C \end{aligned}$$

we obtain \([L,5\ell ,L^-;x] = 0\), for every \(x \in {{\mathbb {R}}}\) (see Fig. 4, third and second lines), which implies that the function

$$\begin{aligned} \varphi (x) = \int _x^{x+L}f(s) ds, \qquad x \in {{\mathbb {R}}}\end{aligned}$$

is not only \((4\ell +2L)\)-periodic (as f is), but also \((5\ell +L)\)-periodic. Since \(\frac{\ell }{L} \notin {{\mathbb {Q}}}\), not even \(\frac{4\ell +2L}{5\ell +L}\) does, \(\varphi \) is constant and f is \(\ell \)-periodic. Since \(\frac{4\ell +2L}{\ell } \notin {{\mathbb {Q}}}\), f is constant.