1 Introduction and Main Results

Consider the scalar piecewise equation

$$\begin{aligned} x'= h(t,x)= {\left\{ \begin{array}{ll} f(t,x),\quad \text {if }x\ge 0,\\ g(t,x),\quad \text {if }x < 0,\\ \end{array}\right. } \end{aligned}$$
(1.1)

where f(tx) and g(tx) are continuous and locally Lipschitz continuous with respect to x in \(\mathbb {R}^2\) and \(f(t,0)=g(t,0)\). Under these hypotheses, there is a unique maximal solution that satisfies each of the initial conditions.

Let \(u(t,\tau ,x)\) be the maximal solution of (1.1) determined by \(u(\tau ,\tau ,x)=x\). Let \(f,g \in \mathcal {C}^1(\mathbb {R}^2)\) and \((\tau ,x)\in \mathbb {R}^2\). Suppose the set of zeroes of \(f(t,0)=g(t,0)\) does not contain any interval, then there exists

$$\begin{aligned} u_x(t,\tau ,x)= \exp \left( \int _{\tau }^t h_x(s,u(s,\tau ,x))\,ds \right) \end{aligned}$$

and it is continuous with respect to t and x (see [4, Appendix A]). In this paper, subscripts in a function indicate its partial derivatives.

Now assume that f and g are \(T-\)periodic functions with respect to t. We say that \(u(t,\tau ,x)\) is closed or periodic if \(u(T,\tau , x)=x\). Let \(u(t,\tau , x)\) be closed. It is singular or multiple if \(u_x(T,\tau ,x)=1\), otherwise it is simple or hyperbolic. Isolated periodic solutions are also called limit cycles. By analogy with the planar case and for simplicity, a continuum of periodic solutions (period annulus) is called a center of (1.1). A more precise definition is given in Sect. 2.1.

Several authors have studied the case in which f and g are linear in x, i.e. \(f(t,x)=a^+(t) x +b(t)\) and \(g(t,x)=a^-(t) x +b(t)\), where \(a^+(t),a^-(t),b(t)\) are real continuous functions defined on \(\mathbb {R}\). Then, since f and g are globally Lipschitz continuous with respect to x, the solutions are defined in \(\mathbb {R}\).

In [6], from a three-dimensional piecewise linear system with two zones, the following reduced one-dimensional \(2\pi -\)periodic differential equation is obtained

$$\begin{aligned} x'={\left\{ \begin{array}{ll} a^+x+b(t),\text { if } x\ge 0,\\ a^-x+b(t),\text { if } x<0, \end{array}\right. } \end{aligned}$$

where \(a^+,a^-\in \mathbb {R}\), \(b(t)=b_0+b_1 \cos (t)\), \(b_0\in \{0,1\}\), and \(b_1\ge 0\). The analysis of the limit cycles of this equation determines the dynamics of the three-dimensional piecewise linear system.

In [11] the authors obtain upper bounds for the number of limit cycles of

$$\begin{aligned} x'={\left\{ \begin{array}{ll} a_1(t)x^m +b(t), \text { if } x \ge 0,\\ a_2(t)x^m +b(t), \text { if } x <0, \end{array}\right. } \end{aligned}$$

where m is a positive integer and \(a_1(t),a_2(t)\) and b(t) are \(2\pi -\)periodic functions such that \(a_1(t)\) and \(a_2(t)\) do not change sign.

In [10], an upper bound for the number of limit cycles of equation

$$\begin{aligned} x'=a(t)|x|+b(t), \end{aligned}$$
(1.2)

is obtained by analyzing the displacement application, where a(t) and b(t) are real, \(1-\)periodic and \(\mathcal {C}^1\) functions such that one of them does not change sign.

