1 Introduction

In China and around the world, one of the public health problems that has been recognized in recent years is smoking addiction, which has developed into an epidemic causing many deaths. Taking China for example, the data from the Global Tobacco Epidemic Report published on 26 July 2019 by the World Health Organization shows that smoking-related diseases kill one million people in China every year and 100,000 non-smokers die from exposure to second-hand smoke [1]. From the global perspective, according to the survey, smoking kills about six million persons each year, and ten million persons will pass away every year because of smoking-related diseases by 2030 [2,3,4]. Consequently, it is very essential to help people quit smoking and reduce tobacco use and related deaths.

In order to reduce the future effects of smoking on the health of people, the World Health Organization has suggested a set of control policy measures since 2008, known as Framework Convention on Tobacco Control (FCTC). As stated in the Global Tobacco Epidemic Report (2019), about five billion people all over the world have been covered by at least one comprehensive tobacco control measure, although there are still 59 countries in which none of the tobacco control measures has reached the highest level of implementation [1]. On the other hand, the mathematicians have been also in effort to inform people about control of smoking by using mathematical models considering that smoking can spread through social contact since the pioneering work of Castullo-Garsow et al. in [5]. In [5], Castullo-Garsow et al. formulated a giving up smoking model including three population classes: the potential smokers (P), the smokers (S), and the quit smokers (Q). Then Sharomi and Gumel [6] developed a model taking into account the temporarily quit smokers (\(Q_{t}\)) and the permanently quit smokers (\(Q_{p}\)) in the model formulated by Castullo-Garsow et al. [5]. Afterwards, some scholars [4, 7,8,9,10,11,12,13] proposed different forms of giving up smoking models including the occasional smoker class. Rahman et al. [14] proposed a giving up smoking model with the continuous age-structure in the chain smokers and studied local and global stability of the model, and the optimal control strategy on potential smokers is also presented. Fei and Liu [15] presented a giving up smoking model with birth and death rates on complex heterogeneous networks. They examined the stability and attractivity of the proposed model. For the analytical study of stochastic giving up smoking models or some other giving up smoking models, we can refer to [16,17,18,19,20].

As stated in [12], smoking contributes to a number of human diseases such as lung cancer, heart disease, alimentary canal effect, and so on. Thus, it is reasonable to consider the smokers associated with some illness compartment in giving up smoking model. Based on this point, the following smoking model has been proposed by Din et al. [21]:

$$ \textstyle\begin{cases} \frac{dP(t)}{dt}=\alpha-\beta\sqrt{P(t)S(t)}-\gamma P(t), \\ \frac{dS(t)}{dt}=\beta\sqrt{P(t)S(t)}-(\gamma+\delta+\varepsilon )S(t)+\zeta X(t), \\ \frac{dX(t)}{dt}=\delta(1-\eta)S(t)-(\gamma+\zeta)X(t), \\ \frac{dY(t)}{dt}=\delta\eta S(t)-\gamma Y(t), \\ \frac{dZ(t)}{dt}=\varepsilon S(t)-(\gamma+\vartheta)Z(t), \end{cases} $$
(1)

where \(P(t)\), \(S(t)\), \(X(t)\), \(Y(t)\), and \(Z(t)\) denote the numbers of the potential smokers, smokers, temporarily quit smokers, permanently quit smokers, and smokers associated with some illness at time t, respectively. α is the recruitment rate of the potential smoker; β is the transmission coefficient; γ is the natural death rate; \(\delta(1-\eta)\) is the temporarily quit rate of smoking; δη is the permanently quit rate of smoking; ε is the developing rate of the smokers associated with some illness; ζ is the relapse rate from the temporarily quit smokers to the smokers; ϑ is the death rate related to smoking illness. Din et al. [21] investigated stability of system (1).

In fact, there is usually a fixed duration of temporary immunity due to self-control, after which the temporarily quit smokers return to the class of smokers. That is, the temporarily quit smokers begin to quit smoking at \(t-\tau\) and they start smoking again at t. On the other hand, it is worthy to notice that delay differential equations exhibit much more complicated dynamics than ordinary differential equations since a time delay could cause the population to fluctuate [22,23,24]. Yuan et al. demonstrated that time delay can affect stability of a dynamical system and cause nonlinear phenomena such as Hopf bifurcation and periodic solutions [25, 26]. For some other works about dynamical systems, one can refer to [27,28,29,30]. Therefore, it is very crucial to examine the effect of the time delay τ on system (1). To this end, we incorporate the time delay due to the immunity period, after which the temporarily quit smokers return to the class of smokers, and investigate the following delayed system:

$$ \textstyle\begin{cases} \frac{dP(t)}{dt}=\alpha-\beta\sqrt{P(t)S(t)}-\gamma P(t), \\ \frac{dS(t)}{dt}=\beta\sqrt{P(t)S(t)}-(\gamma+\delta+\varepsilon )S(t)+\zeta X(t-\tau), \\ \frac{dX(t)}{dt}=\delta(1-\eta)S(t)-\gamma X(t)-\zeta X(t-\tau), \\ \frac{dY(t)}{dt}=\delta\eta S(t)-\gamma Y(t), \\ \frac{dZ(t)}{dt}=\varepsilon S(t)-(\gamma+\vartheta)Z(t), \end{cases} $$
(2)

where τ is the length of immunity period after which the temporarily quit smokers return to the class of smokers. The flow diagram of system (2) is shown as in Fig. 1.

Figure 1
figure 1

