1 Introduction

In recent years, the following first-order neutral differential equations

$$ \bigl[x (t)-P(t)x(t-r)\bigr]' = -Q(t) x(t)+f\bigl(t,x(t-r)\bigr) $$
(1.1)

and

$$ \bigl[x (t)-cx\bigl(t-\tau(t)\bigr)\bigr]' = -Q(t) x(t)+f\bigl(t,x \bigl(t-\tau(t)\bigr)\bigr) $$
(1.2)

have been extensively used to describe the dynamic behaviors for the blood cell production models, population models, and control models (see, for example, [15] and the references therein). Here, \(Q, \tau\in C(\mathbb{R}, (0, +\infty))\), \(P\in C^{1}(\mathbb{R}, \mathbb{R})\), \(f\in C (\mathbb{R}\times\mathbb{R}, \mathbb{R})\), \(r>0\), and \(|c|<1\) are constants. In particular, assuming that P, Q are ω-periodic functions, f is ω-periodic with respect to the first variable, and

$$ \inf_{t\in\mathbb{R}}Q(t)>0, $$
(1.3)

some criteria ensuring the existence on the positive periodic solutions of (1.1) and (1.2) have been established in [6] and [7], respectively. It is well known that almost periodically variable coefficients and delays in differential equations of population and ecology problems are much more realistic in the real world. Therefore, in recent years, there has been increasing interest in the existence and stability of almost periodic type solutions for first-order functional differential equations in population models [812]. However, to the best of our knowledge, there are few papers published on positive almost periodic solutions of (1.1) and (1.2). Motivated by the above discussions, in this paper we aim to establish some sufficient conditions on the existence of positive almost periodic solutions of the following first-order neutral differential equations with time-varying delays and coefficients:

$$ \bigl[x (t)-P(t)x\bigl(t-\tau_{1}(t)\bigr)\bigr]' = -Q(t) x(t)+f\bigl(t,x\bigl(t-\tau_{2} (t)\bigr)\bigr), $$
(1.4)

where \(Q,P\in C(\mathbb{R}, (0, +\infty))\), \(\tau_{1}, \tau_{2}\in C(\mathbb{R}, [0, +\infty))\) are almost periodic functions, \(f\in C (\mathbb{R}\times\mathbb{R}, \mathbb{R})\) is an almost periodic function for t uniformly on \(\mathbb{R}\), and

$$M[Q]=\lim_{T\rightarrow+\infty}\frac{1}{T} \int_{t}^{t+T}Q(s)\,ds>0 , $$

where the limit above is independent of t. The contributions of this paper can be summarized as follows: (1) In this manuscript, all delays and coefficients of (1.4) are time-varying, and (1.1) and (1.2) are special cases of (1.4); (2) The sufficient conditions for the existence of positive almost periodic solution are derived in terms of its coefficients without (1.3), which has not been investigated till now.

Throughout this paper, we denote the set of almost periodic functions from \(\mathbb{R}\) to \(\mathbb{R}\) by \(\mathit{AP}(\mathbb{R},\mathbb{R})\). Then, \(( \mathit{AP}(\mathbb{R},\mathbb{R}), \|\cdot\|_{\infty})\) is a Banach space, where \(\|\cdot\|_{\infty}\) denotes the supremum \(\|u\|_{\infty} := \sup_{ t\in\mathbb{R}} |u (t)| \). For more details, we refer the reader to [13, 14].

2 Main results

Theorem 2.1

Let \(\tau_{1}(t)\not\equiv\tau_{2}(t)\) for all \(t\in\mathbb{R}\), and assume that the following conditions hold:

\((A_{1})\) :

There exist positive constants \(F^{S}\), \(F^{i}\) and a bounded and continuous function \(Q^{*} :\mathbb{R}\rightarrow(0, +\infty)\) such that

$$ F^{i} e ^{ -\int_{s}^{t}Q^{*}(u)\,du}\leq e ^{ -\int_{s}^{t}Q(u)\,du}\leq F^{S} e ^{ -\int_{s}^{t}Q^{*}(u)\,du} \quad\textit{for all } t,s\in\mathbb{R} \textit{ and }t-s\geq0, $$
(2.1)