In contrast, when a(t) or b(t) changes sign, there is no uniform upper bound for the number of limit cycles of (1.1); indeed, in [7] (see also [4]) it is shown that for any natural number \(k\ge 2\) and \(\epsilon \) small enough, the differential equation \(x'=\epsilon \cos (kt)|x|+\ sin ( t )\) has at least \(k-2\) limit cycles. However, if f(tx) and g(tx) are \(T-\)periodic analytic functions, the following finiteness theorem holds.

Theorem 1.1

([4]) Let f and g be real \(T-\)periodic analytic functions such that \(f(t,0)=g(t,0)\) has n simple zeroes in [0, T]. Then there exist \(x_1<\ldots <x_r\), where \(1\le r\le n+2\), such that, if u(t) is a periodic solution that changes sign, then \(u(0)\in [x_1,x_r]\). Moreover, for each \(1\le k< r\) one of the following statements holds:

  1. (1)

    There is a finite number of values \(x\in [x_k,x_{k+1}]\) such that u(t, 0, x) is periodic.

  2. (2)

    For every \(x\in [x_k,x_{k+1}]\), u(t, 0, x) is periodic.

In this paper we solve three fundamental problems related to the dynamics of (1.2) when a(t) and b(t) are linear trigonometric polynomials. First, we characterize when (1.2) has a center (Poincaré center-focus problem). Second, we prove that each equation has a finite number of limit cycles (finiteness problem), and finally we set a uniform upper bound for the number of limit cycles (Hilbert’s problem 16).

2 Linear Trigonometric Coefficients

Consider the Abel piecewise linear equation

$$\begin{aligned} x'=a(t)|x| + b(t), \end{aligned}$$
(2.3)

where \(a(t)=a_0 + a_1\cos (t)+a_2 \sin (t)\) and \(b(t)= b_0 + b_1\cos (t)+b_2 \sin (t)\).

Since periodic solutions with constant sign are determined by a linear differential equation, the key point is to study periodic solutions that change sign, that is, those solutions u(t) such that there exist \(t_1,t_2\) such that \(u(t_1)u(t_2)<0\). In particular, b(t) must change sign, otherwise \(x=0\) is a lower or an upper solution, thus avoiding the existence of periodic solutions that change sign. By a translation of time, it is not restrictive to assume \(b(0)=0\) and \(b(t)>0\) for \(t>0\) close to 0. Moreover, since b(t) is linear, \(b(t)=0\) has a unique solution in \((0,2\pi )\), which we denote \({\bar{t}}\).

In consequence, if u(t) is a periodic solution of (2.3) that changes sign, then there exist \(0<t_1<{\bar{t}}<t_2<2\pi \) such that \(u(t_1)=u(t_2)=0\). Moreover, \(u(t)<0\) if \(t\in (0,t_1) \), \(u(t)>0\) if \(t\in (t_1,t_2)\) and \(u(t)<0\) if \(t\in (t_2,t_1+2 \pi )\). Since u(t) is a solution of the IVP \(x'=a(t)x+b(t)\), \(x(t_1)=0\) for \(t\in (t_1,t_2)\), and of \(x'=-a(t)x+b(t)\), \(x(t_2)=0\) for \(t\in (t_2,t_1+2\pi )\), and \(u(t_1+2\pi )=0\), we have

$$\begin{aligned} \int _{t_1}^{t_2} b(t)\exp \left( \int _t^{t_2} a(s)\,ds\right) \, dt= & {} 0,\nonumber \\ \int _{t_2}^{t_1+2\pi } b(t)\exp \left( \int _t^{t_1+2\pi } -a(s)\,ds\right) \,dt= & {} 0, \end{aligned}$$
(2.4)

and conversely, if there exist \(0<t_1<{\bar{t}}<t_2<2\pi \) such that (2.4) holds, then there exists a periodic solution u(t) of (1.1) determined by \(u(t_1)=0\). This allows to reduce the problem of finding periodic solutions to the problem of finding the points where two Poincaré half-maps intersect. Specifically, let

$$\begin{aligned} T^+:(0,{\bar{t}})\rightarrow ({\bar{t}},2\pi )\quad \text {and}\ \quad T^-:(2\pi ,2\pi +{\bar{t}})\rightarrow ({\bar{t}},2\pi ), \end{aligned}$$

where \(T^+(t_1)\) is the first time where the solution u(t) of (2.3) determined by \(u(t_1)=0\) is zero, that is,

$$\begin{aligned} T^+(t_1)=\inf \{t_2:t_2>t_1,\ u(t_2)=0\}, \end{aligned}$$
(2.5)

and \(T^-(t_1)\) is determined by

$$\begin{aligned} T^-(t_1)=\sup \{t_2<t_1+2\pi :t_2>t_1,\ u(t_2)=0\}, \end{aligned}$$
(2.6)

where u(t) is, now, determined by \(u(2\pi +t_1)=0\).

Proposition 2.1

The periodic solutions of (2.3) that change sign are in a one-to-one correspondence with the solutions of \(T^+(t)=T^-(t)\), \(t\in (0,{\bar{t}})\).

Proof

Assume u(t) is a periodic solution of (2.3) that changes sign.

If \(u(0)=u(2\pi )\ge 0\), as \(b(t)>0\) for \(t\in (0,{\bar{t}})\), then \(u(t)\ge 0\) for \(t\in [0,{\bar{t}}]\), and, as \(b(t)<0\) for \(t\in ({\bar{t}},2\pi )\), then \(u(t)\ge 0\) for \(t\in [{\bar{t}}, 2\pi ]\), so it has definite sign, in contradiction with the assumption.

Therefore, \(u(0)=u(2\pi )<0\). Since b(t) has a single zero at \((0,2\pi )\), u(t) has at most one sign change at both \((0,{\bar{t}})\) and \(({\bar{t}},2\pi )\). So, as u(t) has indefinite sign, there exist \(0<t_1<{\bar{t}}<t_2<2\pi \) such that \(u(t_1)=u(t_2)=u(t_1+2\pi )=0\). Therefore, (2.4) holds and, consequently, \(T^+(t_1)=T^-(t_1)\).

Conversely, suppose \(t\in (0,{\bar{t}})\) is such that \(T^+(t)=T^-(t)\). Note that if \(T^+(t)\) is well defined, by the sign of b(t), we have that

$$\begin{aligned} T^+(t)=T^-(t)\in ({\bar{t}},2\pi ). \end{aligned}$$

Let u(t) be the solution of (2.3) determined by \(u(t)=0\). As u(t) can change sign at most once in each interval where b(t) has definite sign, \(u(s)>0\) for \(t<s<{\bar{t}}\), and, by (2.5), \(u(T^+(t))=0\). And, since \(T^+(t)=T^-(t)\), then \(u(T^-(t))=0\). Therefore, \(u(t)<0\) for \(T^-(t)<s<2\pi \), and, by (2.6), \(u(t+2\pi )=0\), so u(t) is a periodic solution. \(\square \)

Note that the Poincaré half-maps are defined implicitly by

$$\begin{aligned} \int _{t}^{T^+(t)} b(s) \exp \left( \int _s^{T^+(t)}a(r)\,dr \right) \, ds= & {} 0,\nonumber \\ \int _{T^-(t)}^{t+2\pi } b(s) \exp \left( -\int _s^{t+2\pi }a(r)\,dr \right) \, ds= & {} 0. \end{aligned}$$
(2.7)

Lemma 2.2

The functions \(T^+(t)\) and \(T^-(t)\) are solutions of the differential equations

$$\begin{aligned} b(x)x'- b(t) \exp \left( \int _t^x a(s)\,ds\right)&=0, \end{aligned}$$
(2.8)
$$\begin{aligned} b(x)x'-b(t) \exp \left( \int _{t+2\pi }^x -a(s)\,ds\right)&=0, \end{aligned}$$
(2.9)

respectively.

Proof

It is enough to observe that deriving (2.7) with respect to t, we obtain

$$\begin{aligned} b(T^+(t)) \frac{d T^+}{dt}(t)-b(t)\exp \left( \int _t^{T^+(t)}a(s)\,ds \right)= & {} 0, \end{aligned}$$
(2.10)
$$\begin{aligned} b(T^-(t)) \frac{d T^-}{dt}(t) -b(t)\exp \left( -\int _{t+2\pi }^{T^-(t)}a(s)\,ds \right)= & {} 0. \end{aligned}$$
(2.11)

\(\square \)

2.1 The Center Problem

Let u(tx) denote the solution of (2.3) determined by \(u(0,x)=x\). Given \(x\in \mathbb {R}\) define the displacement application

$$\begin{aligned} d(x):= u(2\pi ,x)-x. \end{aligned}$$

Note that the solution \(u(\cdot ,x)\) is \(2\pi -\)periodic if and only if \(d(x)=0\). Equation (2.3) has a center if \(d(x)=0\) for every x in an interval. We say that (2.3) has a global center if d is identically zero.

A linear center is defined as a center where the periodic solutions of the continuum have definite sign.

For \(x>0\) large enough, the solution \(u(\cdot ,x)\) is positive, so the displacement application is

$$\begin{aligned} d(x)=(A-1)x+B, \end{aligned}$$

where

$$\begin{aligned} A=\exp \left( \int _0^{2\pi }a(r)\,dr\right) ,\quad B=\int _0^{2\pi }b(s)\exp \left( \int _s^{2\pi }a(r)\,dr \right) \,ds. \end{aligned}$$
(2.12)

Analogously, for \(x<0\) small enough \(d(x)=({\bar{A}}-1)x+{\bar{B}}\), where \({\bar{A}},{\bar{B}},\) are defined analogously. Therefore, for |x| large enough, the equation is linear, so it has a center if \(A=1\), \(B=0\), for \(x\gg 0\), and if \({\bar{A}}=1\), \({\bar{B}}=0\) for \(x\ll 0\).

If \(b(t)\equiv 0\), the non-zero solutions are either always positive or negative, so the possible centers are linear (or global) and determined by conditions above. The general case is covered in the next result.

Theorem 2.3

Equation (2.3) has linear centers or a global center. Moreover, it has a global center if and only if \(a_0=0\) and a(t) and b(t) are proportional.

Proof

If b(t) is identically zero, in particular it is proportional to a(t). Since \(u(t)\equiv 0\) is a solution, there are no periodic solutions that change sign. Therefore, (2.3) has only linear centers. Moreover, by comment above, (2.3) has a global center if and only if \(A={\bar{A}} =1\), which is equivalent to \(a_0=0\).

If b(t) does not change sign and it is not identically zero, then \(x=0\) is either a lower or an upper solution, so there are no periodic solutions that change sign. That is, there are only linear centers and they are characterized by \(A=1,B=0\) when the periodic solutions are positive and \({\bar{A}}=1,{\bar{B}}=0\) when the periodic solutions are negative.

Assume that b(t) changes sign. First we prove that if (2.3) has a center that is not linear, that is, if there exists a continuum of periodic solutions that change sign, then (2.3) has a global center. Recall that we can assume that \(b(0)=b({\bar{t}})=0\) are the unique zeroes of b(t) in \([0,2\pi )\), and that \(b(t)>0\) for \(t\in (0,{\bar{t}})\) and \(b(t)<0\) for \(t\in ({\bar{t}},2\pi )\). Then there is a continuum of periodic solutions crossing \(x=0\) twice, one in \((0,{\bar{t}})\) and one in \(({\bar{t}},2\pi )\). By analyticity, these crossing must cover all \((0,{\bar{t}})\) and \(({\bar{t}},2\pi )\). In particular, the value at \(t=0\) of these solutions is an interval of the form \(({\bar{x}},0)\), where \(u(t,{\bar{x}})\) and u(t, 0) do not change sign, and the displacement application d is identically zero in the interval \(({\bar{x}},0)\) and linear in \((-\infty ,{\bar{x}} ]\cup [0,+\infty )\). However, since d is differentiable, we conclude that d is identically zero, and thus the center is global.

Next we show that the global centers are characterized by the fact that \(a_0=0\) and that the functions a(t) and b(t) are proportional. Assume that (2.3) has a global center. As for \(x\gg 0\), \(d(x)= (A-1)x+B\), then \(A=1\), so \(a_0=0\). Also, since all solutions are periodic, solutions that change sign are, then \(T(t):=T^+(t)=T^-(t)\) for every \(t\in [0,{\bar{t}}]\). Therefore, the vector fields of (2.8) and (2.9), coincide, so

$$\begin{aligned} \int _t^{T(t)} a(s)\,ds = \int _{t+2\pi }^{T(t)} -a(s)\,ds. \end{aligned}$$

for every \(t\in (0,{\bar{t}})\). But, as \(a_0=0\),

$$\begin{aligned} \begin{aligned} 0 = \int _t^{T(t)} a(s)\,ds + \int _{t+2\pi }^{T(t)} a(s)\,ds&= 2 \int _t^{T(t)} a(s)\,ds + \int _{t+2\pi }^t a(s)\,ds \\&= 2 \int _t^{T(t)} a(s)\,ds. \end{aligned} \end{aligned}$$

Considering that for some constants \(c\ne 0\) and \(t_a\in (0,2 \pi )\), \(a(t) = a_1 \cos (t)+a_2\sin (t)=c\sin (t-t_a)\), we have that \(\cos (t-t_a)=\cos (T(t)-t_a)\), which implies that \(T(t)=-t+2\pi \) because \(0\le t<{\bar{t}}< T(t)\le 2\pi \), T(t) is strictly decreasing and \(T(0)=T(2\pi )\). If we now derive the expression \(\int _t^{-t+2\pi }a(s)\,ds=0\) with respect to t, we obtain \(a(t)+a(-t+2\pi )=0\), implying \(a(t)=a_2 \sin (t)\). Moreover, \(T(t) = 2\pi -t\) also implies that \({\bar{t}}=\pi \), so b(t) is proportional to \(\sin (t)\), and \(a_2 b(t) = a_2 \sin (t) = a(t)\)

Conversely, if \(a_0=0\) and \(b(t)=\lambda a(t) \not \equiv 0\), then there exist \(c>0\) and \(\gamma \in [0,2\pi )\) such that \(a(t)=c\sin (t-\gamma )\). By the change of variables \(t\rightarrow t+\gamma ,\ x\rightarrow x/c\), equation (2.3) transforms into \(x'=\sin (t)|x|+\lambda \sin (t)\) which has a center because \(u(t)=u(-t)\) for every solution u(t). \(\square \)

2.2 The Finiteness Problem

The finiteness problem is essentially solved in Theorem 1.1 of [4]. Thus, we only show here that (2.3) satisfies the hypotheses of that theorem.

Theorem 2.4

Equation 2.3 has a finite number of limit cycles.

Proof

If the zeroes of b(t) are simple, then the result follows from Theorem 1.1. Now, as b(t) is linear trigonometric, if b(t) has multiple zero, then it does not change sign, so \(x=0\) is a lower or an upper solution. In particular, no periodic solution crosses \(x=0\), and there is at most one positive and one negative periodic solution because the equation is linear in these regions. \(\square \)

2.3 Hilbert’s 16th Problem

When a(t) or b(t) does not change sign, an uniform upper bound is 2 (see [10, 14]), so we assume that a(t) and b(t) change sign.

If we denote

$$\begin{aligned} F(t,x,a_0,b_0):=\big (a_0+a_1 \cos (t)+a_2 \sin (t)\big )|x|+b_0\big (1-\cos (t)\big )+\sin (t), \end{aligned}$$

then \(\frac{\partial F}{\partial a_0}=|x|\ge 0\) and \(\frac{\partial F}{\partial b_0}=1-\cos (t)\ge 0\), being strict inequalities for \(x\ne 0\) and \(t\ne 2k\pi \), \(k\in \mathbb {Z}\), respectively. Thus, since the vector field defined by (2.3) is increasing with respect to \(a_0\) and \(b_0\), the same is true for the displacement application, that is, if \(d(x,a_0)\) (resp. \(d(x,b_0)\)) denotes the displacement application in terms of \(a_0\) (resp. \(b_0\)), then d is strictly increasing with respect to \(a_0\) (resp. \(b_0\)).

Proposition 2.5

Assume that (2.3) has at least n limit cycles for a certain value of \(a_0\) (resp. \(b_0\)). Then there exist nearby values of \(a_0\) (resp. \(b_0\)) such that (2.3) has at least n limit cycles.

Proof

Assume \({\bar{x}}\) is a zero of d such that d changes sign. Then d changes sign for nearby values of \(a_0\) for any sufficiently small neighborhood of \({\bar{x}}\).

Assume \({\bar{x}}\) is a zero of d such that d does not change sign for \(a_0={\bar{a}}_0\); for instance, \(d(x,{\bar{a}}_0)\ge 0\) for x in a neighborhood of \({\bar{x}}\), being the strict inequality for \(x\ne {\bar{x}}\). Then for \(a_0<{\bar{a}}_0\) sufficiently small, d has at least two zeroes close to \({\bar{x}}\).

Now, by conveniently selecting \(a_0\), we get the desired result. \(\square \)

From the previous proposition, to obtain a uniform upper bound for the limit cycles of (2.3), we can exclude any finite number of values of \(a_0\) and \(b_0\). In particular, in the following we assume that \(a_0 \ne 0\).

When b(t) changes sign, it has two simple roots in \([0,2\pi )\). By a translation of time, it is not restrictive to assume that 0 is one of them and that \(b'(0)>0\). Moreover, by rescaling x we can assume that the coefficient of \(\sin (t)\) is one, so we assume that

$$\begin{aligned} b(t) = \sin (t) + b_0(1-\cos (t)). \end{aligned}$$

Moreover, we have that \(b(t)>0\) for \(t\in (0,{\bar{t}})\) and \(b(t)<0\) for \(t\in ({\bar{t}},2\pi )\), where \({\bar{t}}\) is the zero of b(t) in \((0,2\pi )\). By Proposition 2.1, there is a one-to-one correspondence between the periodic solutions of (2.3) that change sign and the solutions of \(T^+(t)=T^-(t)\).

Unfortunately, the equation \(T^+(t)=T^-(t)\) is difficult to handle, since \(T^+\) and \(T^-\) are implicitly defined functions. In the following steps, the problem of bounding the number of solutions to this equation is reduced to bounding the number of solutions to simpler equations. For this, we first consider the function

$$\begin{aligned} h(t,x) = \int _t^x a(s)\,ds + \int _{t+2\pi }^x a(s)\,ds. \end{aligned}$$

Proposition 2.6

Let \(n-1\) be the maximum number of isolated points in the intersection of \(h(t,x)=0\) with the graph of a solution of (2.8) in \((0,{\bar{t}})\times ({\bar{t}},2\pi )\). Then the number of limit cycles of (2.3) that change sign is less than or equal to n.

Proof

First, we recall that, by Lemma 2.2, \(T^+(t)\) and \(T^-(t)\) are solutions of (2.8) and (2.9) respectively. Consider the vector fields defined by (2.8) and (2.9). The set of points \((t,x) \in (0,{\bar{t}}) \times ({\bar{t}},2\pi )\) where the two vector fields are proportional are the solutions of

$$\begin{aligned} -\frac{b(t)}{b(x)}\exp \left( \int _t^x a(s)\,ds\right) =-\frac{b(t)}{b(x)}\exp \left( \int _{t+2\pi }^x -a(s)\,ds\right) . \end{aligned}$$

This equation is equivalent to \(h(t,x)=0.\)

By Proposition 2.1, the number of limit cycles of (2.3) that change sign is the number of solutions of \(T^+(t)=T^-(t)\), which is bounded by the number of intersections of the graph of a solution of (2.8) with the graph of a solution of (2.9), both restricted to \((0,{\bar{t}})\times ({\bar{t}},2\pi )\). Let u(t) and v(t) be solutions of (2.8) and (2.9), respectively. If the graphs of \(x=u(t)\) and \(x=v(t)\) intersect in two consecutive points of u(t), then both vector fields are proportional in an intermediate value, that is, the graph of \(x=u(t)\) and \(h(t,x)=0\) intersect at one point. Therefore, if \(n-1\) is the number of intersections of the graph of \(x=u(t)\) and \(h(t,x)=0\), then the number of intersections of the graphs of \(x=u(t)\) and \(x=v(t)\) is at most n. \(\square \)

To control the number of intersections of solutions of (2.8) or (2.9) with \(h(t,x)=0\) we need some additional properties of \(h(t,x)=0\). Note that

$$\begin{aligned} h(t,x)= & {} \int _t^x a(s)\,ds + \int _{t+2\pi }^x a(s)\,ds \nonumber \\= & {} 2 \int _t^x a(s)\,ds + \int _{t+2\pi }^t a(s)\,ds\nonumber \\= & {} 2 \int _t^x a(s)\,ds - 2\pi a_0. \end{aligned}$$
(2.13)

Lemma 2.7

The graph of \(h(t,x) = 0\) for \((t,x)\in R:=(0,{\bar{t}})\times ({\bar{t}}, 2\pi )\) is, after a linear change of variables, the restriction to R of the graph of a function.

Proof

As \(a_0 \ne 0\), then

$$\begin{aligned} \frac{1}{a_0} h(t,x) = 2 \left( r_1 \sin (x)-r_2 \cos (x)+x-r_1 \sin (t) + r_2 \cos (t)-t\right) -2 \pi \end{aligned}$$

with \(r_i = a_i/a_0,\ i = 1,2\).

By the change of variables:

$$\begin{aligned} \left( \begin{array}{c} z_1 \\ z_2 \end{array}\right) = \left( \begin{array}{rr} 1 &{} 1 \\ -1 &{} 1 \end{array}\right) \left( \begin{array}{c} t \\ x \end{array}\right) , \end{aligned}$$

\(\frac{1}{a_0} h(t,x)\) can be written in the form

$$\begin{aligned} \frac{1}{a_0} h(z_1,z_2)=4 \left( r_1 \cos (z_1/2) + r_2 \sin (z_1/2)\right) \sin (z_2/2) - 2\pi + 2z_2. \end{aligned}$$

Thus the graph of the equation \(h(t,x)=0\), restricted to \(0<t<{\bar{t}}\) and \({\bar{t}}<x<2\pi \), becomes in part of the (bigger) graph of

$$\begin{aligned} \frac{\pi - z_2}{\sin (z_2/2)} = 2\left( r_1 \cos (z_1/2) + r_2 \sin (z_1/2)\right) \end{aligned}$$
(2.14)

restricted to \({\bar{t}}< z_1 < {\bar{t}} + 2\pi \) and \(0< z_2 < 2 \pi \). Now, since the left hand side of (2.14) is a strictly decreasing function in \((0, 2\pi )\), we conclude that \(z_2\) is a function of \(z_1\). \(\square \)

Now, by studying the tangencies of \(T^+\) along the curve \(h(t,x)=0\), it is possible to simplify the problem even further. Let us denote

$$\begin{aligned}m(t,x):=a(t)b(x)-a(x)b(t)e^{\pi a_0}.\end{aligned}$$

Proposition 2.8

Let \(n-2\) be the number of isolated solutions of

$$\begin{aligned} h(t,x)= m(t,x)=0, \end{aligned}$$

where \(0<x-t<2\pi \) and \({\bar{t}}<t+x<{\bar{t}}+2\pi \). Then the number of limit cycles of (2.3) that change sign is less than or equal to n.

Proof

By Lemma 2.7, \(h(t,x)=0\) is the graph of a function in the region \(0<x-t<2\pi \) and \({\bar{t}}<t+x<{\bar{t}}+2\pi \). Then, between any two consecutive intersections of \(h(t,x)=0\) and the graph of a solution of (2.8), the vector field defined by (2.8) must be tangent to the curve, that is, for some point of \(h(t,x)=0\),

$$\begin{aligned} l(t,x):=h_x(t,x) b(t) \exp \left( \int _t^x a(s)\,ds\right) +h_t(t,x)b(x)=0. \end{aligned}$$

Moreover, since \(h(t,x)=0\) is equivalent to \(\int _t^x a(s)\,ds=\pi a_0\), the set of points such that \(l(t,x)=h(t,x)=0\) is the set of points such that

$$\begin{aligned} h(t,x) =a(t)b(x)-a(x)b(t)e^{\pi a_0}=0. \end{aligned}$$

Therefore, if the number of isolated intersections of the curve \(h(t,x)= 0\) with \(m(t,x)=0\) is at most \(n-2\), then the number of isolated intersections of the curve \(h(t,x)=0\) with the graph of a solution of (2.8) in \((0,{\bar{t}})\times ({\bar{t}},2\pi )\) is at most \(n-1\) and, by Proposition 2.6, we are done. \(\square \)

The following result guarantees finiteness and a (very thick) upper bound for the number of limit cycles. To obtain this bound, we use the following Khovanskiĭ theorem ( [12, Section 1.4]), which gives an estimate of the number of solutions of a system of real exponential and trigonometric polynomials.

Theorem 2.9

(Khovanskiĭ). Let \(P_1 = \ldots = P_n = 0\) be a system of n equations with n real unknowns \(x = x_1, \ldots , x_n\), where \(P_i\) is a polynomial of degree \(m_i\) in \(n+k+2\rho \) real variables \(x, y_1, \ldots , y_k,\) \(u_1, \ldots , u_\rho , v_1, \ldots , v_\rho \), where \(y_j = {\text {exp}}\langle a_j, x \rangle ,\ j = 1, \ldots , k\) and \(u_q = \sin \langle b_q, x \rangle ,\) \(v_q = \cos \langle b_q, x \rangle ,\ q = 1, \ldots , \rho \). Then the number of isolated real solutions of this system in the region bounded by the inequalities \(\vert \langle b_q, x \rangle \vert < \pi /2,\ q = 1, \ldots , \rho \) is finite and less than

$$\begin{aligned} m_1 \cdots m_n \left( \sum _{i=1}^n m_i + \rho + 1\right) ^{\rho +k} 2^{\rho + (\rho + k)(\rho + k -1)/2} \end{aligned}$$

Theorem 2.10

The number of limit cycles of (2.3) is less than or equal to \(9834500 = 7^4 \cdot 2^{12}+2+2\).

Proof

First, note that there are at most two limit cycles that do not change sign, so we only need to limit the number of limit cycles that change sign. Also, as we noted earlier, we assume \(a_0 \ne 0\).

Now, since

$$\begin{aligned} \frac{1}{a_0} h(t,x) = 2 \left( r_1 \sin (x)-r_2 \cos (x)+x-r_1 \sin (t) + r_2 \cos (t)-t\right) -2 \pi \end{aligned}$$

and

$$\begin{aligned} \frac{2}{a_0} m(t,x) =&a(t)b(x)-a(x)b(t)e^{\pi a_0} \\ =&(e^{\pi a_0}-1)(b_0 r_2 - r_1)\sin (x+t) \\&+ (e^{\pi a_0}-1)(b_0 b_1 + r_2)\cos (x+t) \\&+ (e^{\pi a_0}-1)(b_0 r_2 - r_1)\sin (x-t) \\&+ (e^{\pi a_0}-1)(b_0 r_1 - r_2)\cos (x-t) \\&+ 2 (b_0 r_2 - e^{\pi a_0})\sin (t) + 2 b_0 (r_1 + e^{\pi a_0}) \cos (t) \\ {}&- 2(e^{\pi a_0} b_0 r_2 - 1) \sin (x) - 2b_0(e^{\pi a_0} r_1+1) \cos (x) \\&-2(e^{\pi a_0}-1) b_0 \end{aligned}$$

with \(r_i = a_i/a_0,\ i = 1,2\), are polynomials of degree 1 in the variables \(t, x, \sin (t),\) \(\sin (x), \sin (x+t), \sin (x-t), \cos (t), \cos (x), \cos (x+t),\) and \(\cos (x-t)\). By the Khovanskiĭ theorem (Theorem 2.9), with \(n=2, x_1 = t, x_2 = x, k=0, m_1=m_2=1, b_1 = (1,0), b_2 = (0,1), b_3=(1,1)\) and \(b_4=(-1,1)\), that is \(\rho =4\), we have that the number of isolated real solutions of the system \(h(t,x) = m(t,x) = 0\) in the region

$$\begin{aligned} Q&= \{\vert \langle b_q, x \rangle \vert< \pi /2\ : q = 1, \ldots , 4\} \\&= \{(x,t) \in \mathbb {R}^2 : \vert x+t \vert< \pi /2, \vert x-t \vert < \pi /2\} \end{aligned}$$

is finite and less than \(7^4 \cdot 2^{10}\). Now, since we need four translations of Q to cover the region \((0,\pi ) \times (\pi , 2\pi )\), we conclude that the number of isolated real solutions of the system \(h(t,x) = m(t,x) = 0\) for \((t,x) \in (0,\pi ) \times (\pi , 2\pi )\) is bounded by \(4 \cdot 7^4 \cdot 2^{10} = 7^4 \cdot 2^{12}\).

Finally, by Proposition 2.8, we conclude that the of limit cycles of (2.3) that change sign is less than or equal to \(7^4 \cdot 2^{12} +2\). \(\square \)

2.4 Improving the Upper Bound

The aim of this subsection is to improve the upper bound given by Theorem 2.10, by performing a more detailed analysis of the system of equations \(m(t,x) = h(t,x) =0\).

Note that m(tx) is a trigonometric polynomial, while h(tx) is the primitive of a trigonometric polynomial. Our goal is to reduce the problem of bounding the number of limit cycles to computing the number of intersections of two trigonometric polynomial curves, which can be done by Bezout’s theorem. Then, we repeat the arguments above and study the tangencies of h(tx) along the branches of \(m(t,x)=0\), so the next step is to study the implicit equation \(m(t,x)=0\).

Recall that as in the previous subsection, we assume that a(t) and b(t) change sign, and that \(a_0\) and \(b_0\) are generic.

Proposition 2.11

The number of connected components of \(m(t,x)=0\) in \((0,2 \pi )\times (0,2\pi )\) is at most 4.

Proof

As \(a_0,b_0\) are generic, we may assume that a(t) and b(t) have not common zeroes in \([0,2\pi ]\). By the change of variables \(t \rightarrow 2 {\text {atan}}(z_1)+\pi \) and \(x \rightarrow 2 {\text {atan}}(z_2)+\pi \), m(tx) becomes

$$\begin{aligned} \phi (z_1,z_2):= \frac{2\, f(z_1,z_2)}{(z_1^2+1)(z_2^2+1)}, \end{aligned}$$

where \(f(z_1,z_2)\) is a polynomial of degree 3 which is irreducible over the complex by Lemma A.1. According to [13, p. 300], applying Harnack’s theorem, we obtain that the real connected components of an affine algebraic algebraic curve of degree d is less than or equal to \(\max (g+1,g+N)\), where N is the number of non-compact connected components of the affine algebraic curve and g is the genus of the corresponding projective curve. Therefore, since \(f(z_1,z_2) = 0\) defines a curve of degree 3 in \(\mathbb {R}^2\) we conclude that \(g = \frac{(3-1)(3-2) )}{ 2} = 1\) and, according to Bezout’s theorem, that N is less than or equal to 3. So, \(f(z_1,z_2) = 0\) has at most \(1+3 = 4\) connected components in \(\mathbb {R}^2\). Therefore, \(\phi (z_1,z_2)\) has at most four connected components. Now, since the above change of variables is a diffeomorphism from \(\mathbb {R}^2\) to \((0,2 \pi ) \times (0,2\pi )\); in particular, it is an homeomorphism and we conclude that \(m(t,x)=0\) has at most four connected components in \((0,2 \pi ) \times (0,2\pi )\). \(\square \)

Since we are assuming \(a_0\ne 0\), dividing a(t) by \(a_0\), we can take \({\bar{a}}(t):=a(t)/a_0 = 1 + r_1 \cos (t) + r_2 \sin (t)\) and \(c:= e^{\pi a_0}\). Then \(m(t,x)=0\) is equivalent to \({\bar{a}}(t)b(x)-{\bar{a}}(x)b(t) c=0\), which for tx such that \(b(t)b(x)\ne 0\) can be rewritten as

$$\begin{aligned} k(t)-k(x)c=0, \end{aligned}$$

where \(k(t) = {\bar{a}}(t)/b(t)\).

By Proposition 2.8, to bound the number of limit cycles of (2.3), it suffices to compute the number of isolated solutions of \(h(t,x)=0\), \(m(t,x)=0\), for \(0<x-t<2\pi \) and \({\bar{t}}<t+x<{\bar{t}}+2\pi \). Note that in every connected component of \(m(t,x)=0\), if we have two consecutive zeros of \(h(t,x)=0\), then the gradients of \(m(t,x)=0\) and of \(h(t,x)=0\) must be proportional. Therefore, the number of isolated zeros of \(m(t,x)=h(t,x)=0\) is bounded by the number of points of \(m(t,x)=0\) where both gradients are proportionals, plus four by Proposition 2.11.

Next, we show that the points of \(m(t,x)=0\) where both gradients are proportional are, after a suitable variable change, the real solutions of two algebraic equations, so that we can bound their number using Bezout’s theorem.

Observe that the gradient of \(m(t,x)=0\) is \((k'(t),-k'(x)c)\), where \(k'(t) = -n(t)/b(t)^2\) with

$$\begin{aligned} n(t):= ((b_0r_1+b_0)\sin (t)+(1-b_0r_2)\cos (t)+b_0r_2+r_1. \end{aligned}$$

Proposition 2.12

The set of points \((t,x) \in (0,\pi )\times (\pi ,2\pi )\) such that \(m(t,x)=0\) and \((h_t,h_x)=(-2 {\bar{a}}(t),2 {\bar{a}}(x))\) is proportional to \((k'(t), -k'(x) c)\) is the set \({\mathcal {Z}}\) of solutions of

$$\begin{aligned} {\left\{ \begin{array}{ll} &{} {\bar{a}}(t)b(x)-{\bar{a}}(x)b(t) c=0,\\ &{} n(t)b(x)^3-n(x)b(t)^3 c^2=0. \end{array}\right. } \end{aligned}$$
(2.15)

The number of isolated points of \({\mathcal {Z}}\) is less than or equal to 27.

Proof

A point \((t,x) \in (0,\pi )\times (\pi ,2\pi )\) satisfies both that \(m(t,x)=0\) and that \((h_t,h_x)=(-2 {\bar{a}}(t),2 {\bar{a}}(x))\) is proportional to \((k'(t), -k'(x) c)\) if and only if the matrix

$$\begin{aligned} \left( \begin{array}{ccc} -{\bar{a}}(t) &{} b(t) c &{} k'(t) \\ {\bar{a}}(x) &{} -b(x) &{} -k'(x) c \end{array}\right) \end{aligned}$$

has rank two, that is, the \(2 \times 2-\)minors of the above matrix are equal to zero.

Now, by the change of variables \(t \rightarrow 2 {\text {atan}}(z_1)+\pi ,\ x \rightarrow 2 {\text {atan}}(z_2)+\pi \), we obtain that (2.15) is equivalent to a polynomial system of equations determined by two polynomials; one of degree 3 and another of degree 9. Therefore, by Bezout’s theorem (see [1, Theorem 4.106] for more details) \({\mathcal {Z}}\) has at most 27 isolated points. \(\square \)

Remark 2.13

Applying Gröbner basis techniques, one can show that cardinality of the set \({\mathcal {Z}}\) in Proposition 2.12 is less than or equal to 15. Indeed, using Singular [8], we can compute a Gröbner basis of the ideal \({\mathfrak {a}}\) of \(\mathbb {C}[z_1,z_2]\) generated by the two polynomials that define the system equivalent to (2.15) after the change of variable \(t \rightarrow 2 {\text {atan}}(z_1)+\pi ,\ x \rightarrow 2 {\text {atan}}(z_2)+\pi \), for generic \(r_1, r_2, b_0\) and c. The initial ideal of \(\mathfrak {a}\) with respect to the graded reverse lexicographic monomial order on \(\mathbb {C}[z_1,z_2]\) is generated by \(\{z_1^6,z_1^2z_2,z_1z_2^5,z_2^6\}\). Therefore, \(\mathbb {C}[z_1,z_2]/\mathfrak {a}\) is a finite \(\mathbb {C}-\)algebra of degree equal to

$$\begin{aligned} \dim _{\mathbb {C}} \mathbb {C}[z_1, z_2]/\langle z_1^6,z_1^2z_2,z_1z_2^5,z_2^6 \rangle = 15,\end{aligned}$$

that is, for generic \(r_1, r_2, b_0\) and c, the set \({\mathcal {Z}}\) has cardinality 15 at most.

Summarizing all of the above results, we obtain the following.

Theorem 2.14

The number of limit cycles of (2.3) is less than or equal to \(35 = 27+4+2+2\) (or \(23 = 15+4+2+2\) by Remark 2.13).