The flow diagram of system (2)

The outline of this article is arranged as follows. In Sect. 2, local stability and existence of Hopf bifurcation are discussed in detail. In Sect. 3, the direction of Hopf bifurcation and the stability of bifurcating periodic solutions are determined. In order to validate the theoretical analysis and the effect of some crucial parameters on behaviors of the model, some numerical simulations are carried out in Sect. 4. Finally, conclusions are offered in Sect. 5.

2 Local stability and existence of Hopf bifurcation

In view of [21], we can conclude that system (2) has a unique positive equilibrium \(E^{*}(P^{*}, S^{*}, X^{*}, Y^{*}, Z^{*})\), where

$$ \begin{gathered} P^{*}=\frac{\alpha(\gamma^{2}+\gamma(\delta+\zeta+\varepsilon )+\zeta(\delta\eta+\varepsilon))}{\beta^{2}(\gamma+\zeta)+\gamma (\gamma^{2}+\gamma(\delta+\zeta+\varepsilon)+\zeta(\delta\eta +\varepsilon))}, \\ S^{*}=\frac{\alpha\beta^{2}(\gamma+\zeta)^{2}}{(\gamma^{2}+\gamma (\delta+\zeta+\varepsilon)+\zeta(\delta\eta+\varepsilon))(\beta ^{2}(\gamma+\zeta)+\gamma(\gamma^{2}+\gamma(\delta+\zeta+\varepsilon )+\zeta(\delta\eta+\varepsilon)))}, \\ X^{*}=\frac{\alpha\beta^{2}\delta(1-\eta)(\gamma+\zeta)}{(\gamma ^{2}+\gamma(\delta+\zeta+\varepsilon)+\zeta(\delta\eta+\varepsilon ))(\beta^{2}(\gamma+\zeta)+\gamma(\gamma^{2}+\gamma(\delta+\zeta +\varepsilon)+\zeta(\delta\eta+\varepsilon)))}, \\ Y^{*}=\frac{\alpha\beta^{2}\delta\eta(\gamma+\zeta)^{2}}{\gamma (\gamma^{2}+\gamma(\delta+\zeta+\varepsilon)+\zeta(\delta\eta +\varepsilon))(\beta^{2}(\gamma+\zeta)+\gamma(\gamma^{2}+\gamma (\delta+\zeta+\varepsilon)+\zeta(\delta\eta+\varepsilon )))}, \\ Z^{*}=\frac{\alpha\beta^{2}\varepsilon(\gamma+\zeta)^{2}}{(\gamma +\vartheta)(\gamma^{2}+\gamma(\delta+\zeta+\varepsilon)+\zeta (\delta\eta+\varepsilon))(\beta^{2}(\gamma+\zeta)+\gamma(\gamma ^{2}+\gamma(\delta+\zeta+\varepsilon)+\zeta(\delta\eta+\varepsilon )))}.\end{gathered} $$

The linear system of system (2) at \(E^{*}\) is

$$ \textstyle\begin{cases} \frac{dP(t)}{dt}=g_{11}P(t)+g_{12}S(t), \\ \frac{dS(t)}{dt}=g_{21}P(t)+g_{22}S(t)+h_{23}X(t-\tau), \\ \frac{dX(t)}{dt}=g_{32}S(t)+g_{33}X(t)+h_{33}X(t-\tau), \\ \frac{dY(t)}{dt}=g_{42}S(t)+g_{44}Y(t), \\ \frac{dZ(t)}{dt}=g_{52}S(t)+g_{55}Z(t), \end{cases} $$
(3)

with

$$\begin{aligned}& g_{11}=-\frac{\beta\sqrt{S^{*}}}{2\sqrt{P^{*}}}-\gamma,\qquad g_{12}=- \frac{\beta\sqrt{P^{*}}}{2\sqrt{S^{*}}}, \\& g_{21}=\frac{\beta\sqrt{S^{*}}}{2\sqrt{P^{*}}},\qquad g_{22}=\frac{\beta \sqrt{P^{*}}}{2\sqrt{S^{*}}}-( \gamma+\delta+\varepsilon),\qquad h_{23}=\zeta, \\& g_{32}=\delta(1-\eta),\qquad g_{33}=-\gamma,\qquad h_{33}=- \zeta, \\& g_{42}=\delta\eta, g_{44}=-\gamma,\qquad g_{52}= \varepsilon,\qquad g_{55}=-(\gamma+\vartheta). \end{aligned}$$

The characteristic equation of system (3) is given by

$$ \text{det} \left [ \textstyle\begin{array}{c@{\quad}c@{\quad}c@{\quad}c@{\quad}c} \lambda-g_{11} & -g_{12} & {0} & {0} & {0} \\ -g_{21} & \lambda-g_{22} & -h_{23}e^{-\lambda\tau} & {0} & {0} \\ {0} & -g_{32} & \lambda-g_{33}-h_{33}e^{-\lambda\tau} & {0} & {0} \\ {0} & -g_{42} & {0} & \lambda-g_{44} & {0} \\ {0} & -g_{52} & {0} & {0} & \lambda-g_{55} \end{array}\displaystyle \right ]=0, $$
(4)

which leads to

$$ \lambda^{5}+G_{4}\lambda^{4}+G_{3} \lambda^{3}+G_{2}\lambda^{2}+G_{1} \lambda+G_{0}+\bigl(H_{4}\lambda^{4}+H_{3} \lambda^{3}+H_{2}\lambda^{2}+H_{1} \lambda+H_{0}\bigr)e^{-\lambda\tau}=0, $$
(5)

