In this study, we develop a model with pathogen population, \(N_{\rm B}\) denoted by B(t) and human population, \(N_{\rm H}\) . That is, the total population will be \(N(t)=N_{\rm H}(t)+N_{\rm P}(t)\). The human population is subdivided into Susceptible individualsS(t), Infected individualsI(t) and Recovered individualsR(t) compartments. The model assumes that human population will be recruited to susceptible compartment at the rate \(\Lambda\) and susceptible individuals are infected at the rate of \(\frac{\alpha B}{\kappa +B}\) where \(\alpha\) is the rate of Salmonella Typhi ingestion in drinks or foods and \(\frac{ B}{\kappa +B}\) is the probability of individuals in consuming foods or drinks contaminated with typhoid causing bacteria. All human populations experience natural death at the rate \(\mu\). In addition, the infected individuals die from typhoid at the rate \(\delta\). Infected individuals are treated at the rate \(\epsilon\). Infected individuals will excrete Salmonella Typhi bacteria to the environment at the rate \(\eta\) and Salmonella Typhi will die at the rate \(\nu\) Finally, \(0\le \omega \le 1)\) is a constant representing the treatment of infected individuals. This parameter changes the rate of infection as well as the rate shedding of Salmonella Typhi to the environment.
Assumptions of the model
The following are the assumptions of the model:

(i)
The population birth and death rate occur at different rates.

(ii)
Typhoid is transmitted through ingestion Salmonella bacteria in foods or drinks.

(iii)
Infectious individuals recover as a result of treatment.

(iv)
There is permanent immunity upon recovery.

(v)
All the newly born individuals will join only susceptible class.