where \(Q^{*}\) has the lower bound different from zero.

\((A_{2})\) :

There exist positive constants \(p_{0}\), \(p_{1}\), m, and M such that

$$ \left \{ \textstyle\begin{array}{l} 0\leq p_{0}=\inf_{t\in\mathbb{R}}P(t)\leq \sup_{t\in\mathbb{R}}P(t)= p_{1},\\ \sup_{t\in\mathbb{R}, x,y\in[m, M]}\frac{F^{S}[-Q(t)P(t)x +f(t, y) ]}{Q^{*}(t)}\leq(1-p_{1})M,\\ \inf_{t\in\mathbb{R}, x,y\in[m, M]}\frac{F^{i}[-Q(t)P(t)x +f(t, y) ]}{Q^{*}(t)}\geq (1-p_{0})m. \end{array}\displaystyle \right . $$
(2.2)
\((A_{3})\) :

There exist positive constants \(L^{f} \) and L such that \(L+p_{1}<1\),

$$\begin{gathered} \sup_{t\in \mathbb{R}}F^{S}\frac{ \vert Q(t)P(t) \vert +L^{f}}{Q^{*}(t)}\leq L\quad \textit{and}\\ \bigl\vert f(t,x_{1})-f(t,x_{2}) \bigr\vert \leq L^{f} \vert x_{1} - x_{2} \vert \quad\textit {for all } t,x_{1}, x_{2}\in\mathbb{R} .\end{gathered} $$
(2.3)

Then equation (1.4) has at least one positive almost periodic solution \(x^{*}\) such that \(x^{*}(t)\in[m, M]\) for all \(t \in\mathbb{R}\).

Proof

Set

$$B =\bigl\{ \varphi|\varphi\in \mathit{AP}(\mathbb{R},\mathbb{R}) , m\leq \varphi(t) \leq M \mbox{ for all } t\in\mathbb{R} \bigr\} . $$

Clearly, B is a closed subset of \(\mathit{AP}(\mathbb{R},\mathbb{R})\). For any \(\varphi\in B\), we consider an auxiliary equation

$$ x '(t)=-Q(t)x(t)-Q(t)P(t)\varphi\bigl(t-\tau_{1}(t) \bigr)+f\bigl(t, \varphi\bigl(t-\tau _{2}(t)\bigr)\bigr) . $$
(2.4)

In view of the fact that \(M[Q]>0\), it follows from Theorem 7.7 of [13] that system (2.4) has exactly one almost periodic solution

$$ x^{\varphi}(t) = \int_{-\infty}^{t}e^{-\int_{s}^{t}Q(u)\,du}\bigl[-Q(s)P(s)\varphi \bigl(s-\tau _{1}(s)\bigr)+f\bigl(s, \varphi\bigl(s- \tau_{2}(s)\bigr)\bigr)\bigr]\,ds, \quad\forall\varphi\in B, $$
(2.5)

where

$$\begin{aligned}[b] \bigl[ x^{\varphi}(t) \bigr]' &= \biggl\{ \int_{-\infty}^{t}e^{-\int_{s}^{t}Q(u)\,du}\bigl[-Q(s)P(s)\varphi \bigl(s-\tau _{1}(s)\bigr)+f\bigl(s, \varphi\bigl(s- \tau_{2}(s)\bigr)\bigr)\bigr]\,ds \biggr\} ' \\ &= -Q(t)\biggl\{ \int_{-\infty}^{t}e^{-\int_{s}^{t}Q(u)\, du}\bigl[-Q(s)P(s)\varphi \bigl(s-\tau_{1}(s)\bigr)+f\bigl(s, \varphi\bigl(s-\tau_{2}(s) \bigr)\bigr)\bigr]\, ds\biggr\} \\ &\quad{}-Q(t)P(t)\varphi\bigl(t-\tau_{1}(t)\bigr) +f\bigl(t, \varphi\bigl(t- \tau_{2}(t)\bigr)\bigr) \\ &= -Q(t)x^{\varphi}(t)-Q(t)P(t)\varphi\bigl(t-\tau_{1}(t) \bigr)+f\bigl(t, \varphi\bigl(t-\tau_{2}(t)\bigr)\bigr).\end{aligned} $$
(2.6)

In view of \(P,\tau_{1}\in \mathit{AP}(\mathbb{R},\mathbb{R})\) and Lemma 2.4 in [15], we obtain

$$P(t)\varphi\bigl(t-\tau_{1}(t)\bigr)\in \mathit{AP}(\mathbb{R},\mathbb{R}),\quad \forall\varphi\in B. $$

Now, we define a mapping \(T:B\rightarrow \mathit{AP}(\mathbb{R},\mathbb{R})\) as follows:

$$(T \varphi) (t) =P(t)\varphi\bigl(t-\tau_{1}(t)\bigr)+x^{\varphi}(t),\quad \forall\varphi\in B. $$

Next, we will prove that the mapping T is a contraction mapping on B.

For all \(t\in\mathbb{R}\), according to \((A_{1})\) and \((A_{2})\), we have

$$\begin{gathered} P(t)\varphi\bigl(t-\tau_{1}(t)\bigr)+ x^{\varphi}(t) \\ \quad\leq p_{1}M+ \int_{-\infty}^{t}e^{-\int_{s}^{t}Q^{*}(u)\,du} F^{S} \bigl[-Q(s)P(s)\varphi\bigl(s-\tau_{1}(s)\bigr) \\ \qquad{}+f\bigl(s, \varphi\bigl(s-\tau_{2}(s)\bigr)\bigr) \bigr]\,ds \\ \quad\leq p_{1}M+ \int_{-\infty}^{t}e^{-\int_{s}^{t}Q^{*}(u)\,du}(1- p_{1}) MQ^{*}(s) \,ds \leq M\end{gathered} $$

and

$$\begin{gathered} P(t)\varphi\bigl(t-\tau_{1}(t)\bigr)+ x^{\varphi}(t) \\ \quad\geq p_{0}m+ \int_{-\infty}^{t}e^{-\int_{s}^{t}Q^{*}(u)\,du} F^{i} \bigl[-Q(s)P(s)\varphi\bigl(s-\tau_{1}(s)\bigr) \\ \qquad{}+f\bigl(s, \varphi\bigl(s-\tau_{2}(s)\bigr)\bigr) \bigr]\,ds \\ \quad\geq p_{0}m+ \int_{-\infty}^{t}e^{-\int_{s}^{t}Q^{*}(u)\,du}(1- p_{0}) m Q^{*}(s) \,ds \geq m,\end{gathered} $$

which imply that the mapping T is a self-mapping from B to B.

Furthermore, for all \(\varphi, \psi\in B \), (2.5), \((A_{1})\) and \((A_{3})\) yield

$$\begin{gathered} \Vert T \varphi-T \psi \Vert _{\infty} \\ \quad \leq\sup_{t \in \mathbb{R}} \biggl\{ \bigl\vert P(t)\bigl[\varphi \bigl(t-\tau_{1}(t)\bigr)-\psi\bigl(t-\tau _{1}(t)\bigr)\bigr] \bigr\vert \\ \qquad{}+ \int_{-\infty}^{t}e^{-\int_{s}^{t}Q^{*}(u)\,du} F^{S} \bigl\vert -Q(s)P(s) \bigl(\varphi\bigl(s-\tau_{1}(s)\bigr)-\psi\bigl(s- \tau_{1}(s)\bigr)\bigr) \\ \qquad{}+\bigl(f\bigl(s, \varphi\bigl(s-\tau_{2}(s)\bigr)\bigr)-f\bigl(s, \psi\bigl(s-\tau_{2}(s)\bigr)\bigr)\bigr) \bigr\vert \,ds \biggr\} \\ \quad\leq \Vert \varphi-\psi \Vert _{\infty} \biggl\{ p_{1}+\sup _{t \in \mathbb{R}} \int_{-\infty}^{t}e^{-\int_{s}^{t}Q^{*}(u)\,du} F^{S}\bigl[ \bigl\vert Q(s)P(s) \bigr\vert +L^{f}\bigr] \,ds \biggr\} \\ \quad\leq \Vert \varphi-\psi \Vert _{\infty}\biggl[p_{1}+\sup _{t \in \mathbb{R}} \int_{-\infty}^{t}e^{-\int_{s}^{t}Q^{*}(u)\,du}Q^{*}(s)L \,ds \biggr] \\ \quad\leq (p_{1}+L ) \Vert \varphi-\psi \Vert _{\infty} .\end{gathered} $$

Thus, the mapping T is a contraction on B. Using the classical contraction mapping principle of Banach–Caccioppoli, we obtain that the mapping T possesses a unique fixed point \(x^{*}\in B \), \(Tx^{*}=x^{*}\), i.e.,

$$\begin{aligned} x^{*}(t) &=P(t)x^{*}\bigl(t-\tau_{1}(t)\bigr)+x ^{x^{*}}(t) \\ &=P(t)x^{*}\bigl(t-\tau_{1}(t)\bigr)\\ &\quad{}+ \int_{-\infty}^{t}e^{-\int_{s}^{t}Q(u)\,du}\bigl[-Q(s)P(s)x^{*} \bigl(s-\tau _{1}(s)\bigr)+f\bigl(s, x^{*}\bigl(s- \tau_{2}(s)\bigr)\bigr)\bigr]\,ds,\end{aligned} $$

which together with (2.6) leads to

$$\bigl[x ^{*} (t)-P(t)x^{*}\bigl(t-\tau_{1}(t) \bigr)\bigr]' = -Q(t) x^{*}(t)+f\bigl(t,x^{*} \bigl(t-\tau_{2}(t)\bigr)\bigr). $$

This completes the proof. □

Remark 2.1

When \(\tau_{1}(t) \equiv\tau_{2}(t)\) for all \(t\in\mathbb{R}\), the statement of Theorem 2.1 remains valid if we replace \((A_{2})\) by the following condition:

\((A_{2}^{*})\) :

There exist positive constants \(p_{0}\), \(p_{1}\), m, and M such that

$$\left \{ \textstyle\begin{array}{rcl} &&0\leq p_{0}=\inf_{t\in\mathbb{R}}P(t)\leq \sup_{t\in\mathbb{R}}P(t)= p_{1},\\ &&\sup_{t\in\mathbb{R}, x \in[m, M]}\frac{F^{S}[-Q(t)P(t)x +f(t, x) ]}{Q^{*}(t)}\leq(1-p_{1})M,\\ &&\inf_{t\in\mathbb{R}, x \in[m, M]}\frac{F^{i}[-Q(t)P(t)x +f(t, x) ]}{Q^{*}(t)}\geq (1-p_{0})m. \end{array}\displaystyle \right . $$

Theorem 2.2

Suppose \((A_{1})\) and \((A_{3})\) hold. If \(\tau_{1}(t)\not\equiv\tau _{2}(t)\) for all \(t\in\mathbb{R}\), and the following condition holds:

\((\bar{A}_{2})\) :

There exist positive constants \(p_{0}\), \(p_{1}\), m, and M such that

$$\left \{ \textstyle\begin{array}{rcl} &&- p_{1}=\inf_{t\in\mathbb{R}}P(t)\leq \sup_{t\in\mathbb{R}}P(t)=- p_{0}\leq0,\\ &&\sup_{t\in\mathbb{R}, x,y\in[m, M]}\frac{F^{S}[-Q(t)P(t)x +f(t, y) ]}{Q^{*}(t)}\leq M+ p_{0}m,\\ &&\inf_{t\in\mathbb{R}, x,y\in[m, M]}\frac{F^{i}[-Q(t)P(t)x +f(t, y) ]}{Q^{*}(t)}\geq m+p_{1}M. \end{array}\displaystyle \right . $$

Then equation (1.4) has at least one positive almost periodic solution \(x^{*}\) such that \(x^{*}(t)\in[m, M]\) for all \(t \in\mathbb{R}\).

Remark 2.2

When \(\tau_{1}(t) \equiv\tau_{2}(t)\) for all \(t\in\mathbb{R}\), the statement of Theorem 2.2 holds if we substitute \((\bar{A}_{2})\) into the following condition:

\((\bar{A}^{*}_{2})\) :

There exist positive constants \(p_{0}\), \(p_{1}\), m, and M such that

$$\left \{ \textstyle\begin{array}{rcl} &&- p_{1}=\inf_{t\in\mathbb{R}}P(t)\leq \sup_{t\in\mathbb{R}}P(t)=- p_{0}\leq0,\\ &&\sup_{t\in\mathbb{R}, x \in[m, M]}\frac{F^{S}[-Q(t)P(t)x +f(t, x) ]}{Q^{*}(t)}\leq M+ p_{0}m,\\ &&\inf_{t\in\mathbb{R}, x \in[m, M]}\frac{F^{i}[-Q(t)P(t)x +f(t, x) ]}{Q^{*}(t)}\geq m+p_{1}M. \end{array}\displaystyle \right . $$

3 An example

Figure 1
figure 1

Numerical solutions \(x(t) \) of systems (3.1) for initial values \(x(0)=11,23,32\), respectively

Example 3.1

Consider the following first-order neutral differential equations with time-varying delays and coefficients:

$$\begin{aligned}[b] &\biggl[ x (t)-\frac{ \sin^{2} t }{100}x\bigl(t-\bigl(1+\sin^{2}t\bigr) \bigr)\biggr]' \\ &\quad = -(1 +2 \sin400 t) x (t)+ 20 +e^{\cos\sqrt{2}t}+\frac{1}{100}\cos x \bigl(t-\bigl(1+\sin^{2}\sqrt{3}t\bigr)\bigr), \end{aligned} $$
(3.1)

where

$$ \left \{ \textstyle\begin{array}{l} P (t)= \frac{ \sin^{2} t}{100},\qquad p_{0}=0,\qquad p_{1}=\frac{1}{100},\\ \tau_{1}(t)=1+\sin^{2}t, \qquad\tau_{2}(t)=1+\sin^{2}\sqrt{3}t,\\ Q(t)=1 +2 \sin400 t,\qquad Q^{*}(t) = 1 ,\qquad M[Q] =1,\\ F^{S}= e^{ \frac{1}{100}},\qquad F^{i}= e^{-\frac{1}{100}}, \\ f(t, x)= 20 +e^{\cos \sqrt{2}t}+\frac{1}{100}\cos x ,\qquad L^{f}=\frac{1}{100},\qquad L= \frac{1}{25}. \end{array}\displaystyle \right . $$
(3.2)

Taking \(m=10\), \(M=40\), we can easily show that (3.2) implies that (3.1) satisfies \((A_{1})\), \((A_{2})\), and \((A_{3})\). Hence, equation (3.1) has exactly one positive almost periodic solution \(x^{*}(t)\).

Remark 3.1

In equation (3.1), \(\tau_{1}(t)=1+\sin^{2}t\) and \(\tau _{2}(t)=1+\sin ^{2}\sqrt{3}t\) are two different time-varying functions, and \(Q(t)=1 +2 \sin400 t\) fails to satisfy (1.3). One can see that all the results obtained in [112, 15] are invalid for (3.1). Note that the space of almost periodic functions contains the space of periodic functions. If we reduce all time-varying delays and coefficients of (1.4) to ω-periodic functions, the derived results are still novel.

4 Conclusion

It is well known that the existence of positive almost periodic solutions plays an important role in characterizing the behavior of nonlinear differential equations. Thus it has been extensively investigated by numerous scholars in recent years. In this article, we have investigated a class of first-order neutral differential equations with time-varying delays and coefficients. With the aid of the contraction mapping fixed point theorem and differential inequality theory, some sufficient conditions for the existence of positive almost periodic solutions of the system were established. In order to demonstrate the usefulness of the presented results, an illustrative example was given. The established results were compared with those of recent methods existing in the literature. We expect to extend this work to more types of neutral differential equations with almost periodic delays and coefficients.