where

$$\begin{aligned}& G_{0}=g_{33}g_{44}g_{55}(g_{12}g_{21}-g_{11}g_{22}), \\& \begin{aligned}G_{1}={}&(g_{33}g_{44}+g_{33}g_{55}+g_{44}g_{55}) (g_{11}g_{22}-g_{12}g_{21}) \\ &+g_{33}g_{44}g_{55}(g_{11}+g_{22}),\end{aligned} \\& \begin{aligned}G_{2}={}&(g_{33}+g_{44}+g_{55}) (g_{12}g_{21}-g_{11}g_{22}) \\ &-(g_{11}+g_{22}) (g_{33}g_{44}+g_{33}g_{55}+g_{44}g_{55}), \end{aligned} \\& \begin{aligned}G_{3}={}&(g_{11}+g_{22}) (g_{33}+g_{44}+g_{55})+g_{33}g_{44}+g_{33}g_{55} \\ &+g_{44}g_{55}-g_{12}g_{21},\end{aligned} \\& G_{4}=-(g_{11}+g_{22}+g_{33}+g_{44}+g_{55}), \\& H_{0}=g_{44}g_{55}(g_{11}g_{32}h_{23}-g_{11}g_{22}h_{33}+g_{12}g_{21}h_{33}), \\& \begin{aligned}H_{1}={}&g_{55}h_{33}(g_{11}g_{22}+g_{11}g_{44}+g_{22}g_{44})+g_{11}g_{22}g_{44}h_{33} \\ &-g_{32}h_{23}(g_{11}g_{44}+g_{11}g_{55}+g_{44}g_{55})-g_{12}g_{21}h_{33}(g_{44}+g_{55}), \end{aligned} \\& \begin{aligned}H_{2}={}&g_{32}h_{23}(g_{11}+g_{44}+g_{55})-g_{55}h_{33}(g_{11}+g_{22}+g_{44}) \\ &+g_{12}g_{21}h_{33}-h_{33}(g_{11}g_{22}+g_{11}g_{44}+g_{22}g_{44}), \end{aligned} \\& H_{3}=h_{33}(g_{11}+g_{22}+g_{44}+g_{55})-g_{32}h_{23},\qquad G_{44}=-h_{33}. \end{aligned}$$

When \(\tau=0\), Eq. (5) becomes

$$ \lambda^{5}+G_{04}\lambda^{4}+G_{03} \lambda^{3}+G_{02}\lambda^{2}+G_{01} \lambda+G_{00}=0, $$
(6)

with

$$\begin{aligned}& G_{00}=G_{0}+H_{0},\qquad G_{01}=G_{1}+H_{1},\qquad G_{02}=G_{2}+H_{2}, \\& G_{03}=G_{3}+H_{3},\qquad G_{04}=G_{4}+H_{0}. \end{aligned}$$

Based on the discussion in [21], it can be concluded that all the roots of Eq. (6) have negative real parts. Thus, according to the Hurwitz criterion, we have the following result.

Lemma 1

([21])

The unique positive equilibrium \(E^{*}(P^{*}, S^{*}, X^{*}, Y^{*}, Z^{*})\)of system (2) is locally asymptotically stable when \(\tau=0\).

For \(\tau>0\), let \(\lambda=i\omega\) (\(\omega>0\)) be a root of Eq. (5). Then

$$ \textstyle\begin{cases} (H_{1}\omega-H_{3}\omega^{3})\sin\tau\omega+(H_{4}\omega^{4}-H_{2}\omega ^{2}+H_{0})\cos\tau\omega=G_{2}\omega^{2}-G_{4}\omega^{4}-G_{0}, \\ (H_{1}\omega-H_{3}\omega^{3})\cos\tau\omega-(H_{4}\omega^{4}-H_{2}\omega ^{2}+H_{0})\sin\tau\omega=G_{3}\omega^{3}-\omega^{5}-G_{1}\omega. \end{cases} $$
(7)

It follows from Eq. (8) that

$$ \omega^{10}+J_{4}\omega^{8}+J_{3} \omega^{6}+J_{2}\omega^{4}+J_{1} \omega^{2}+J_{0}=0, $$
(8)

with

$$\begin{aligned}& J_{0}=G_{0}^{2}-H_{0}^{2}, \\& J_{1}=2G_{0}G_{2}-H_{1}^{2}+2H_{0}H_{2}, \\& J_{2}=G_{2}^{2}-2G_{0}G_{4}-2G_{1}G_{3}+2H_{1}H_{3}-H_{2}^{2}-2H_{0}H_{4}, \\& J_{3}=2G_{1}-2G_{2}G_{4}-H_{3}^{2}+2H_{2}H_{4}, \\& J_{4}=G_{4}^{2}-H_{4}^{2}. \end{aligned}$$

Let \(\omega^{2}=\nu\), Eq. (8) becomes

$$ \nu^{5}+J_{4}\nu^{4}+J_{3} \nu^{3}+J_{2}\nu^{2}+J_{1} \nu+J_{0}=0. $$
(9)

In order to establish the main results of this paper, we make the following necessary assumption:

\((S_{1})\):

Eq. (9) has at least one positive root.

\((S_{2})\):

\(f^{\prime}(\nu_{0})\neq0\), where \(f(\nu)=\nu^{5}+J_{4}\nu ^{4}+J_{3}\nu^{3}+J_{2}\nu^{2}+J_{1}\nu+J_{0}\).

