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. □