(vi)
Infectious individuals excrete Salmonella Typhi bacterium to the environment.
Model flowchart and equations
From Fig. 1 we have the following equations of the model:
$$\begin{aligned} \begin{array}{rll} \frac{\mathrm{d}S}{\mathrm{d}t} &=\Lambda \left[ \frac{(1\omega )\alpha B}{\kappa +B}+\mu \right] S\\ \frac{\mathrm{d}I}{\mathrm{d}t} &=\frac{(1\omega )\alpha BS}{\kappa +B}(\mu +\epsilon +\delta )I \\ \frac{\mathrm{d}R}{\mathrm{d}t} &=\epsilon I\mu R \\ \frac{\mathrm{d}B}{\mathrm{d}t} &=(1\omega )\eta I  \nu B \\ \end{array} \end{aligned}$$
(1)
Analysis of the model
Since system (1) describes human population and pathogen population, all feasible solutions are uniformly bounded in a proper subset of \(\Gamma =\Gamma _{\rm H}\times \Gamma _{\rm B}\). The feasible region
$$\Gamma _{{\text{H}}} = \left\{ {(S,I,R) \in \mathbb{R}_{ + }^{3} ;S > 0,I,R \ge 0;N_{{\text{H}}} \le \frac{\Lambda }{\mu }} \right\}\; \cup \;\Gamma _{{\text{B}}} = \left\{ {{\text{B}} \in \mathbb{R}_{ + } ;{\text{B}} \ge 0;N_{{\text{B}}} \le \frac{{\Lambda (1  \omega )\eta }}{{\mu \nu }}} \right\}$$
is positively invariant.
Disease free equilibrium (DFE)
Let the DFE be denoted by \(E_0(S_0, I_0, R_0, B_0)\). To determine the disease free equilibrium point, we equate the righthand side of system (1) to zero and substitute \(S=S_0\), \(I=I_0=0\), \(R=R_0=0\) and \(B=B_0=0\). Solving the remaining equation we get \(S_0=\frac{\Lambda }{\mu }\). Thus
\(E_0(S_0, I_0, R_0, B_0)=E_0(\frac{\Lambda }{\mu },0,0,0)\)
The basic reproduction number
The basic reproduction number \(({\mathcal {R}}_0)\) is the expected number of secondary infections produced in a completely susceptible population by a typical infected individual during his/her infectious lifetime in the presence of protection. By using the next generation matrix approach [7], \({\mathcal {R}}_0\) is given by \(\rho (FV^{1})\) (the spectral radius of the matrix \(FV^{1}\)). The matrices \(F\) and \(V\) are given by
$$\begin{aligned} F=\left[ \begin{array}{cc} 0&\quad \frac{(1\omega )\Lambda \alpha }{\mu \kappa }\\ 0&\quad 0 \end{array} \right] \end{aligned}$$
and
$$\begin{aligned} V=\left[ \begin{array}{cc} (\mu +\epsilon +\delta ) &\quad 0 \\ (1\omega )\eta &\quad \nu \end{array} \right] . \end{aligned}$$
Therefore, it follows that
$$\begin{aligned} {\mathcal {R}}_0=\rho (FV^{1})=\frac{(1\omega )^2\eta \Lambda \alpha }{\nu \mu \kappa (\mu +\epsilon +\delta )} \end{aligned}$$
Existence of the endemic equilibrium (EE)
We denote our endemic equilibrium point as \(E^* (S^*, I^*, R^*, B^*)\).
Theorem 1
There exists a unique endemic equilibrium of system (1) when \({\mathcal {R}}_0 > 1\).
Proof
To prove this theorem, we equate the righthand side of system (1) to zero and replace S, I, R and B with \(S^*\), \(I^*\), \(R^*\), and \(B^*\), respectively, to get
$$\begin{aligned} \begin{array}{rll} 0&=&\Lambda \left[ \frac{(1\omega )\alpha B^*}{\kappa +B^*}+\mu \right] S^* \\ 0&=&\frac{(1\omega )\alpha B^*S^*}{\kappa +B^*}(\mu +\epsilon +\delta )I^*\\ 0&=&\epsilon I^*\mu R^*\\ 0&=&(1\omega )\eta I^*  \nu B^* \\ \end{array} \end{aligned}$$
(2)
From the last two equations of system (2) we have
$$\begin{aligned} R^*&= \frac{\epsilon I^*}{\mu }, \end{aligned}$$
(3)
$$\begin{aligned} B^*&= \frac{(1\omega )\eta I^*}{\nu }. \end{aligned}$$
(4)
Adding the first and the second equation of system (2) the solving for \(S^*\) we obtain
$$\begin{aligned} S^*=\frac{\Lambda (\mu +\epsilon +\delta )I^*}{\mu }. \end{aligned}$$
(5)
Now we substitute Eqs. (4) and (5) in the second equation of system (2) and then solve for \(I^*\) to obtain
$$\begin{aligned} I^{*}&=\frac{\kappa (\mu +\epsilon +\delta )\left( 1\frac{(1\omega )^2\Lambda \alpha \eta }{\nu \mu \kappa (\mu +\epsilon +\delta )}\right) }{\left( \frac{(1\omega )^2(\mu +\epsilon +\delta )\alpha \eta }{\nu \mu }+\frac{(1\omega )(\mu +\epsilon +\delta )\eta }{\nu }\right) }\nonumber \\&=\frac{\kappa \nu \mu \left( 1{\mathcal {R}}_0\right) }{(1\omega )^2\alpha \eta +(1\omega )\mu \eta }, \end{aligned}$$
(6)
and it follows that \(I^{*}>0\) given that \({\mathcal {R}}_0 > 1\). \(\square\)
Local stability of disease free equilibrium point
In this section, we analyze the local stability of the disease free equilibrium point.
Theorem 2
The diseasefree equilibrium (DFE) is locally asymptotically stable if and only if all eigenvalues of the Jacobian matrix of system (1) at the DFE have a negative real part.
Proof
The Jacobian of system at the DFE is given by
$$\begin{aligned} J(E_0)=\left[ \begin{array}{cccc} \mu &\quad 0&\quad 0&\quad \frac{(1\omega )\alpha \Lambda }{\kappa \mu }\\ 0&\quad (\mu +\epsilon +\delta )&\quad 0&\quad \frac{(1\omega )\alpha \Lambda }{\kappa \mu }\\ 0&\quad \epsilon &\quad \mu &\quad 0 \\ 0&\quad (1\omega )\eta &\quad 0&\quad  \nu \end{array} \right] \end{aligned}$$
(7)
From matrix ( 7) we obtain the characteristic equation
$$\begin{aligned} (\lambda +\mu )^2(\lambda +\nu )[\lambda +(\mu +\epsilon +\delta )]=0 \end{aligned}$$
(8)
Solving for \(\lambda\) in Eq. (8) we get
\(\lambda _1=\lambda _2=\mu\), \(\lambda _3=\nu\),\(\lambda _4=(\mu +\epsilon +\delta )\)
Clearly, all eigenvalues have a negative real part as required. \(\square\)
Global stability of disease free equilibrium point
In this section, we analyze the global stability of the disease free equilibrium point by following [8].
Theorem 3
The disease free equilibrium is globally asymptotically stable if \({\mathcal {R}}_0 \le 1\).
Proof
We begin the proof by constructing the Lyapunov function
$$\begin{aligned} V=(1\omega )\eta I+(\mu +\epsilon +\delta )B. \end{aligned}$$
(9)
Differentiating Eq. (9) with respect to t we get
$$\begin{aligned} \frac{\mathrm{d}V}{\mathrm{d}t}=(1\omega )\eta \frac{\mathrm{d}I}{\mathrm{d}t}+(\mu +\epsilon +\delta )\frac{\mathrm{d}B}{\mathrm{d}t}. \end{aligned}$$
(10)
Now we plug in values \(\frac{\mathrm{d}I}{\mathrm{d}t}\) and \(\frac{\mathrm{d}B}{\mathrm{d}t}\) into Eq. (10) using system (1) to get
$$\begin{aligned} \frac{\mathrm{d}V}{\mathrm{d}t}&=(1\omega )\eta \left( \frac{(1\omega )\alpha BS}{\kappa +B}(\mu +\epsilon +\delta )I\right) +(\mu +\epsilon +\delta )((1\omega )\eta I  \nu B)\nonumber \\&= \left( \frac{(1\omega )^2 \eta \alpha S}{(\kappa +B)(\mu +\epsilon +\delta ) \nu }1\right) (\mu +\epsilon +\delta ) \nu B. \end{aligned}$$
(11)
Substituting \(S=S_0=\frac{\Lambda }{\mu }\) in Eq. (11) we obtain
$$\begin{aligned} \frac{\mathrm{d}V}{\mathrm{d}t}&= \left( \frac{(1\omega )^2 \eta \Lambda \alpha }{\mu (\kappa +B)(\mu +\epsilon +\delta ) \nu }1\right) (\mu +\epsilon +\delta ) \nu B\\&\le \left( \frac{(1\omega )^2 \eta \Lambda \alpha }{\mu \kappa (\mu +\epsilon +\delta ) \nu }1\right) (\mu +\epsilon +\delta ) \nu B. \end{aligned}$$
And it follows that
$$\begin{aligned} \frac{\mathrm{d}V}{\mathrm{d}t}\le ({\mathcal {R}}_01)(\mu +\epsilon +\delta ) \nu B. \end{aligned}$$
(12)
Clearly \(\frac{\mathrm{d}V}{\mathrm{d}t}\le 0\) if \({\mathcal {R}}_0\le 1\). Moreover, \(\frac{\mathrm{d}V}{\mathrm{d}t}=0\Leftrightarrow {\mathcal {R}}_0=1\; \text {or} \;B=0\) which leads to \(I=R=0\). Thus, it follows that the invariant set of system (1) on the set \(\{(S, I, R, B) \in \Gamma :\; {\dot{V}}_{(1)} \le 0\}\) is the singleton the disease free equilibrium point \((E_0)\). Hence, from the LaSalle’s invariance principle [8], \(E_0\) is globally asymptotically stable on the set \(\Gamma\) if \({\mathcal {R}}_0\le 1\). \(\square\)
Local stability of endemic equilibrium point
In this section, we analyze the local stability of the endemic equilibrium point.
Theorem 4
The endemic equilibrium is locally asymptotically stable if \({\mathcal {R}}_0 > 1\).
Proof
The Jacobian of system at the EE is given by
$$\begin{aligned} J(E^*)=\left[ \begin{array}{cccc} \left[ \frac{(1\omega )\alpha B^*}{\kappa +B^*}+\mu \right] &\quad 0&\quad 0&\quad \frac{(1\omega )\alpha \kappa }{(\kappa +B^*)^2}S^*\\ \frac{(1\omega )\alpha B^*}{\kappa +B^*}&\quad (\mu +\epsilon +\delta ) &\quad 0&\quad \frac{(1\omega )\alpha \kappa }{(\kappa +B^*)^2}S^*\\ 0&\quad \epsilon &\quad \mu &\quad 0 \\ 0&\quad (1\omega )\eta &\quad 0&\quad  \nu \end{array} \right] \end{aligned}$$
(13)
The trace of the Jacobian matrix (13) is negative and the determinant is given by
$$\begin{aligned} Det(J(E^*)) =\frac{(1\omega )^2\eta \Lambda \alpha \kappa \mu }{(\kappa +B^*)^2} +\frac{(1\omega )^2\eta \alpha \kappa \mu }{(\kappa +B^*)^2}(\mu +\epsilon +\delta )I^*+\left( \frac{(1\omega )\alpha B^*}{\kappa +B^*}+\mu \right) (\mu +\epsilon +\delta )\nu , \end{aligned}$$
which is positive if
$$\begin{aligned} \frac{(1\omega )^2\eta \Lambda \alpha \kappa \mu }{(\kappa +B^*)^2} < \frac{(1\omega )^2\eta \alpha \kappa \mu }{(\kappa +B^*)^2}(\mu +\epsilon +\delta )I^*+\left( \frac{(1\omega )\alpha B^*}{\kappa +B^*}+\mu \right) (\mu +\epsilon +\delta )\nu . \end{aligned}$$
Since there exist a unique endemic equilibrium of system (1) provided that \({\mathcal {R}}_0 > 1\) (Ref Theorem 1), if the determinant is positive, by Routh–Hurwitz criteria, the endemic state \(E^*(S^*, I^*, R^*, B^*)\) is locally asymptotically stable. \(\square\)
Global stability of the endemic equilibrium point
We study the global asymptotic stability of the endemic equilibrium using LaSalle’s invariance principle [8].
Theorem 5
The Endemic Equilibrium Point \(E^*\) of system (1) is globally asymptotically stable if \(R_0>1\).
Proof
We apply [8] approach to prove global stability of \(E^*\). Consider the following Lyapunov function
$$\begin{aligned} V(S,I,R,B)=\left( SS^*\ln \frac{S}{S^*}\right) +M\left( II^*\ln \frac{I}{I^*}\right) +P\left( RR^*\ln \frac{R}{R^*}\right) +Q\left( BB^*\ln \frac{B}{B^*}\right) . \end{aligned}$$
The derivative of V is
$$\begin{aligned} \frac{\mathrm{d}V}{\mathrm{d}t}=\left( 1\frac{S^*}{S}\right) \frac{\mathrm{d}S}{\mathrm{d}t} +M\left( 1\frac{I^*}{I}\right) \frac{\mathrm{d}I}{d\mathrm{d}}+P\left( 1\frac{R^*}{R}\right) \frac{\mathrm{d}R}{\mathrm{d}t}+Q\left( 1\frac{B^*}{B}\right) \frac{\mathrm{d}B}{\mathrm{d}t}. \end{aligned}$$
(14)
Next, we replace \(\frac{\mathrm{d}S}{\mathrm{d}t}\) ,\(\frac{\mathrm{d}I}{\mathrm{d}t}\) ,\(\frac{\mathrm{d}R}{\mathrm{d}t}\) and \(\frac{\mathrm{d}B}{\mathrm{d}t}\) in Eq. (14) using system (1), to have
$$\begin{aligned} \frac{\mathrm{d}V}{\mathrm{d}t}=&\left( 1\frac{S^*}{S}\right) \left( \Lambda \left( \frac{(1\omega )\alpha B}{\kappa +B}+\mu \right) S\right) +M\left( 1\frac{I^*}{I}\right) \left( \frac{(1\omega )\alpha BS}{\kappa +B}(\mu +\epsilon +\delta )I\right) \nonumber \\&+P\left( 1\frac{R^*}{R}\right) (\epsilon I\mu R)+Q\left( 1\frac{B^*}{B}\right) ((1\omega )\eta I  \nu B). \end{aligned}$$
(15)
At endemic equilibrium, system (1) becomes
$$\begin{aligned} \Lambda&= \left[ \frac{(1\omega )\alpha B^*}{\kappa +B^*} +\mu \right] S^*\nonumber \\ (\mu +\epsilon +\delta )&= \frac{(1\omega )\alpha B^*S^*}{(\kappa +B^*)I^*}\nonumber \\ \mu&= \frac{\epsilon I^*}{ R^*} \nonumber \\ \nu&= \frac{(1\omega )\eta I^*}{ B^*} \end{aligned}$$
(16)
Substituting (16) into (15), we get
$$\begin{aligned} \frac{\mathrm{d}V}{\mathrm{d}t}&=\left( 1\frac{S^*}{S}\right) (\left[ \frac{(1\omega )\alpha B^*}{\kappa +B^*}+\mu \right] S^*\left[ \frac{(1\omega )\alpha B}{\kappa +B}+\mu \right] S)\\&\quad +M\left( 1\frac{I^*}{I}\right) (\frac{(1\omega )\alpha BS}{\kappa +B}\frac{(1\omega )\alpha B^*S^*I}{(\kappa +B^*)I^*})\\&\quad +P\left( 1\frac{R^*}{R}\right) (\epsilon I\frac{\epsilon I^*R}{ R^*} )+Q\left( 1\frac{B^*}{B}\right) ((1\omega )\eta I  \frac{(1\omega )\eta I^* B}{ B^*}), \end{aligned}$$
which upon simplification we arrive at
$$\begin{aligned} \frac{\mathrm{d}V}{\mathrm{d}t}&=\mu \frac{(SS^*)^2}{S}+\left( 1\frac{1}{w}\right) \left( \frac{(1\omega )\alpha B^*S^*}{\kappa +B^*}\right) \left( 1\frac{1}{w}\right) \left( \frac{(1\omega )\alpha wz B^*S^*}{\kappa +zB^*}\right) \nonumber \\&\quad +M\left( \frac{(1\omega )\alpha B^*S^* wz}{\kappa +zB^*}\frac{(1\omega )\alpha B^*S^*x}{(\kappa +B^*)}\frac{(1\omega )\alpha B^*S^*wz}{(\kappa +zB^*)x}+\frac{(1\omega )\alpha B^*S^*}{(\kappa +B^*)}\right) \nonumber \\&\quad +P\left( \epsilon I^*x\epsilon I^*y\frac{\epsilon I^*x}{y}+\epsilon I^* \right) \nonumber \\&\quad +Q\left( (1\omega )\eta I^*x  (1\omega )\eta I^*z\frac{(1\omega )\eta I^*x}{z}+ (1\omega )\eta I^*\right) , \end{aligned}$$
(17)
where \(w=\frac{S}{S^*}\), \(x=\frac{I}{I^*}\), \(y=\frac{R}{R^*}\) and \(z=\frac{B}{B^*}\). Furthermore, Eq. (17) can be written as
$$\begin{aligned} \frac{\mathrm{d}V}{\mathrm{d}t}=\mu \frac{(SS^*)^2}{S}+ f(w,x,y,z), \end{aligned}$$
where
$$\begin{aligned} \begin{array}{l} f(w,x,y,z)=\left( 1\frac{1}{w}\right) \left( \frac{(1\omega )\alpha B^*S^*}{\kappa +B^*}\right) \left( 1\frac{1}{w}\right) \left( \frac{(1\omega ) \alpha wz B^*S^*}{\kappa +zB^*}\right) \\ +M\left( \frac{(1\omega )\alpha B^*S^* wz}{\kappa +zB^*}\frac{(1\omega ) \alpha B^*S^*x}{(\kappa +B^*)}\frac{(1\omega )\alpha B^*S^*wz}{(\kappa +zB^*)x}+\frac{(1\omega )\alpha B^*S^*}{(\kappa +B^*)}\right) \\ +P\left( \epsilon I^*x\epsilon I^*y\frac{\epsilon I^*x}{y} +\epsilon I^* \right) \\ +Q\left( (1\omega )\eta I^*x  (1\omega )\eta I^*z\frac{(1\omega )\eta I^*x}{z}+ (1\omega )\eta I^*\right) . \end{array} \end{aligned}$$
(18)
To determine M, P and Q, we set the coefficients of wz, y and z of Eq. (18) equal to zero and obtain,
$$\begin{aligned}&M\frac{(1\omega )\alpha B^*S^*}{\kappa +zB^*}=0\\&P\epsilon I^*=0\\&Q(1\omega )\eta I^*=0 \end{aligned}$$
Let M=1, solving for P and Q, we have
$$\begin{aligned} P=\frac{(1\omega )\alpha B^*S^*}{(\kappa +zB^*)\epsilon I^*},\;\; Q=\frac{(1\omega )\alpha B^*S^*}{(\kappa +zB^*)\eta I^*} \end{aligned}$$
Substituting for M, P and Q in Eq. (18) and simplifying the result, we obtain
$$\begin{aligned} f(w,x,y,z)&=\frac{(1\omega )\alpha B^*S^*}{\kappa +B^*}\left( 2\frac{1}{w}x\right) +\frac{(1\omega )\alpha B^*S^*}{\kappa +zB^*}\left( x+zy\frac{x}{y}\frac{wz}{x}+1 \right) \\&\quad +\frac{(1\omega )^2\alpha B^*S^*}{\kappa +zB^*}\left( x  z\frac{x}{z}+ 1\right) \end{aligned}$$
Using arithmetic and geometric mean inequality, we have
\(\frac{1}{w}+x>2\), \(y+\frac{x}{y}+\frac{wz}{x}xz>1\) and \(z+\frac{x}{z}x> 1\).
Clearly \(f(w,x,y,z)\le 0\), hence \(\frac{\mathrm{d}G}{\mathrm{d}t}\le 0\) in \(\Omega\). The equality \(\frac{\mathrm{d}V}{\mathrm{d}t}=0\) if and only if \(w=x=y=z=1\) and \(S = S^*\), \(I = I^*\), \(R=R^*\), \(B=B^*\). Thus, system (1) has a unique endemic equilibrium point \(E^*\) which is globally asymptotically stable if \({\mathcal {R}}_0 > 1\) using LaSalle’s invariance principle in [8]. \(\square\)