It follows from \((S_{1})\) that Eq. (9) has at least one positive root, and without loss of generality we assume that Eq. (9) has five positive roots denoted by \(\nu_{1}\), \(\nu_{2}\), \(\nu_{3}\), \(\nu_{4}\), and \(\nu_{5}\). Thus, \(\omega_{l}=\sqrt{\nu_{l}}\), (\(l=1, 2, 3, 4, 5\)) is the roots of Eq. (8). Based on Eq. (7), one can obtain

$$ \tau_{l}^{j}=\frac{1}{\omega_{l}}\times \arccos\biggl\{ \frac{H_{3}\omega_{l}^{8}-(G_{3}H_{3}+H_{1})\omega _{l}^{6}+(G_{1}H_{3}+G_{3}H_{1})\omega_{l}^{4}-G_{1}H_{1}\omega_{l}^{2}}{(H_{1}\omega _{l}-H_{3}\omega_{l}^{3})^{2}+(H_{4}\omega_{l}^{4}-H_{2}\omega_{l}^{2}+H_{0})^{2}}+2n\pi \biggr\} $$
(10)

with \(l=1, 2, 3, 4, 5\); \(n=0, 1, 2, \dots\). Denote

$$\tau_{0}=\tau_{{j}_{0}}^{0}=\min\bigl\{ \tau_{l}^{0}|l=1, 2, 3, 4, 5\bigr\} , \qquad\omega_{0}= \omega|_{\tau=\tau_{0}}. $$

Lemma 2

Let \(\lambda(\tau)=\tilde{\alpha}(\tau)+i\tilde{\beta}(\tau)\)be the root of Eq. (5) at \(\tau=\tau_{0}\)satisfying \(\tilde{\alpha}(\tau_{0})=0\), \(\tilde{\beta}(\tau_{0})=\omega_{0}\), then \(\operatorname{Re}[d\lambda/d\tau]_{\tau=\tau_{0}}\neq0\).

Proof

Differentiating Eq. (5) with respect to τ leads to

$$ \begin{aligned}[b]\biggl[\frac{d\lambda}{d\tau} \biggr]^{-1}={}&{-} \frac{5\lambda^{4}+4G_{4}\lambda^{3}+3G_{3}\lambda^{2}+2G_{2}\lambda +G_{1}}{\lambda(\lambda^{5}+G_{4}\lambda^{4}+G_{3}\lambda^{3}+G_{2}\lambda ^{2}+G_{1}\lambda+G_{0})} \\ &+\frac{4H_{4}\lambda^{3}+3H_{3}\lambda^{2}+2H_{2}\lambda+H_{1}}{\lambda (H_{4}\lambda^{4}+H_{3}\lambda^{3}+H_{2}\lambda^{2}+H_{1}\lambda+H_{0})}-\frac {\tau}{\lambda}.\end{aligned} $$
(11)

Then

$$ \operatorname{Re} \biggl[\frac{d\lambda}{d\tau} \biggr]^{-1}_{\tau=\tau_{0}}= \frac{f^{\prime}(\nu_{0})}{(H_{1}\omega_{0}-H_{3}\omega_{0}^{3})^{2}+(H_{4}\omega _{0}^{4}-H_{2}\omega_{0}^{2}+H_{0})^{2}}. $$
(12)

It follows from \((S_{2})\) that \(\operatorname{Re}[d\lambda/d\tau ]_{\tau=\tau_{0}}\neq0\). This ends the proof of Lemma 2. Based on the discussion above and Lemmas 1 and 2, one has the following result. □

Theorem 1

For system (2), if \((S_{1})\)\((S_{2})\)hold, then \(E^{*}(P^{*}, S^{*}, X^{*}, Y^{*}, Z^{*})\)is locally asymptotically stable when \(\tau\in [0, \tau_{0})\); system (2) undergoes a Hopf bifurcation at \(E^{*}(P^{*}, S^{*}, X^{*}, Y^{*}, Z^{*})\)when \(\tau=\tau_{0}\)and a family of periodic solutions bifurcate from \(E^{*}(P^{*}, S^{*}, X^{*}, Y^{*}, Z^{*})\). \(\tau_{0}\)is defined as in Eq. (10).

3 Direction and stability of Hopf bifurcation

In this section, we investigate the direction and stability of Hopf bifurcation. By Hassard et al. [31], we have the following theorem for system (2).

Theorem 2

The Hopf bifurcation exhibited by system (2) can be determined by the parameters \(\mu_{2}\), \(\beta_{2}\), and \(T_{2}\). (i) If \(\mu_{2}>0\) (\(\mu_{2}<0\)), then the Hopf bifurcation is supercritical (subcritical); (ii) if \(\beta_{2}<0\) (\(\beta_{2}>0\)), then the bifurcating periodic solutions are stable (unstable); (iii) if \(T_{2}>0\) (\(T_{2}<0\)), then the period of the bifurcating periodic solutions increases (decrease).

The parameters \(\mu_{2}\), \(\beta_{2}\), and \(T_{2}\) can be found using the following formulas:

