Introduction

We consider the following scalar differential equation

$$\begin{aligned} x'(t) = - d x(t) + f(x(t-\tau (t))) \end{aligned}$$
(1)

with a piecewise nonlinear feedback

$$\begin{aligned} f(x)= - \text {sgn}(x) = {\left\{ \begin{array}{ll} 1, &{} \text{ if } x<0 \\ 0, &{} \text{ if } x=0 \\ -1, &{} \text{ if } x>0, \end{array}\right. } \end{aligned}$$

and a temporally varying delay that periodically switches between two values \(\tau _2\) and \(\tau _1\):

$$\begin{aligned} \tau (t) = {\left\{ \begin{array}{ll} \tau _2, &{} \text{ if } \text{ mod(t,T) } \ge \gamma \\ \tau _1=\beta \tau _2, &{} \text{ if } \text{ mod(t,T) } < \gamma . \end{array}\right. } \end{aligned}$$
(2)

Here d, \(\tau _2\), \(\beta >0\); \(T> \gamma > 0\) are given constants. We denote by \(\tau _{\max } := \max (\beta \tau _2, \tau _2)\) and \(\tau _{\min } := \min (\beta \tau _2, \tau _2)\).

Our study on such a scalar delay differential equation with periodically switching delays is motivated by the issue of development diapause [1] in tick population dynamics and its implication for tick-borne disease transmission dynamics. In [2], we proposed and examined a mechanistic model for reproduced egg population dynamics, where two constant time lags were involved, one stood for the normal development delay and another for the diapause development delay. In reality, tick lifecycle is sensitive to the environmental conditions such as the temperature and humidity, which are normally seasonal but can also be periodically interrupted by other climate cycles such as El Ni\({\tilde{n}}\)o [3, 4]. The seasonal variation of the temperature has been commonly reflected in the periodicity of development rates in tick population and tick-borne disease transmission dynamics in ordinary differential equation (ODE) models [5,6,7,8,9]. The influence of seasonal variation of temperature on development delays was modelled in the paper [10]. Here, for the first time to our best knowledge, we use a delay differential equation with periodic switching delay to model the temporally periodic switching from normal to diapause development. In our formulation, we have already normalized the system so the nonlinearity represents a negative feedback at the normalized equilibrium. Our focus here is to see if this format of simplified model can generate complicated patterns of oscillations in the vector (tick) population.

Model Overview

We consider model (1) subject to an initial condition

$$\begin{aligned} {\left\{ \begin{array}{ll} x(t)>0, \; t \in [-\tau _{\max },0] \\ x(0)=k_0 \ge 0. \end{array}\right. } \end{aligned}$$
(3)

Due to the nonlinearity of f, this initial value problem (IVP) (1) and (3) can be solved iteratively by connecting solutions of the linear ODEs

$$\begin{aligned} y'(t) = -d y(t) + 1 \end{aligned}$$

and

$$\begin{aligned} z'(t) = -d z(t) - 1 \end{aligned}$$

along the time sequences when the solution of the ODEs changes their signs.

For the sake of reference, we note that the IVP

$$\begin{aligned} {\left\{ \begin{array}{ll} y'(t) = - d y(t) + c \\ y(t_0)=y_0, \end{array}\right. } \end{aligned}$$

admits the unique solution

$$\begin{aligned} y(t) = e^{-d(t-t_0)} \left( y_0 - \frac{c}{d}\right) + \frac{c}{d}. \end{aligned}$$

Note also that the solution of (1) satisfies

$$\begin{aligned} -dx(t)-1 \le x'(t) \le -dx(t)+1, \end{aligned}$$

from which and using a comparison argument, we obtain that the solution of (1) uniquely exists for all \(t \ge 0\) and it is bounded (\(\limsup _{t \rightarrow \infty }|x(t)| \le 1/d\)).

We also note that due to the symmetry of f, if we let \(x^\pm (t)\) be the solutions for (1) with the initial conditions

$$\begin{aligned} {\left\{ \begin{array}{ll} x^+(t)>0, \quad \forall t \in [-\tau _{\max },0) \\ x(0)=k, \end{array}\right. } \end{aligned}$$

and

$$\begin{aligned} {\left\{ \begin{array}{ll} x^-(t)<0, \quad \forall t \in [-\tau _{\max },0) \\ x(0)=-k, \end{array}\right. } \end{aligned}$$

then \(x^+(t)= - x^-(t)\) for \(t \ge 0\).

Note the nature of the negative feedback:

$$\begin{aligned} x(t)\ge & {} 0, \; x(t-s)>0, \; \forall s \in [0,\tau _{\max }] \Longrightarrow x'(t)<0,\\ x(t)\le & {} 0, \; x(t-s)<0, \; \forall s \in [0,\tau _{\max }] \Longrightarrow x'(t)>0. \end{aligned}$$

This means that the solution will start decreasing at \(t=0\) at least until it reaches the x-axis faster than the line \(y=-x\) as shown below:

$$\begin{aligned}&x(t)>0, \; x(t-\tau (t))>0 \Longrightarrow x'(t)<f(x(t -\tau (t)))=-1,\\&x(t)<0, \; x(t-\tau (t))<0 \Longrightarrow x'(t)>f(x(t -\tau (t)))=1. \end{aligned}$$

These properties, together with non-zero initial conditions, guarantee that the solution x(t) of (1) will oscillate around the only equilibrium \(x=0\) of the model.

Behaviours of Solutions

We start by introducing relevant notations to be used throughout the remaining part of the paper.

For a given solution x(t) of (1), we consider the set S containing the non-negative times when the solution crosses the x-axis:

$$\begin{aligned} S:=\{t \ge 0 \; | \; x(t)=0\}, \end{aligned}$$

We introduce the following notations:

  1. (i)

    \(t_i^*\) represents the i-th ordered element of S (i.e. the i-th time in which the solution intersects with the x-axis).

  2. (ii)

    \(\hat{t_i}\): for a given \(t_i^*\) so that \(x(t_i^*)=0\), the IVP of ODE

    $$\begin{aligned} {\left\{ \begin{array}{ll} x'(t) = - d x(t) - 1 \\ x(t_i^*)=0, \end{array}\right. } \end{aligned}$$
    (4)

    has the solution \(x(t)=\frac{1}{d}(e^{-d (t-t_i^*)}-1)\). We define \(\hat{t_i} \in (t_i^*,t_{i+1}^*)\) such that the IVP

    $$\begin{aligned} {\left\{ \begin{array}{ll} x'(t) = - d x(t) + 1 \\ x(\hat{t_i})= \frac{1}{d}(e^{-d (\hat{t_i}-t_i^*)}-1), \end{array}\right. } \end{aligned}$$
    (5)

    satisfies \(x(t_{i+1}^*)=0\). Note that in the case of a single monotonicity change of the solution x(t) to ODE (1) in \((t_i^*,t_{i+1}^*)\), \(\hat{t_i}\) is the time corresponding to the local maximum or minimum.

  3. (iii)

    \(\mathring{t_i} := \hat{t_i} - t_i^*\).

  4. (iv)

    the cycle and cycle length: we call the restriction of x(t) on \([t_{2i-1}^*, t_{2i+1}^*]\) the i-th cycle, the length of the i-th cycle is denoted by \(T_i:=t_{2i+1}^* - t_{2i-1}^*\).

In order to study how the solution x(t) to (1) starts oscillating around \(x=0\), we search for the possible values of \(t_i^*\) and \(\mathring{t_i}\) in a simplified case in which the parameters satisfy three conditions:

  1. (C1)

    \(\beta <1\);

  2. (C2)

    \((1-\beta ) \tau _2 < \min (\gamma , T-\gamma )\);

  3. (C3)

    \(\beta > \frac{{\tiny }\left[ \ln (1+e^{d \tau _2}) - \ln (2)\right] }{d \tau _2}\).

(C1) is natural as \(\tau _{\text {min}}=\beta \tau _2\) and \(\tau _{\text {max}}=\tau _2\). (C2) is necessary to avoid multiple switchings of delay in \([t_i^*+\beta \tau _2, t_i^*+\tau _2]\) and (C3) will be used to guarantee \(t_i^*+\tau _2<t_{i+1}^*\). Note that (C1) and (C2) are satisfied in case \(\tau _{\max } - \tau _{\min } < \min (\gamma , T - \gamma )\) and (C3) is satisfied if \(d\tau _{\max }=d\tau _2\) is sufficiently large. These conditions can be equivalently rewritten in terms of \(\tau _1\) and \(\tau _2\) since \(\beta =\tau _1/\tau _2\) as:

  1. (C1*)

    \(\tau _1 < \tau _2\);

  2. (C2*)

    \(\tau _1 > \tau _2 - \min (\gamma , T-\gamma )\);

  3. (C3*)

    \(\tau _1 > \frac{1}{d} [\ln (1+e^{d\tau _2}) - \ln (2)]\).

In Fig. 1 there is an example of delays that satisfy these three conditions where parameter values are chosen to be constant: \(\beta =0.6\), \(\tau _2=3\), \(d=0.1\), \(T=8.6295\).

Fig. 1
figure 1

This figure shows a \(\tau _1\)-\(\tau _2\) plot where the blue section represents the choices of \(\tau _1\) and \(\tau _2\) that satisfy (C1–C3), where (1) is the line \(\tau _2=\tau _1\) of (C1), (2) represents the line \(\tau _1 = \tau _2 - \min (\gamma , T-\gamma )\) of (C2) and (3) is the solution of \(\tau _1 = \frac{1}{d} [\ln (1+e^{d\tau _2}) - \ln (2)]\) of (C3)

We have shown that the value of function f determines the monotonicity of the solution x(t) of (1). In this case, (3) guarantees that \(f(x(t-\tau (t)))\) would be negative and solution will be decreasing in \([0,\tilde{t_1}]\) with

$$\begin{aligned} \tilde{t_1} = \min \{t:f(x(t-\tau (t))) \ge 0\}, \end{aligned}$$

which is equivalent to asking

$$\begin{aligned} \tilde{t_1} = \min \{t:x(t-\tau (t)) \le 0\}. \end{aligned}$$

Therefore \(\tilde{t_1} \in [t_1^*+ \beta \tau _2, t_1^*+ \tau _2]\). Adopting the method of steps, we note that solving (1) in \([0,\tilde{t_1}]\) is equivalent to solving the following IVP of the ODE

$$\begin{aligned} {\left\{ \begin{array}{ll} x'(t) = - d x(t) - 1 \\ x(0)=k_0. \end{array}\right. } \end{aligned}$$
(6)

We know that the unique solution of (6) is given by

$$\begin{aligned} y^-(t)=e^{-dt} \left( k_0 + \frac{1}{d}\right) - \frac{1}{d}. \end{aligned}$$
(7)

It is possible to extract the value of \(t_1^*\) by considering \(y^-(t_1^*)=0\) in Eq. (7). Therefore,

$$\begin{aligned} t_1^* = \frac{1}{d} \ln (k_0 d + 1). \end{aligned}$$

We note that \(t_1^*\) is independent from the parameters T, \(\tau _2\), \(\alpha \), \(\beta \) and consider \(t_1^*=0\) whenever \(k_0=0\).

At this point, we would like to analyse \(\hat{t_1} \in [t_1^*,t_2^*]\). We know the solution continues decreasing after \(t_1^*\), it follows directly that

$$\begin{aligned} x(t)<0, \quad t \in [t_1^*,t_2^*], \end{aligned}$$

and \(x(\hat{t_1})<0\).

Lemma 1

If \((1 - \beta ) \tau _2 < \min (\gamma , T-\gamma )\) , then for every i we have that \(\tau (t)\) defined in (2) cannot change value more than once in \([t_i^* + \beta \tau _2, t_i^* + \tau _2]\).

Proof

We prove this by way of contradiction. Suppose that \(\tau (t)\) changes value at least twice in \([t_i^* + \beta \tau _2, t_i^* + \tau _2]\) and we want to reach a contradiction by using (C2). The length of the interval aforementioned is \(t_1=(1-\beta ) \tau _2\). We know from (2) that \(\tau (t)\) changes value periodically and alternately after \(\gamma \) and \(T-\gamma \). This means that both time intervals above have to be smaller than or equal to \(t_1\). In other words,

$$\begin{aligned} \min (\gamma , T-\gamma ) \le (1 - \beta ) \tau _2. \end{aligned}$$

This completes the proof. \(\square \)

Lemma 2

If \(\beta > \frac{{\tiny }\left[ \ln (1+e^{d \tau _2}) - \ln (2)\right] }{d \tau _2}\), then for every i we have \(t_i^* + \tau _2 <t_{i+1}^*\).

Proof

We prove this statement by induction; first we show that it is true for \(i=1\). The basic idea is to consider the case in which solution changes monotonicity at the earliest moment possible \(\hat{t_1}=t_1^*+\beta \tau _2\) and impose the condition \(x(t_1^* + \tau _2)<0\). Using the method of steps, we consider the IVP of ODE (6) in \([t_1^*,t_1^* + \beta \tau _2]\) and we compute \(x(t_1^* + \beta \tau _2)\) by substituting \(\hat{t_1}= t_1^* + \beta \tau _2\), which yields

$$\begin{aligned} x(t_1^* + \beta \tau _2) = \frac{1}{d}(e^{-d \beta \tau _2}-1). \end{aligned}$$

Then we compute the solution to (5) to obtain

$$\begin{aligned} x(t) = \frac{1}{d} \left[ e^{-d(t-(t_1^* + \beta \tau _2))} \left( e^{-d \beta \tau _2} - 2\right) + 1\right] . \end{aligned}$$

Imposing \(x(t_1^* + \tau _2)<0\), we have

$$\begin{aligned} x(t_1^* + \tau _2) = \frac{1}{d} \left[ e^{-d(1 - \beta ) \tau _2} \left( e^{-d \beta \tau _2} - 2\right) + 1\right] < 0. \end{aligned}$$

By solving the inequality, we have

$$\begin{aligned} \beta > \frac{\left[ \ln (1+e^{d \tau _2}) - \ln (2)\right] }{d \tau _2}, \end{aligned}$$

which is exactly what we need in order for \(t_1^*+\tau _2<t_2^*\).

Now let \(t_i^* + \tau _2 <t_{i+1}^*\) be true for i. We aim to prove it holds also for \(i+1\) or in other words that

$$\begin{aligned} t_{i+1}^* + \tau _2 <t_{i+2}^*. \end{aligned}$$
(8)

Since \(t_i^* + \tau _2 <t_{i+1}^*\) holds, x(t) has the same monotonicity for t in \([t_{i+1}^*,t_{i+1}^* + \beta \tau _2)\). This leads to two possible cases:

Case 1-x(t) is decreasing in the aforementioned interval, therefore

$$\begin{aligned} x(s)<0, \; \; \forall s \in [t_{i+1}^*,t_{i+1}^* + \beta \tau _2). \end{aligned}$$

Case 2-x(t) is increasing in the aforementioned interval, therefore

$$\begin{aligned} x(s)>0, \; \; \forall s \in [t_{i+1}^*,t_{i+1}^* + \beta \tau _2). \end{aligned}$$

Similarly to \(i=1\), we consider the case in which the solution changes monotonicity at the earliest moment possible \(t=t_i^*+\beta \tau _2\).

Case 1 : (8) holds if \(x(t_i^* + \tau _2) < 0\), when the solution increases in \([t_i^* + \beta \tau _2, t_i^* + \tau _2]\). This is analogous as the case for \(i=1\). Therefore

$$\begin{aligned} x(t_i^* + \tau _2) = \frac{1}{d} \left[ e^{-d(1 - \beta ) \tau _2} \left( e^{-d \beta \tau _2} - 2\right) + 1\right] < 0. \end{aligned}$$

Case 2 : (8) holds if \(x(t_i^* + \tau _2) > 0\), when solution decreases in \([t_i^* + \beta \tau _2 ,t_i^* + \tau _2]\).

Let \(y(t)=-x(t)\) and note that conditions on y(t) are equivalent as in the case above. \(\square \)

Note that Lemma 2 guarantees that for all \(t \in (0,\tau _2]\)

$$\begin{aligned} x(t_i^* - t) {\left\{ \begin{array}{ll} > 0 &{} \text{ if } \; i \; \text{ is } \text{ odd }, \\ < 0 &{} \text{ if } \; i \; \text{ is } \text{ even }. \end{array}\right. } \end{aligned}$$
(9)

This is a really important property since it guarantees that the changes of monotonicity can be confined to the interval \([t_i^* + \beta \tau _2, t_i^* + \tau _2]\) and

$$\begin{aligned} \hat{t_i} \in [t_i^* + \beta \tau _2, t_i^* + \tau _2]. \end{aligned}$$

Now we start computing \(\mathring{t_i}\) for (1) with parameters satisfying (C1), (C2) and (C3). Using (9) and the symmetry of the system we can consider, without loss of generality, i to be odd which yields:

$$\begin{aligned} x(t)<0, \; \; t \in (t_i^*,t_{i+1}^*). \end{aligned}$$

Lemma 2 guarantees that the solution x(t) of (1), and therefore \(\mathring{t_i}\), depend on the value of \(\tau (t)\) for \(t \in [t_i^* + \beta \tau _2, t_i^* + \tau _2]\). In addition Lemma 1 shows that \(\tau (t)\) can change value maximum once in the aforementioned interval.

This leads to four possible different scenarios:

  1. (S1)

    \(\tau (t_i^* + \beta \tau _2) = \tau _2 \Longleftrightarrow \mod (t_i^* + \beta \tau _2, T) \ge \gamma \).

    1. (S1a)

      \(\tau (t_i^* + t) = \tau _2, \quad \forall t \in [\beta \tau _2, \tau _2]\).

    2. (S1b)

      \(\exists \tilde{t_i} \in (\beta \tau _2, \tau _2)\) such that

      \(\tau (t_i^* + t) = \tau _2, \quad \forall t \in [\beta \tau _2, \tilde{t_i})\),

      \(\tau (t_i^* + t) = \beta \tau _2, \quad \forall t \in (\tilde{t_i}, \tau _2]\).

  2. (S2)

    \(\tau (t_i^* + \beta \tau _2) = \beta \tau _2 \Longleftrightarrow \mod (t_i^* + \beta \tau _2, T) < \gamma \).

    1. (S2a)

      \(\tau (t_i^* + t) = \beta \tau _2, \quad \forall t \in [\beta \tau _2, \tau _2]\).

    2. (S2b)

      \(\exists \tilde{t_i} \in (\beta \tau _2, \tau _2)\) such that

      \(\tau (t_i^* + t) = \beta \tau _2, \quad \forall t \in [\beta \tau _2, \tilde{t_i})\),

      \(\tau (t_i^* + t) = \tau _2, \quad \forall t \in (\tilde{t_i}, \tau _2]\).

We study the monotonicity of x(t) for \(t \in [t_i^*+\beta \tau _2,t_i^*+\tau _2]\) which depends on the sign of \(f(x(t-\tau (t)))=- \text {sgn} (x(t-\tau (t)))\).

In case (S1a),

$$\begin{aligned} x(t-\tau _2)>0, \quad \forall t \in [t_i^*+\beta \tau _2,t_i^*+\tau _2). \end{aligned}$$

x(t) is thus decreasing in \([t_i^*,t_i^* + \tau _2)\) and then increasing in \((t_i^*+\tau _2,t_{i+1}^*]\). There is a unique change of monotonicity so \({\hat{t}}_i=t_i^* + \tau _2\) and \(\mathring{t}_i=\tau _2\).

In case (S1b), x(t) decreases in \([t_i^* + \beta \tau _2, \tilde{t_i}]\) and in the delay changing point, it starts increasing since

$$\begin{aligned} x(t-\beta \tau _2)<0, \quad \forall t \in [\tilde{t_i},t_i^*+\tau _2). \end{aligned}$$

Moreover \(\mathring{t}_i=\tilde{t_i}-t_i^*\), since it is the time when the unique monotonicity change occurs and \(\hat{t_i}= cT\) for some natural number c.

In case (S2a),

$$\begin{aligned} x(t-\beta \tau _2)<0, \quad \forall t \in [t_i^*+\beta \tau _2,t_i^*+\tau _2). \end{aligned}$$

x(t) is thus increasing in \([t_i^*+\beta \tau _2 ,t_{i+1}^*)\). The change of monotonicity occurs in \(\hat{t_i}=t_i^* + \beta \tau _2\) and \(\mathring{t}_i=\beta \tau _2\).

In these three cases, we can use the method of steps and consider the IVP of the ODE (4) in \([t_i^*,t_i^* + \mathring{t}_i]\) and we substitute \(\hat{t_i}= t_i^* + \mathring{t}_i\) to yield:

$$\begin{aligned} x({\hat{t}}_i) = \frac{1}{d}(e^{-d \mathring{t}_i}-1). \end{aligned}$$

In case (S2b), there is a triple change of monotonicity since

$$\begin{aligned}&x(t-\beta \tau _2)<0, \quad \forall t \in [t_i^*+\beta \tau _2,\tilde{t_i}),\\&x(t-\tau _2)>0, \quad \forall t \in [\tilde{t_i},t_i^*+\tau _2). \\&x(t-\tau (t))<0, \quad \forall t \in [t_i^*+ \tau _2,t_{i+1}^*). \end{aligned}$$

Let \(\breve{t_i}:= \tilde{t_i}-t_i^*\). As in case (S2a), the first monotonicity change of x(t) occurs at \(t = t_i^* + \beta \tau _2\) where the solution increases until it reaches \({\tilde{t}}_i\). At this point, \(\tau ({\tilde{t}}_i)=\tau _2\) and this change in delay forces the solution to decrease again until it reaches \(t_i^* + \tau _2\) and then finally increases in \([t_i^* + \tau _2, t_{i+1}^*]\).

We aim to calculate \(\hat{t_i}\) in this scenario. The first step consists of calculating \(t_{i+1}^*\). We note that, similarly as in case (S2a), we have \(x(t_i^* + \beta \tau _2) = \frac{1}{d} \left( e^{-d \beta \tau _2} - 1\right) \). Then we consider the IVP below in \([t_i^* + \beta \tau _2, \tilde{t_i}]\):

$$\begin{aligned} {\left\{ \begin{array}{ll} x'(t) = - d x(t) + 1 \\ x(t_i^* + \beta \tau _2)= \frac{1}{d} \left( e^{-d \beta \tau _2} - 1\right) , \end{array}\right. } \end{aligned}$$

which yields the solution

$$\begin{aligned} x(t) = \frac{1}{d} \left[ e^{-d(t-(t_i^* + \beta \tau _2))} \left( e^{-d \beta \tau _2} - 2\right) + 1\right] . \end{aligned}$$

So

$$\begin{aligned} x({\tilde{t}}_i) = \frac{1}{d} \left[ e^{-d({\tilde{t}}_i-(t_i^* + \beta \tau _2))} \left( e^{-d \beta \tau _2} - 2\right) + 1\right] . \end{aligned}$$

Now consider the following system in \([{\tilde{t}}_i, t_i^* + \tau _2]\):

$$\begin{aligned} {\left\{ \begin{array}{ll} x'(t) = - d x(t) - 1, \\ x({\tilde{t}}_i) = \frac{1}{d} \left[ e^{-d({\tilde{t}}_i-(t_i^* + \beta \tau _2))} \left( e^{-d \beta \tau _2} - 2\right) + 1\right] . \end{array}\right. } \end{aligned}$$

Its solution is given by

$$\begin{aligned} x(t) = \frac{1}{d} \left[ e^{-d(t-(t_i^* + \breve{t}_i))} \left[ e^{-d(\breve{t}_i-(t_i^* + \beta \tau _2))} \left( e^{-d \beta \tau _2} - 2\right) + 2\right] -1\right] , \end{aligned}$$

and

$$\begin{aligned} x(t_i^* + \tau _2) = \frac{1}{d} \left( e^{-d \tau _2} - 1 - 2 e^{-d(1 - \beta ) \tau _2} + 2 e^{-d(\tau _2 - \breve{t}_i)}\right) , \end{aligned}$$

where we omit the details of the computation.

Finally, we consider the increasing system in \([t_i^*+ \tau _2,t_{i+1}^*]\):

$$\begin{aligned} {\left\{ \begin{array}{ll} x'(t) = - d x(t) + 1, \\ x(t_i^* + \tau _2) = \frac{1}{d} \left( e^{-d \tau _2} - 1 - 2 e^{-d(1 - \beta ) \tau _2} + 2 e^{-d(\tau _2 - \breve{t}_i)}\right) , \end{array}\right. } \end{aligned}$$

with its solution given by

$$\begin{aligned} x(t) = \frac{1}{d} \left[ e^{-d(t-(t_1^* + \tau _2))} \left( e^{-d \tau _2} - 2 - 2 e^{-d(1 - \beta ) \tau _2} + 2 e^{-d(\tau _2 - \breve{t_1})}\right) +1\right] . \end{aligned}$$

By imposing \(x(t_{i+1}^*)=0\) in the above equation, we get

$$\begin{aligned} t_{i+1}^* = t_i^* + \tau _2 + \frac{1}{d} \ln \left( - e^{-d \tau _2} + 2 + 2 e^{-d(1 - \beta ) \tau _2} - 2 e^{-d(\tau _2 - \breve{t}_i)}\right) . \end{aligned}$$

At this point, we solve for \({\hat{t}}_i\) by considering the increasing system for t in \([\hat{t_i},t_{i+1}^*]\) described in (5). The solution of

$$\begin{aligned} {\left\{ \begin{array}{ll} x'(t) = - d x(t) + 1 \\ x(t_1^* + \mathring{t}_i) = \frac{1}{d} \left( e^{-d \mathring{t}_i} - 1\right) , \end{array}\right. } \end{aligned}$$

is given by

$$\begin{aligned} x(t)= \frac{1}{d} \left[ e^{-d(t-(t_i^*+\mathring{t}_i))} \left( e^{-d \mathring{t}_i} - 2\right) +1\right] . \end{aligned}$$

In the same way, we impose \(x(t_{i+1}^*)=0\) to yield

$$\begin{aligned} t_{i+1}^* = t_i^*+\mathring{t}_i + \frac{1}{d} \ln \left( 2 - e^{-d \mathring{t}_i}\right) . \end{aligned}$$
(10)

Now we can find \(\mathring{t}_i\) by equaling the two quantities derived for \(t_{i+1}^*\).

$$\begin{aligned} \mathring{t}_i + \frac{1}{d} \ln \left( 2 - e^{-d \mathring{t}_i}\right) = \tau _2 + \frac{1}{d} \ln \left( - e^{-d \tau _2} + 2 + 2 e^{-d(1 - \beta ) \tau _2} - 2 e^{-d(\tau _2 - \breve{t}_i)}\right) . \end{aligned}$$
(11)

Note that the equation above (11) includes scenarios (S1a) when \(\breve{t_i}=\beta \tau _2\), and (S2a) when \(\breve{t_i}=\tau _2\).

Proposition 1

Let x(t) be the solution to (1) where the parameters satisfy the following assumption:

$$\begin{aligned} \frac{\left[ \ln (1+e^{d \tau _2}) - \ln (2)\right] }{d \tau _2}< \beta < \frac{\left[ \ln (2e^{d \tau _2} - 1) \right] }{d \tau _2}. \end{aligned}$$
(12)

Then

$$\begin{aligned} t_i^* - t_j^* = \sum _{k=j}^{i-1} \left[ \mathring{t}_k + \frac{1}{d} \ln \left( 2 - e^{-d \mathring{t}_k}\right) \right] . \end{aligned}$$
(13)

Moreover,

  1. (1)

    If \(\beta <1\), \(\mathring{t}_k\) can be calculated exactly if and only if \(\check{t}=cT+\gamma \) is not in \([t_k^*+\beta \tau _2, t_k^* + \tau _2], \; \; \forall c \in {\mathbb {N}}\).

  2. (2)

    If \(\beta >1\), \(\mathring{t}_k\) can be calculated exactly if and only if \(\check{t}=dT\) is not in \([t_k^*+ \tau _2, t_k^* + \beta \tau _2], \; \; \forall d \in {\mathbb {N}}\).

Proof

Condition (12) guarantees that \(\hat{t_i}<t_{i+1}^*\) for all i. The first inequality derives directly from lemma 2 when \(\beta <1\) since

$$\begin{aligned} \hat{t_i} \le t_i^*+ \tau _2 < t_{i+1}^*, \end{aligned}$$
(14)

while the second part of the inequality occurs when \(\beta >1\) and is computed in a similar way. Condition (14) is enough to guarantee equality (10); therefore we apply (10) iteratively \(i-j\) times and end up with (13).

Moreover, there is a single change of monotonicity in \([t_k^*,t_{k+1}^*]\) when the delay \(\tau (t)\) defined in (2) does not change from \(\tau _{\min }\) to \(\tau _{\max }\) in the interval \([t_k^*+\tau _{\min },t_k^*+ \tau _{\max }]\). Only when this happens, we can calculate \(\mathring{t}_k\) analytically (i.e. this corresponds to scenarios (S1) or (S2a) in case \(\beta <1\)), otherwise we should adopt a procedure similar to scenario (S2b) to calculate it numerically. \(\square \)

Searching for Periodic Solutions

In this section, we use the method of steps to solve (1) with initial condition (3) where \(k_0=0\) without loss of generality, and find its periodic solutions.

We define an m-cycle periodic solution of period P of (1) to be a periodic solution of period \(P=t_{j+2m+1}^*-t_{j+1}^*\) for all natural j. We are searching for the periodic solutions that complete m cycles in one period.

Theorem 1

Consider the following Delay Differential Equation:

$$\begin{aligned} {\left\{ \begin{array}{ll} x'(t) = - d x(t) + f(x(t-\tau (t))) \\ x(t)>0 \quad \forall t \in [-\tau _{\max },0) \\ x(0)=0, \end{array}\right. } \end{aligned}$$
(15)

where

$$\begin{aligned} \tau (t) = {\left\{ \begin{array}{ll} \tau _2, &{} \text{ if } \mod \text{(t,T) } \ge \gamma \\ \tau _1=\beta \tau _2, &{} \text{ if } \mod \text{(t,T) } < \gamma \end{array}\right. } \end{aligned}$$

and

$$\begin{aligned} f(x)= - \text {sgn}(x) = {\left\{ \begin{array}{ll} 1, &{} \text{ if } x<0 \\ 0, &{} \text{ if } x=0 \\ -1, &{} \text{ if } x>0, \end{array}\right. } \end{aligned}$$

for d, \(\tau _2\), \(\beta >0\); \(T> \gamma > 0\) where \(\tau _{\max } := \max (\beta \tau _2, \tau _2)\) and \(\tau _{\min } := \min (\beta \tau _2, \tau _2)\).

Moreover, let \(\tau _2, \beta , d, \gamma \) satisfy inequality (12) and let \(l \in {\mathbb {Q}}\) be such that \(l=\frac{m}{n}\) and \(\text {gcd}(m,n)=1\) for \(m, n \in {\mathbb {N}}\) and suppose the parameters satisfy

$$\begin{aligned} \gamma < 2 l \, [\beta \tau _2 + \frac{1}{d} \ln (2 - e^{-d \beta \tau _2})]. \end{aligned}$$
(16)

Then there exists a T such that (15) yields an m-cycle periodic solution of period nT.

Before proving the Theorem, we analyse the two conditions assumed and explain why they are relevant.

As seen in Proposition 1, the first condition (12) guarantees that \(\hat{t_i}<t_{i+1}^*\) for all i. Note that this condition limits the values of \(\beta \) which should be “close enough” to one; this can be translated by asking that the two switching delays should not differ by much.

Lemma 3

If condition (16) is not satisfied, then there is no m -cycle periodic solution of period nT for the system (15).

Proof

Suppose that condition (16) does not hold or equivalently

$$\begin{aligned} \gamma \ge 2 l \, [\beta \tau _2 + \frac{1}{d} \ln (2 - e^{-d \beta \tau _2})]. \end{aligned}$$

In this case \(\tau (t)=\beta \tau _2\) for all \(t \in [0,2 l \, (\beta \tau _2 + \frac{1}{d} \ln (2 - e^{-d \beta \tau _2}))]\) which yields:

$$\begin{aligned} T=2l \left( \beta \tau _2 + \frac{1}{d} \ln (2 - e^{-d \beta \tau _2})\right) \le \gamma . \end{aligned}$$

This choice of T contradicts with the assumption \((\gamma <T)\), thus there is no m-cycle periodic solution of period nT for the system (15). \(\square \)

Proof

of Theorem 1—Since condition (12) holds, we can apply Proposition 1 to obtain

$$\begin{aligned} nT = t_{2m+1}^* - t_{1}^* = \sum _{k=1}^{2m} \left[ \mathring{t}_k(T) + \frac{1}{d} \ln \left( 2 - e^{-d \mathring{t}_k(T)}\right) \right] . \end{aligned}$$
(17)

If there exists a T that satisfies (17), we know that \(\tau (t_{2m+1}^*+t)=\tau (t_1^*+t)\) for all \(t \ge 0\) so it is an m-cycle periodic solution of period \(t_{2m+1}^* - t_{1}^* = nT\).

This is equivalent to showing that the function

$$\begin{aligned} g(T)= nT - \sum _{k=1}^{2m} \left[ \mathring{t}_k(T) + \frac{1}{d} \ln \left( 2 - e^{-d \mathring{t}_k(T)}\right) \right] , \end{aligned}$$
(18)

contains at least one root.

We analyse the periodic solutions separately if l is natural or not. a) Periodic solutions for \(l \in {\mathbb {N}}\) (i.e. \(n=1\)). It is important to note that \(\mathring{t}_k\) does not depend on T for \(k \le 2m\), thus we can study each of the \(\mathring{t}_k\) separately. This leads to the possibility of simplifying (17) into

$$\begin{aligned} T = \sum _{k=1}^{2m} \left[ \mathring{t_k} + \frac{1}{d} \ln \left( 2 - e^{-d \mathring{t_k}}\right) \right] , \end{aligned}$$

and the choice of T would be unique since the right hand side is a constant given all the other parameters.

The calculation of \(\mathring{t_k}\) depends on the choice of \(\gamma \):

  1. (1)

    \(\gamma \ge \tau _2 + (k-1)\beta \tau _2 + \frac{k-1}{d} \ln (2-e^{-d\beta \tau _2}) \Longrightarrow \mathring{t}_k = \beta \tau _2\).

  2. (2)

    \(\gamma \le k \beta \tau _2 + \frac{k-1}{d} \ln (2-e^{-d\beta \tau _2}) \Longrightarrow \mathring{t}_k = \tau _2\).

  3. (3)

    Otherwise \(\mathring{t}_k \in (\tau _{\min }, \tau _{\max })\) and this can be branched into two further cases:

    1. (a)

      \(\beta >1 \rightarrow \mathring{t}_k = \gamma - t_k^*\).

    2. (b)

      \(\beta <1 \rightarrow \mathring{t}_k\) is calculated numerically using (11).

Note that there is a maximum \(\mathring{t}_k\) that falls into 3) and happens if \(\gamma \in [\mathring{t_k}+\beta \tau _2, \mathring{t_k}+\tau _2]\). We are able to predict in this case all the other \(\mathring{t}_k\) without further calculations since:

\(j<k \Longrightarrow \mathring{t_j}=\beta \tau _2\); \(k<j<2m+1 \Longrightarrow \mathring{t_j}= \tau _2\).

(b) Periodic solutions in all other cases \((l \in {\mathbb {Q}} \setminus {\mathbb {N}})\). This time \(\mathring{t_k}\) are functions of T which complicates the problem of searching for a root of (18).

We first consider the continuity of \(\mathring{t_1}(T)\) with respect to T. We want to prove that given \(T>0\) and for \(\epsilon >0\),

$$\begin{aligned} \displaystyle \lim _{\epsilon \rightarrow 0} \mathring{t_1}(T-\epsilon ) = \displaystyle \lim _{\epsilon \rightarrow 0} \mathring{t_1}(T+\epsilon ) = \mathring{t_1}(T). \end{aligned}$$

If no change of delay occurs in \([\beta \tau _2, \tau _2]\), there always exists a small enough \(\epsilon \) such that

$$\begin{aligned} \mathring{t}_1(T-\epsilon ) = \mathring{t}_1(T+\epsilon )=\mathring{t}_1(T), \end{aligned}$$

and continuity is verified easily.

We now study the subcase in which \(\beta <1\) and there is exactly one change in delay in \([\beta \tau _2, \tau _2]\), given T. This can be further subdivided into scenarios (S1b) and (S2b) of Sect. 3:

(S1b) occurs when \(\mathring{t}_1(T) = \mu T\) for some \(\mu \in {\mathbb {N}}\). We can always find a small enough \(\epsilon \) such that \(\mathring{t}_1(T-\epsilon ) = \mu (T - \epsilon )\) and \(\mathring{t}_1(T + \epsilon ) = \mu (T + \epsilon )\). So the continuity holds as \(\epsilon \rightarrow 0\).

(S2b) occurs when there is a change of monotonicity at \(\mu T + \gamma \) for some \(\mu \in {\mathbb {N}}\). We can always find a small enough \(\epsilon \) such that \({\tilde{t}}_1(T - \epsilon ) = \mu (T-\epsilon ) + \gamma \) and \({\tilde{t}}_1(T + \epsilon ) = \mu (T+\epsilon ) + \gamma \). Let

$$\begin{aligned} h_1(x):= x + \frac{1}{d} \ln \left( 2 - e^{-dx}\right) \end{aligned}$$

and

$$\begin{aligned} h_2({\tilde{t}}):= \tau _2 + \frac{1}{d} \ln \left( - e^{-d \tau _2} + 2 + 2 e^{-d(1 - \beta ) \tau _2} - 2 e^{-d(\tau _2 - {\tilde{t}})}\right) . \end{aligned}$$

Note that \(h_1(x)\) and \(h_2({\tilde{t}})\) are continuous functions with respect to x and \({\tilde{t}}\) respectively. But \(\mu \) is finite, therefore if \(\epsilon \rightarrow 0\),

$$\begin{aligned}&h_2(\mu (T+\epsilon ) + \gamma ) \rightarrow h_2(\mu T + \gamma ); \\&h_2(\mu (T-\epsilon ) + \gamma ) \rightarrow h_2(\mu T + \gamma ). \end{aligned}$$

Using (11), we get the following three equations:

$$\begin{aligned}&h_1(\mathring{t}_1(T))=h_2(\mu T + \gamma ); \\&h_1(\mathring{t}_1(T+\epsilon ))=h_2(\mu (T + \epsilon ) + \gamma ); \\&h_1(\mathring{t}_1(T-\epsilon ))=h_2(\mu (T - \epsilon ) + \gamma ). \end{aligned}$$

Since the right hand side of all equations converges to the same quantity as \(\epsilon \rightarrow 0\) and \(h_1(x)\) is continuous, then \(\mathring{t_1}(T)\) is also a continuous function. At this point, it is clear that the continuity can be generalized for multiple delay changes, for cases where \(\beta >1\) and for \(\mathring{t_k}(T)\) with \(k \in \{1,\ldots ,2m\}\).

In particular, g(T) defined in (18) is a continuous function with respect to T since it is a composition of continuous functions. Moreover, condition (12) guarantees that \(\tau _{\min } \le \mathring{t_k}(T) \le \tau _{\max }\) so we can consider the following:

  1. (1)

    \(T_{\min }=2l \left[ \tau _{\min } + \frac{1}{d} \ln \left( 2 - e^{-d \tau _{\min }}\right) \right] \),

  2. (2)

    \(T_{\max }=2l \left[ \tau _{\max } + \frac{1}{d} \ln \left( 2 - e^{-d \tau _{\max }}\right) \right] \).

Note that the continuous function g satisfies \(g(T_{\min }) \le 0\) and \(g(T_{\max }) \ge 0\). Therefore we can apply the Intermediate Value Theorem which states that there exists at least one \({\hat{T}} \in [T_{\min },T_{\max }]\) such that \(g({\hat{T}})=0\).

This \({\hat{T}}\) will yield an m-cycle periodic solution of period nT we are searching for and this proves the Theorem. \(\square \)

The delay-change period T can be approximated numerically by considering a grid of values for \(I=[T_{\min },T_{\max }]\) and choosing the value that minimizes |g(T)|.

Theorem 2

Consider equation (15) with known parameters \(\tau _2\) , \(\beta \) , d and T satisfying condition (12) of Theorem 1and the following condition:

$$\begin{aligned} 2l\left[ \tau _{\min }+\frac{1}{d}\ln (2-e^{-d\tau _{\min }})\right] \le T \le 2l\left[ \tau _{\max }+\frac{1}{d}\ln (2-e^{-d\tau _{\max }})\right] . \end{aligned}$$

Then there exists a \(\gamma \) such that (15) yields an m -cycle periodic solution of period nT.

The proof is similar to Theorem 1 where the main step is to show that \(\mathring{t}_k(\gamma )\) is a continuous function for \(k \in \{1,\ldots ,2m\}\) and we choose to omit it.

Theorems 1 and 2 show that under certain conditions, it is possible to find coexisting periodic solutions with different periods and cycles by varying just one of the switching-delay related parameters.

Numerical Experiments

In this section we provide some simulations using Matlab to obtain different multi-cycle periodic solutions using Theorem 1 as explained above.

We assume in all the plots that three of the parameters are always fixed: \(\beta =0.6\), \(\tau _2=3\), \(d=0.1\). Then we choose \(\gamma \) satisfying condition (16); in the first two cases \(\gamma =3\), in the rest we choose a larger \(\gamma =8\) to demonstrate interesting dynamics. We also introduce dashed lines at \(y=nT\) to show the period of each solution.

The parameters that vary throughout these plots are m and n which regulate the behaviour of solutions since we aim to search for an m-cycle periodic solution of period nT. In these simulations T is computed numerically and our method proves to be rather stable in identifying multi-cycle periodic solutions.

The two plots in Fig. 2 show two of the possible 1-cycle periodic solutions of (15) which are obtained by choosing \(n=1\) and \(n=2\) respectively. Important to notice is that the two solutions yield different behaviours since the solution in the right panel presents two extrema in every period with the same absolute value but this does not occur in the left panel because the maxima presents a higher absolute value.

Fig. 2
figure 2

In the left panel, 1-cycle Periodic Solution of Period \(T = 8.6295\); in the right panel, 1-cycle Periodic Solution of Period \(2T = 6.6498\)

The two plots in Fig. 3 show examples of 2-cycle periodic solutions of (15). In this case, it is interesting to note how the two solutions present similar behaviour and their period is just slightly different.

Fig. 3
figure 3

In the left panel, 2-cycle Periodic Solution of Period \(T = 19.2388\); in the right panel, 2-cycle Periodic Solution of Period \(3T = 19.1721\)

The two plots in Fig. 4 represent different 3-cycle periodic solutions of (15) where \(\gamma =8\). Note that the peaks of the solutions are the same since all parameters are the same; the only thing that differs are the peak patterns since the former presents two global maxima and minima in every period while the latter just one of both. The two plots in Fig. 5 represent different 5-cycle periodic solutions of (15). Interesting to note is the fact that the plot on the right presents additional oscillations since one of the local peaks undergoes periodically through a triple change of monotonicity. This happens since that special case identifies with scenario (S2b) of Sect. 3 (Fig. 5).

Fig. 4
figure 4

In the left panel, 3-cycle Periodic Solution of Period \(T = 27.8687\); in the right panel, 3-cycle Periodic Solution of Period \(2T = 23.9084\)

Fig. 5
figure 5

In the left panel, 5-cycle Periodic Solution of Period \(2T = 45.1272\); in the right panel, 5-cycle Periodic Solution of Period \(3T = 39.8079\)

Conclusion

We have introduced a DDE model with periodic switching delays and described the behaviour of some solutions induced by its negative feedback. In particular, we know that the solutions are always bounded and, under relevant conditions on the parameters, the existence of multi-cycle periodic solutions can occur. The main condition requires that the two switching delays, which can be considered for example in the tick population egg dynamics in [2] as the normal and diapause delay, should be close enough to each other. This guarantees that its dynamics can be studied analytically and in the case where the two delays tend to coincide, we can approximate their dynamics to a single-delay population model which has already been analysed by [11].

The model studied in this paper can be used in several applications in different fields [12], so it would be useful to study the implications of its dynamics case by case. It is though necessary in first place to expand our research on these examples of periodic delay-switching DDEs as studied by [13] and have a better understanding of its theoretical results. In this direction, we would like to further analyse this model by considering the effects of perturbation on these periodic solutions and dropping some of the simplifying assumptions on the model (for example considering f to be continuous).