$$ \begin{gathered} C_{1}(0)=\frac{i}{2\tau_{0}\omega_{0}} \biggl(v_{11}v_{20}-2 \vert v_{11} \vert ^{2}-\frac{ \vert v_{02} \vert ^{2}}{3} \biggr)+\frac{v_{21}}{2}, \\ \mu_{2} =-\frac{\operatorname{Re}\{C_{1}(0)\}}{\operatorname{Re}\{ \lambda^{\prime}(\tau_{0})\}}, \\ \beta_{2}=2{\operatorname{Re}\bigl\{ C_{1}(0)\bigr\} }, \\ T_{2}=-\frac{\operatorname{Im}\{C_{1}(0)\}+\mu_{2}\operatorname{Im}\{ \lambda^{\prime}(\tau_{0})\}}{\tau_{0}\omega_{0}}, \end{gathered} $$
(13)

in which the expressions of \(v_{20}\), \(v_{11}\), \(v_{02}\), and \(v_{21}\) can be found in the following.

Proof of Theorem 2

Introduce a new perturbation parameter \(\tau=\tau_{0}+\mu\) with \(\mu \in R\), then \(\mu=0\) is the Hopf bifurcation value of system (2). Let \(u_{1}(t)=P(t)-P^{*}\), \(u_{2}(t)=S(t)-S^{*}\), \(u_{3}(t)=X(t)-X^{*}\), \(u_{4}(t)=Y(t)-Y^{*}\), \(u_{5}(t)=Z(t)-Z^{*}\), and \(u_{i}(t)=u_{i}(\tau t)\), \(i=1,2,\ldots, 5\). Then system (2) can be written as a functional differential equation in \(C=C([-1,0],R^{5})\) as follows:

$$ \dot{u}(t)=L_{\mu}(u_{t})+F(\mu, u_{t}), $$
(14)

where \(L_{\mu}: C\rightarrow R^{5}\), \(F: R\times C\rightarrow R^{5}\), and

$$\begin{aligned}& L_{\mu}\phi=(\tau_{0}+\mu) \bigl(G_{\text{max}}\phi(0)+H_{\text{max}}\phi(-1) \bigr), \end{aligned}$$
(15)
$$\begin{aligned}& F(\mu,\phi)=(\tau_{0}+\mu) (F_{1}, F_{2}, 0, 0, 0)^{T}, \end{aligned}$$
(16)

with

$$G_{\text{max}}=\left ( \textstyle\begin{array}{c@{\quad}c@{\quad}c@{\quad}c@{\quad}c} g_{11} &g_{12} &{0} &{0} &{0}\\ g_{21} &g_{22} &{0} &{0} &{0}\\ {0} &g_{32} &g_{33} &{0} &{0}\\ {0} &g_{42} &{0} &g_{44} &{0}\\ {0} &g_{52} &{0} &{0} &g_{55} \end{array}\displaystyle \right ),\qquad H_{\text{max}}=\left ( \textstyle\begin{array}{c@{\quad}c@{\quad}c@{\quad}c@{\quad}c} {0} &{0} &{0} &{0} &{0}\\ {0} &{0} &h_{23} &{0} &{0}\\ {0} &{0} &h_{33} &{0} &{0}\\ {0} &{0} &{0} &{0} &{0}\\ {0} &{0} &{0} &{0} &{0} \end{array}\displaystyle \right ), $$

and

$$\begin{aligned}& \begin{aligned} F_{1}={}&g_{13}\phi_{1}^{2}(0)+g_{14} \phi_{1}(0)\phi_{2}(0)+g_{15}\phi_{2}^{2}(0)+g_{16} \phi_{1}^{3}(0)+g_{17}\phi_{1}^{2}(0) \phi_{2}(0) \\ &+g_{18}\phi_{1}(0)\phi_{2}^{2}(0)+g_{19} \phi_{2}^{3}(0)+\cdots,\end{aligned} \\& \begin{aligned}F_{2}={}&g_{23}\phi_{1}^{2}(0)+g_{24} \phi_{1}(0)\phi_{2}(0)+g_{25}\phi_{2}^{2}(0)+g_{26} \phi_{1}^{3}(0)+g_{27}\phi_{1}^{2}(0) \phi_{2}(0) \\ &+g_{28}\phi_{1}(0)\phi_{2}^{2}(0)+g_{29} \phi_{2}^{3}(0)+\cdots,\end{aligned} \end{aligned}$$

where

$$\begin{aligned}& g_{13}=\frac{\beta\sqrt{S^{*}}}{8P^{*}\sqrt{P^{*}}},\qquad g_{14}=-\frac {\beta}{2\sqrt{P^{*}S^{*}}},\qquad g_{15}=\frac{\beta\sqrt{P^{*}}}{8S^{*}\sqrt{S^{*}}},\qquad g_{16}=-\frac{\beta \sqrt{S^{*}}}{16(P^{*})^{2}\sqrt{P^{*}}}, \\& g_{17}=\frac{\beta}{16P^{*}\sqrt{P^{*}S^{*}}},\qquad g_{18}=\frac{\beta }{16S^{*}\sqrt{P^{*}S^{*}}},\qquad g_{19}=-\frac{\beta\sqrt{P^{*}}}{16(S^{*})^{2}\sqrt{S^{*}}}, \\& g_{23}=-\frac{\beta\sqrt{S^{*}}}{8P^{*}\sqrt{P^{*}}},\qquad g_{24}=\frac {\beta}{2\sqrt{P^{*}S^{*}}},\qquad g_{25}=-\frac{\beta\sqrt{P^{*}}}{8S^{*}\sqrt{S^{*}}},\qquad g_{26}=\frac{\beta \sqrt{S^{*}}}{16(P^{*})^{2}\sqrt{P^{*}}}, \\& g_{27}=-\frac{\beta}{16P^{*}\sqrt{P^{*}S^{*}}},\qquad g_{28}=-\frac{\beta }{16S^{*}\sqrt{P^{*}S^{*}}},\qquad g_{29}=\frac{\beta\sqrt{P^{*}}}{16(S^{*})^{2}\sqrt{S^{*}}}. \end{aligned}$$

By using the Riesz representation theorem, let \(\eta(\theta, \mu ):[-1,0]\rightarrow R^{5\times5}\) be a function of bounded variation.

For \(\phi\in C([-1,0], R^{5})\), let

$$ L_{\mu}\phi= \int_{-1}^{0}d\eta(\theta, \mu)\phi(\theta). $$
(17)

Moreover, we can choose

$$\eta(\theta, \mu)= \textstyle\begin{cases} (\tau_{0}+\mu)G_{\text{max}},& \theta=0,\\ 0, &\theta\in(-1,0),\\ (\tau_{0}+\mu)H_{\text{max}}, &\theta=-1. \end{cases} $$

Define

$$A(\mu)\phi= \textstyle\begin{cases} \frac{d\phi(\theta)}{d\theta},& -1\leq\theta< 0, \\ \int_{-1}^{0}d\eta(\theta,\mu)\phi(\theta),& \theta=0, \end{cases} $$

and

$$R(\mu)\phi= \textstyle\begin{cases} 0,& -1\leq\theta< 0, \\ F(\mu,\phi), &\theta=0. \end{cases} $$

Then system (14) can be written as follows:

$$ \dot{u}(t)=A(\mu)u_{t}+R(\mu)u_{t}. $$
(18)

For \(\varphi\in C^{1}([0,1],(R^{5})^{*})\), define the adjoint operator of \(A(0)\)

$$A^{*}(\varphi)= \textstyle\begin{cases} -\frac{d\varphi(s)}{ds},& 0< s\leq1, \\ \int_{-1}^{0}d{\eta}^{T}(s,0)\varphi(-s),& s=0, \end{cases} $$

and a bilinear product

$$ \bigl\langle \varphi(s),\phi(\theta)\bigr\rangle =\bar{\varphi}(0) \phi(0)- \int_{\theta=-1}^{0} \int_{\xi=0}^{\theta}\bar{\varphi}(\xi-\theta)\,d\eta(\theta) \phi(\xi)\,d\xi, $$
(19)

where \(\eta(\theta)=\eta(\theta, 0)\).

According to the analysis in Sect. 2, \(\pm i\tau_{0}\omega_{0}\) are eigenvalues of \(A(0)\), so they are also eigenvalues of \(A^{*}\). Then \(A(0)q(\theta)=i\tau _{0}\omega_{0}q(\theta)\) and \(A^{*}q^{*}(s)=-i\tau_{0}\omega_{0}q^{*}(s)\). Suppose that \(q(\theta)=(1,q_{2},q_{3},q_{4},q_{5})^{T}e^{i\tau_{0}\omega _{0}\theta}\) and \(q^{*}(s)=D(1,q_{2}^{*},q_{3}^{*},q_{4}^{*},q_{5}^{*})e^{i\tau_{0}\omega _{0}s}\) are the corresponding eigenvectors. By calculation we can obtain

$$\begin{gathered} q_{2}=\frac{g_{21}(i\omega_{0}-g_{33}-h_{33}e^{-i\tau_{0}\omega _{0}})}{(i\omega_{0}-g_{22})(i\omega_{0}-g_{33}-h_{33}e^{-i\tau_{0}\omega _{0}})-g_{32}h_{23}e^{-i\tau_{0}\omega_{0}}}, \\ q_{3}=\frac{g_{32}q_{2}}{i\omega_{0}-g_{33}-h_{33}e^{-i\tau_{0}\omega _{0}}},\qquad q_{4}=\frac{g_{42}q_{2}}{i\omega_{0}-g_{44}},\qquad q_{5}=\frac{g_{52}q_{2}}{i\omega_{0}-g_{55}}, \\ q_{2}^{*}=-\frac{i\omega_{0}+g_{11}}{g_{21}},\qquad q_{3}^{*}=\frac{h_{23}e^{i\tau _{0}\omega_{0}}(i\omega_{0}+g_{11})}{g_{21}(i\omega _{0}+g_{33}+h_{33}e^{i\tau_{0}\omega_{0}})},\qquad q_{4}^{*}=0,\qquad q_{5}^{*}=0.\end{gathered} $$
(20)

From \(\langle q^{*}(s),q(\theta)\rangle=1\), we have

$$\bar{D}=\Biggl[1+\sum_{i=1}^{5}\bar{q}_{i}^{*}q_{i}+ \tau_{0}e^{-i\tau_{0}\omega_{0}}q_{3}\bigl(h_{23} \bar{q}_{2}^{*}+h_{33}\bar{q}_{3}^{*}\bigr) \Biggr]^{-1}. $$

In the following, according to the algorithm given in [31] and the computation process as that in [24, 32,33,34], we can obtain

$$\begin{aligned}& v_{20}=2\tau_{0}\bar{D}\bigl[g_{13}+g_{14}q_{2}+g_{15}q_{2}^{2}+ \bar{q}_{2}^{*}\bigl(g_{23}+g_{24}q_{2}+g_{25}q_{2}^{2} \bigr)\bigr], \\& v_{11}=\tau_{0}\bar{D}\bigl[2g_{13}+g_{14}(q_{2}+ \bar{q}_{2})+2g_{15}q_{2}\bar{q}_{2}+ \bar{q}_{2}^{*}\bigl(2g_{23}+g_{24}(q_{2}+ \bar{q}_{2})+2g_{25}q_{2}\bar{q}_{2}\bigr) \bigr], \\& v_{02}=2\tau_{0}\bar{D}\bigl[g_{13}+g_{14} \bar{q}_{2}+g_{15}\bar{q}_{2}^{2}+ \bar{q}_{2}^{*}\bigl(g_{23}+g_{24} \bar{q}_{2}+g_{25}\bar{q}_{2}^{2}\bigr) \bigr], \\& \begin{aligned}v_{21}={}&2\tau_{0}\bar{D} \biggl[g_{13} \bigl(2W_{11}^{(0)}+W_{20}^{(1)}(0)\bigr) \\ &+g_{14} \biggl(W_{11}^{(1)}(0)q_{2}+ \frac{1}{2}W_{20}^{(1)}(0)\bar{q}_{2}+W_{11}^{(2)}(0)+ \frac{1}{2}W_{20}^{(2)}(0) \biggr) \\ &+g_{15}\bigl(2W_{11}^{(2)}(0)q_{2}+W_{20}^{(2)}(0) \bar{q}_{2}\bigr) \\ &+3g_{16}+g_{17}(\bar{q}_{2}+2q_{2})+g_{18} \bigl(q_{2}^{2}+2q_{2}\bar{q}_{2} \bigr)+3g_{19}q_{2}^{2}\bar{q}_{2} \\ &+\bar{q}_{2}^{*} \biggl(g_{23}\bigl(2W_{11}^{(0)}+W_{20}^{(1)}(0) \bigr) \\ &+g_{24} \biggl(W_{11}^{(1)}(0)q_{2}+ \frac{1}{2}W_{20}^{(1)}(0)\bar{q}_{2}+W_{11}^{(2)}(0)+ \frac{1}{2}W_{20}^{(2)}(0) \biggr) \\ &+g_{25}\bigl(2W_{11}^{(2)}(0)q_{2}+W_{20}^{(2)}(0) \bar{q}_{2}\bigr) \\ &+3g_{16}+g_{17}(\bar{q}_{2}+2q_{2})+g_{18} \bigl(q_{2}^{2}+2q_{2}\bar{q}_{2} \bigr)+3g_{19}q_{2}^{2}\bar{q}_{2} \biggr) \biggr]\end{aligned} \end{aligned}$$

with

$$\begin{aligned}& W_{20}(\theta)=\frac{iv_{20}q(0)}{\tau_{0}\omega_{0}}e^{i\tau _{0}\omega_{0}\theta}+ \frac{i\bar{v}_{02}\bar{q}(0)}{3\tau_{0}\omega_{0}}e^{-i\tau_{0}\omega _{0}\theta}+E_{1}e^{2i\tau_{0}\omega_{0}\theta}, \\& W_{11}(\theta)=-\frac{iv_{11}q(0)}{\tau_{0}\omega_{0}}e^{i\tau _{0}\omega_{0}\theta}+ \frac{i\bar{v}_{11}\bar{q}(0)}{\tau_{0}\omega_{0}}e^{-i\tau_{0}\omega _{0}\theta}+E_{2}, \end{aligned}$$

where

$$\begin{aligned}& E_{1}=2\left ( \textstyle\begin{array}{c@{\quad}c@{\quad}c@{\quad}c@{\quad}c} g_{11}^{*} &-g_{12} &{0} &{0} &{0}\\ -g_{21}e^{-2i\tau_{0}\omega_{0}} &g_{22}^{*} &-g_{23}e^{-2i\tau_{0}\omega _{0}} &{0} &{0}\\ {0} &-g_{32} &g_{33}^{*} &{0} &{0}\\ {0} &-g_{42} &{0} &g_{44}^{*} &{0}\\ {0} &-g_{52} &{0} &{0} &g_{55}^{*} \end{array}\displaystyle \right )^{-1}\times \left ( \textstyle\begin{array}{c} g_{13}+g_{14}q_{2}+g_{15}q_{2}^{2}\\ g_{23}+g_{24}q_{2}+g_{25}q_{2}^{2}\\ {0}\\ {0}\\ {0} \end{array}\displaystyle \right ), \\& E_{2}=\left ( \textstyle\begin{array}{c@{\quad}c@{\quad}c@{\quad}c@{\quad}c} g_{11} &g_{12} &{0} &{0} &{0}\\ g_{21} &g_{22} &h_{23} &{0} &{0}\\ {0} &g_{32} &g_{33}+h_{33} &{0} &{0}\\ {0} &g_{42} &{0} &g_{44} &{0}\\ {0} &g_{52} &{0} &{0} &g_{55} \end{array}\displaystyle \right )^{-1}\times \left ( \textstyle\begin{array}{c} 2g_{13}+g_{14}(q_{2}+\bar{q}_{2})+2g_{15}q_{2}\bar{q}_{2}\\ 2g_{23}+g_{24}(q_{2}+\bar{q}_{2})+2g_{25}q_{2}\bar{q}_{2}\\ {0}\\ {0}\\ {0} \end{array}\displaystyle \right ), \end{aligned}$$

and

$$\begin{aligned}& g_{11}^{*}=2i\omega_{0}-g_{11},\qquad g_{22}^{*}=2i\omega_{0}-g_{22}, \qquad g_{33}^{*}=2i\omega_{0}-g_{33}-h_{33}e^{-2i\tau_{0}\omega_{0}}, \\& g_{44}^{*}=2i\omega_{0}-g_{44},\qquad g_{55}^{*}=2i\omega_{0}-g_{55}. \end{aligned}$$

Thus, we can conclude that \(v_{20}\), \(v_{11}\), \(v_{02}\), and \(v_{21}\) in Eq. (13) can be obtained. The proof is completed. □

4 Numerical simulations

In this section, we verify the correctness of the obtained theoretical results by using numerical simulations. Choosing \(\alpha=0.8\), \(\beta=0.005\), \(\gamma=0.0000391\), \(\delta=0.00913\), \(\varepsilon=0.00458\), \(\zeta=0.02\), \(\eta=0.001\), \(\vartheta =0.0457\), we obtain the following specific case of system (2):

$$ \textstyle\begin{cases} \frac{dP(t)}{dt}=0.8-0.005\sqrt{P(t)S(t)}-0.0000391 P(t), \\ \frac{dS(t)}{dt}=0.005\sqrt{P(t)S(t)}-0.0137491 S(t)+0.02 X(t-\tau), \\ \frac{dX(t)}{dt}=0.009121 S(t)-0.0000391 X(t)-0.02 X(t-\tau), \\ \frac{dY(t)}{dt}=9.1300e-006 S(t)-0.0000391 Y(t), \\ \frac{dZ(t)}{dt}=0.00458 S(t)-0.0457391 Z(t). \end{cases} $$
(21)

Thus, the unique positive equilibrium is \(E^{*}(147.6003, 170.9480, 77.8076, 39.9170, 17.1176)\). By calculating, we can obtain that \(\nu _{0}=0.00023516\), \(\omega_{0}=0.01533623\), and \(\tau_{0}=118.1368\), \(f^{\prime}(\nu_{0})=0.00052229>0\). Obviously, the parameters in system (21) fulfill assumptions \(S_{1}\) and \(S_{2}\). From Theorem 1, when \(\tau\in(0, \tau_{0})\), \(E^{*}(147.6003, 170.9480, 77.8076, 39.9170,17.1176)\) is locally asymptotically stable, which can be illustrated in Figs. 23. While as τ is increased to pass \(\tau_{0}\), we can see the effect of time delay that destabilizes system (21) and a Hopf bifurcation occurs and a periodic oscillation appears around \(E^{*}(147.6003, 170.9480, 77.8076, 39.9170,17.1176)\). This can be shown as in Figs. 45.

Figure 2
figure 2

The equilibrium \(E^{*}\) of system (21) is asymptotically stable for \(\tau=114.685<\tau_{0}\)

Figure 3
figure 3

The phase plots of system (2) for \(\tau=114.685<\tau_{0}\)

Figure 4
figure 4

The equilibrium \(E^{*}\) of system (21) is unstable for \(\tau=122.905>\tau_{0}\)

Figure 5
figure 5

The phase plots of system (2) for \(\tau=122.905>\tau_{0}\)

Now, we are interested in studying the effect of some other parameters on the dynamics of system (21). (i) The number of smokers associated with some illness decreases as the value of β decreases, whereas the value of η increases, which can be demonstrated by Figs. 67. (ii) The number of smokers associated with some illness decreases when the value of ζ decreases, which can be depicted by Fig. 8. In addition, it is easy to check in Fig. 9 that system (21) shows the limit cycle behavior from the stable state due to increase in ζ.

Figure 6
figure 6

Time plot of Z for different β at \({\tau=114.685}\). The rest of the parameters are taken as given in the text

Figure 7
figure 7

Time plot of Z for different η at \({\tau=114.685}\). The rest of the parameters are taken as given in the text

Figure 8
figure 8

Time plot of Z for different ζ at \({\tau=114.685}\). The rest of the parameters are taken as given in the text

Figure 9
figure 9

Dynamic behavior of system (21): projection on SXZ for different ζ at \({\tau=122.905}\). The rest of the parameters are taken as given in the text

5 Conclusions

In the current paper, a delayed smoking model in which the population is divided into five classes is investigated by incorporating the time delay due to the immunity period, after which the temporarily quit smokers return to the class of smokers, into the proposed model by Din et al. [21]. It is found that the delayed smoking model is locally asymptotically stable when the time delay is suitably small under some certain conditions. In this case, it is easy to control smoking. However, once the value of the time delay passes through the critical value \(\tau_{0}\), a Hopf bifurcation occurs and smoking will be out of control. Particularly, properties such as direction and stability of the Hopf bifurcation are examined with the aid of the center manifold theorem and normal form theory.

It has been observed from our simulations that the number of smokers associated with some illness decreases as we decrease the value of β or increase the value of η. Therefore, it can be concluded that we should actively propagandize the harm of smoking, so that more and more people can stay away from tobacco and quit smoking timely and permanently. It has also been shown that the number of smokers associated with some illness decreases when we decrease the value of ζ, and the model changes its behavior from stable focus to limit cycle as we increase the value of ζ. Thus, it is strongly recommended that the smokers who have quitted smoking should have strong will and resolutely prevent relapse, which is also meaningful for controlling tobacco epidemic.

At last, it should be noted that similar to smoking addiction, the other public health problem is excessive drinking, which is not only harmful to personal health, but also leads to a range of negative social effects [35,36,37]. Therefore, we will try to complete some work about drink modeling in the near future.