1 Introduction

Finding abundant drinkable water is becoming a major issue in this century. In this respect, discovering cheap ways of purifying water is fundamental for addressing and helping to solve this problem. To achieve this goal, biodegradation can be used to remove or to transform pollutants found in the environment, dissolved in natural bodies of water, into harmless compounds. This can be accomplished by the use of chemical, physical or biological entities, such as microorganisms, fungi and green plants, through the enzymes that they produce. For instance, bacteria and fungi could help with the pollutant oxydation, because many species can produce oxygenases and peroxydases that degrade organic pollutants, [1]. Biodegradation can especially be employed in the treatment of wastewater and some mathematical models are known, [2, 3].

In the last few decades, highly toxic organic compounds have been synthesized and released into the environment for direct or indirect application over a long period of time. Fuels, polychlorinated biphenyls (PCBs), polycyclic aromatic hydrocarbons (PAHs), pesticides and dyes are some of these types of compound, [4, 810]. Microorganisms have the ability to interact, both chemically and physically, with these substances, leading either to changes in their structure or to the complete degradation of the target molecule.

Organic matters and organo-phosphorus pesticides have relatively high water solubility and low acute toxicity. The degradation process of organic matter can be performed either aerobically or anaerobically. In aerobic biodegradation oxygen is needed by degradable organisms in two metabolic stages, initially to attack the substrate and at the end of the respiratory chain. The biodegradation rates of many organic pollutants are known.

The dissolved oxygen concentration is a measure of the healthy state of an aquatic ecosystem. This concentration can be enhanced by re-aeration from the atmosphere, photosyntetic oxygen production from aquatic plants, denitrification and external oxygen inputs.

In general, oxygen is used by animals, bacteria, fungi and plants to digest nutrients by breaking down organic matter and sugars. Dissolved oxygen is essential for life in water bodies, as aquatic organisms use it to breathe: fish through their gills, while water plants need it for respiration. But too high or too low a level may harm aquatic life and degrade water quality.

Microbes as well as bacteria and fungi at the bottom of the water body decompose organic material using dissolved oxygen, thereby substantially contributing to the recycling of nutrients. But stratification, i.e. an excess of decaying organic material with no or infrequent turnover, depletes dissolved oxygen. In such case anaerobic decomposition takes over, with the release of hydrogen sulfide and methan, both obnoxious gases.

In this paper we consider an aquatic ecosystem consisting of fungi, nutrients, pollutants and dissolved oxygen. By formulating a suitable mathematical model for their interactions [57], considering explicitly the oxygen in the equations, we investigate the sustainability in time of this ecosystem.

The paper is organized as follows. In the next section we present the model. We then analyse it, establishing the boundedness of the solutions in Sect. 3, the equilibria in Sect. 4 and their stability in Sect. 5. A final discussion concludes the paper.

2 The mathematical model

We present a nonlinear mathematical model for removing an organic pollutant from a water body. We consider the following quantities. P denotes the concentration of an organic pollutant such as dye; it is assumed to be discharged into the water body at constant rate Q. F represents the biomass density of the fungi population being used for the removal of organic pollutant. We assume that it is supplied at constant rate q. N denotes the concentration of the nutrients. They can come from dead matter, but are also assumed to be supplied with a constant rate \(q_1\). The dissolved oxygen concentration is indicated by O. We assume that it enters into the water only via an external input, at rate \(q_2\).

Various interaction processes can be involved in the degradation of organic pollutants. We assume that they need dissolved oxygen. In particular, the fungi can be used, but they deteriorate themselves in this water purification process. On the other hand, they can reproduce at rate \(k_1\), but in so doing they consume both oxygen and nutrients. The degradation process performed by fungi requires both oxygen and the pollutant. In the absence of either one, it stops, as well as, obviously, when the fungi lack. Therefore to model this “reaction”, the product of P, O and F is needed. On the other hand, the fungi can process the degradation only up to a saturation level that depends on the maximum processing rate of the two different elements: if there is too much oxygen with respect to pollutants, a maximal rate is reached for which the process consumes the pollutant up and leaves the redundant oxygen free. The same occurs when there is too much pollutant, a maximal processing rate is reached for which some of the pollutant is left untouched while oxigen is exhausted. These observations impose that the correct modeling of the phenomenon relies on the use of a function that saturates with respect both variables. A possible choice for such a function is known in the literature as the Beddington–De Angelis response function. The model reads:

$$\begin{aligned} \frac{dP}{dt}= & {} Q- \alpha _0 P -f(P,O)F \\ \nonumber \frac{dF}{dt}= & {} q-\omega f(P,O)F -\alpha F +k_1 FNO \\ \nonumber \frac{dN}{dt}= & {} q_1-\alpha _1 N- k_1 FNO \\ \nonumber \frac{dO}{dt}= & {} q_2- \alpha _2 O- \lambda _1 k_1 FNO -\lambda f(P,O)F \end{aligned}$$
(1)

where all the parameters are assumed to be nonnegative and the following Beddington–De Angelis kinetics is used, in which \(k_{11}\ge 0, k_{12}\ge 0, k_{13}\ge 0\) represent suitable constants,

$$\begin{aligned} f(P,O)=\frac{k PO}{k_{11}+k_{12} P + k_{13}O}. \end{aligned}$$
(2)

As claimed, there is a constant inflow of all the substances. In addition, each equation describes a different phenomenon. The first equation in (1) states that pollutants can be washed out, or sink to the bottom and disappear from the ecosystem by getting buried; in both cases, they are “naturally” removed from the water at rate \(\alpha _0\). In the second equation we find the fungi dynamics. They are depleted by their processing of the pollutant. This once again is expressed by the Beddington–De Angelis kinetics f(PO). Further, they have a natural mortality \(\alpha \) and, as said above, reproduce at rate \(k_1\) by consuming oxygen and nutrients. The third equation models the nutrients. In this ecosystem, they are introduced only by an external source, are washed out at rate \(\alpha _1\) and consumed by fungi to reproduce. Finally the last equation is for dissolved oxygen. Again, it is introduced only by exhogenous means, and either washed out at rate \(\alpha _2\), or consumed by fungi for their reproduction or for the processing of pollutants. Note that in the above equations \(\omega \), \(\lambda \) and \(\lambda _1\) are proportionality constants defined such that \(0< \omega , \lambda , \lambda _1 <1\).

3 Boundedness

Since we work with an ecological model, the variables cannot grow unbounded. In order to have a well-posed model, we need to show that the system’s trajectories remain confined within a compact set. Consider the function \(\varphi (t):=P(t)+F(t)+N(t)+O(t)\). Summing up the equations in (1), we then have

$$\begin{aligned} \frac{d \varphi (t)}{dt}= & {} Q- \alpha _0 P -f(P,O)F+q-\omega f(P,O)F -\alpha F + k_1 FNO \\&+q_1-\alpha _1 N- k_1 FNO + q_2- \alpha _2 O-\lambda _1 k_1 FNO -\lambda f(P,O)F \\= & {} Q+q+q_1+q_2- \alpha _0 P -\alpha F -\alpha _1 N - \alpha _2 O + \\&-(1+\omega +\lambda ) f(P,O)F-\lambda _1 k_1 FNO . \end{aligned}$$

Setting \(K=\min (\alpha _0, \alpha , \alpha _1, \alpha _2)\) and \(H=Q+q+q_1+q_2\), and dropping the remaining terms, we have an upper bound

$$\begin{aligned} \frac{d \varphi (t)}{dt} \le H - K \varphi (t). \end{aligned}$$

Solving the corresponding differential equation, we have then the required estimate as

$$\begin{aligned} \varphi (t) \le \frac{H}{K}+ \left( \varphi (0)-\frac{H}{K} \right) e^{-K t} \le \max \left\{ \varphi (0), \frac{H}{K} \right\} \end{aligned}$$

from which every single variable must have the same upper bound as well.

4 Equilibrium analysis

The model (1) has in general only one steady state, possibly represented by coexistence of all the involved quantities, P, F, N and O. We will treat this equilibrium by showing below its stable existence via numerical simulations.

In the case that some of the external inputs are removed, the model admits fifteen more equilibria. They can explicitly be calculated. We list thirteen of them in the Table 1 below, specifying the conditions on the inputs under which each one of them sussists. When these are satisfied, the equilibria are unconditionally feasible, as can easily be seen by looking at their various component values.

In addition, there are two more equilibria, \(E_{11}\) and \(E_{14}\), with which we deal now. To show their existence we use always the same method, the method of the isoclines. We reduce the equilibrium system obtained from (1) to two equations depending just on two variables, by means of suitable substitutions. In our case we use the variables P and O to define the isoclines. We then prove that the two curves intersect at one or more points in the first quadrant, providing some conditions for this to happen, since the densities of P and O must be nonnegative. From the values of P and O at this intersection, say \(\widehat{P}\) and \(\widehat{O}\), we can establish the values of the remaining quantities, say \(\widehat{F}\) and \(\widehat{N}\). We now prove that the two isoclines intersect.

Table 1 The feasibility conditions for the equilibrium points

Proposition 1

Existence of \(E_{11}(P_{11},F_{11},0,O_{11})\) is always guaranteed.

Proof

Solving for F the first equation of (1) we find

$$\begin{aligned} F_{11}=\frac{Q-\alpha _0 P_{11}}{f(P_{11},O_{11})}. \end{aligned}$$
(3)

Its nonnegativity gives \(P_{11}\le Q \alpha _0^{-1}\), a condition that we will see is always satisfied. Substituting (3) into the second and the fourth equations of (1) we obtain the isoclines:

$$\begin{aligned}&q-\omega (Q-\alpha _0 P) -\alpha \frac{Q-\alpha _0 P}{f(P,O)}=0, \end{aligned}$$
(4)
$$\begin{aligned}&q_2- \alpha _2 O- \lambda (Q-\alpha _0 P)=0. \end{aligned}$$
(5)

Using (2), the isocline given by (4) becomes \(O(P)=\Psi (P) \varphi (P)^{-1}\), with

$$\begin{aligned} \Psi (P)= & {} \alpha Q k_{11} + \alpha (Qk_{12} -\alpha _0 k_{11})P -\alpha \alpha _0 k_{12}P^2,\\ \varphi (P)= & {} \alpha _0 \omega k P^2 + [(q-\omega Q) k +\alpha \alpha _0 k_{13}] P -\alpha Q k_{13}. \end{aligned}$$

We note the following features: \(\Psi (P)\) is nonnegative for \(P_-^0\le P \le P_+^0\), with \(P_-^0=-k_{11}k_{12}^{-1}\), \(P_+^0=Q \alpha _0^{-1}\), while \(\varphi (P)\) is nonnegative for \(P< P^-\) and \(P>P^+\),

$$\begin{aligned} P^{\pm }= & {} -\frac{[(q-\omega Q)k +\alpha \alpha _0 k_{13}]\pm \sqrt{\Delta }}{2 \alpha _0 \omega k},\\ \Delta= & {} (q-\omega Q)^2 k^2 +\alpha ^2 \alpha _0 ^2 k_{13}^2 + 2\alpha \alpha _0 k k_{13} ( \omega Q +q). \end{aligned}$$

It turns out easily that \(P^+<P_+^0\), so that the isocline (4), O(P) has a vertical asymptote at \(P^+\) in the first quadrant and is positive only for \(P^+<P \le P_+^0\), decreasing to zero at \(P_+^0\).

The isocline (5) is a straight line with the following properties:

  • its intersections with the coordinate axes in the OP phase plane are the points

    $$\begin{aligned} A=\left( 0, \frac{\lambda Q-q_2}{\lambda \alpha _0} \right) , \quad B=\left( \frac{q_2-\lambda Q}{\alpha _2}, 0\right) ; \end{aligned}$$

    clearly, only one of them can lie on its respective positive semiaxis; it is A if \(\lambda Q>q_2\) is satisfied, or B in the opposite case.

  • O is an increasing function of P because \(\frac{dO}{dP}=\lambda \frac{\alpha _0 }{ \alpha _2} >0\).

From (5) we find \(O_{11}=\left( q_2-\lambda Q+\lambda \alpha _0 P_{11}\right) \alpha _2 ^{-1}\); since we need nonnegative quantities, from \(O_{11}\ge 0\) we obtain a lower bound for \(P_{11}\), expressed by the maximum between zero and the height of A, depending respectively on \(q_2>\lambda Q\) or the opposite condition. This result is in agreement with the increasing behavior of the isocline.

In view of the fact that they are continuous functions, with derivatives of opposite signs, the two isoclines (4) and (5) will intersect in the positive orthant of the OP phase space at some point \(P_{11}\) and \(O_{11}\). This point always exists if \(\lambda Q<q_2\), while in the opposite case, we must ensure that the abscissa of the point B lies to the left of \(P_+^0\). But it is easy to verify that this condition amounts to requiring \(-q_2<0\), which is always true. Thus also in this case the intersection always exists, as claimed.

Proposition 2

The equilibrium \(E_{14}(0,F_{14},N_{14},O_{14})\) exists if

$$\begin{aligned} O_{14} N_{14} \le \frac{\alpha }{k_1}. \end{aligned}$$
(6)

Proof

Again solving for F the second equation of (1) we find

$$\begin{aligned} F_{14}=\frac{q}{\alpha - k_1 N_{14} O_{14}}; \end{aligned}$$
(7)

for its nonnegativity, the condition (6) is immediately obtained. Summing the third, second and fourth equilibrium equations of (1) we obtain the straight line

$$\begin{aligned} \alpha _2 O= \alpha _1 \lambda _1 N + q_2 - q_1 \lambda _1, \end{aligned}$$
(8)

which has a positive intersection with the N axis at \(N_0=(q_1 \lambda _1 - q_2) (\alpha _1 \lambda _1)^{-1}\) when \(q_1 \lambda _1 > q_2\), while in the opposite case it intersects the O axis at \(O_0=(q_2 - q_1 \lambda _1) \alpha _2^{-1}\).

Summing instead the second and third equilibrium equations of (1) and using (7) we find the function

$$\begin{aligned} O=\frac{\alpha (q_1-\alpha _1 N)}{k_1 N(q_1-\alpha _1 N+q)}. \end{aligned}$$
(9)

Note that this function is nonnegative when \(N\le q_1 \alpha _1^{-1}\) or \(N> (q+q_1) \alpha _1^{-1}\).

For the isocline given by (9), we find that \(O=0\) is a horizontal asymptote and \(N=0\) and \(N_1=(q+q_1) \alpha _1^{-1}\) are the vertical ones, more specifically \(N \rightarrow 0^+\) as \(O \rightarrow +\infty \), \(N \rightarrow +\infty \) as \(O \rightarrow 0^+\) and as \(O \rightarrow N_1^+\). The intersection with the N axis is at the abscissa \(N_0=q_1 \alpha _1^{-1}\). Finally,

$$\begin{aligned} \frac{dO}{dN}=\alpha \frac{-\alpha _1^2 k_1 N^2 +2 k_1\alpha _1 q_1 N - k_1 q_1 (q+q_1)}{k_1^2 N^2 (\alpha _1 N -q_1 -q)^2}. \end{aligned}$$

This derivative is easily seen to be always negative, as the roots \(N_{\pm }\) of its numerator are both complex,

$$\begin{aligned} N_{\pm }= \frac{1}{\alpha _1} (q_1\pm \sqrt{-q q_1}). \end{aligned}$$

Thus, the isocline is always decreasing.

In the first quadrant the two isoclines (9) and (8) intersect in exactly two points if \(N_0<q_1 \alpha _1^{-1}\); but this condition always holds, because it reduces to \(-q_2<0\).

Proposition 3

The equilibrium \(E_{15}(P^*, F^*, N^*, O^*)\) exists if

$$\begin{aligned} P^*<\frac{Q}{\alpha _0}. \end{aligned}$$
(10)

Proof

Solving for F the first equation of (1) we find

$$\begin{aligned} F^*=\frac{Q-\alpha _0 P^*}{f(P^*,O^*)}. \end{aligned}$$
(11)

Its nonnegativity gives \(P^*\le Q \alpha _0^{-1}\). Substituting (3) into the third equation of (1) and solving for N we have

$$\begin{aligned} N^*=\frac{q_1 f(P^*, O^*)}{\alpha _1 f(P^*, O^*)+k_1 O(Q-\alpha _0 P^*)}, \end{aligned}$$
(12)

which is always feasible if (10) holds. Substituting \(F^*\) and \(N^*\) into the second and fourth equations (1) we obtain the isoclines:

$$\begin{aligned} q_2- \alpha _2 O- \lambda (Q-\alpha _0 P)-\frac{\lambda _1 k_1 q_1 O (Q-\alpha _0 P)}{\alpha _1 f(P,O) +k_1 O(Q-\alpha _0 P)}=0 \end{aligned}$$
(13)

and

$$\begin{aligned} q-\omega (Q-\alpha _0 P) -\alpha \frac{Q-\alpha _0 P}{f(P,O)}+ \frac{k_1 q_1 O (Q-\alpha _0 P)}{\alpha _1 f(P,O) +k_1 O(Q-\alpha _0 P)} =0. \end{aligned}$$
(14)

Now, adding (13) with \(\lambda _1\) times (14) and rearranging the terms we obtain a new isocline that is easier to manage:

$$\begin{aligned}&\lambda _1\alpha \alpha _0 k_{12}P^2+(k \lambda \alpha _0 + \lambda _1 \omega k \alpha _0)P^2O-k \alpha _2 PO^2+(q_2k-k \lambda Q\nonumber \\&\quad +\,k \lambda _1 q - \lambda _1 \omega k Q + \lambda _1 \alpha \alpha _0 k_{13})PO\nonumber \\&+\, (\lambda _1 \alpha \alpha _0 k_{11}- \lambda _1 \alpha Q k_{12})P - \lambda _1 \alpha Q k_{13}O- \lambda _1 \alpha Qk_{11}=0. \end{aligned}$$
(15)

Since we need (10) to hold, it is enough to study the behaviour of the isoclines in the region of the first quadrant where \(0 \le P \le Q \alpha _0^{-1}\). For the isocline given by (13), we have

  • an intersection point with the O axes

    $$\begin{aligned} C=\left( \frac{q_2- \lambda _1 q_1- \lambda Q}{\alpha _2},0 \right) ; \end{aligned}$$
  • an intersection point with the upper bound of our region of interest

    $$\begin{aligned} D=\left( \frac{q_2}{\alpha _2}, \frac{Q}{\alpha _0} \right) ; \end{aligned}$$
  • further, for \(0<O<\infty \) and \(0<P \le Q \alpha _0 ^{-1}\), O increases as P increases because

    $$\begin{aligned} \frac{dO}{dP}=-\frac{A_1}{B_1} >0 \end{aligned}$$

where

Fig. 1
figure 1

Plot of equation (13)

$$\begin{aligned}&A_1=\lambda \alpha _0 +\frac{C_1}{C_2^2}, \quad B_1=- \left[ \alpha _2+ \frac{C_3}{C_2^2} \right] , \\&\quad C_1=\lambda _1 k_1 q_1 \alpha _0 O C_2 + \lambda _1 k_1 q_1 O (Q-\alpha _0 P) (\alpha _1 \frac{\partial f}{\partial O}- k_1 \alpha _0 O ),\\&\quad C_2= \alpha _1 f(P,O)+ k_1 O (Q-\alpha _0 P), \\&\quad C_3=\lambda _1 k_1 q_1 (Q-\alpha _0 P) C_2 -\lambda _1 k_1 q_1 O (Q-\alpha _0 P) (\alpha _1 \frac{\partial f}{\partial P} + k_1 (Q-\alpha _0 P)) . \end{aligned}$$

Note that \(C_1, C_2\) and \(C_3\) are positive quantities. In Fig. 1 we have the graphical representation of (13). The properties of the isocline given by (15) are the following ones:

  • its intersections with the coordinate axes in the OP phase plane are the points

    $$\begin{aligned} E=\left( -\frac{k_{11}}{k_{13}}, 0 \right) , \quad F=\left( 0, \frac{Q}{\alpha _0}\right) , \quad G=\left( 0, -\frac{k_{11}}{k_{12}}\right) . \end{aligned}$$

    Note that only F is of interest for us.

  • \(P=0\) is a horizontal asymptote

  • the isocline (15) has the vertical asymptote

    $$\begin{aligned} O_{\infty }=-\frac{\lambda _1 \alpha k_{12}}{k(\lambda +\lambda _1 \omega )} \end{aligned}$$
  • \(P=m_0 O+q_0\) is an oblique asymptote, where

    $$\begin{aligned} m_0= & {} \frac{\alpha _2}{\alpha _0 ( \lambda +\lambda _1 \omega )}\\ q_0= & {} \frac{ - \alpha k_{12} m_0 \alpha _0 \lambda _1 + \omega Q k \lambda _1- \alpha k_{13} \alpha _0 \lambda _1 + Q k \lambda -q k \lambda _1 -k q_2 }{ k \alpha _2 ( \lambda +\lambda _1 \omega )} \end{aligned}$$
  • the isocline (15) intersects the upper bound \(P=Q \alpha _0^{-1}\) at a second point

    $$\begin{aligned} H= \left( \frac{q_2+ \lambda _1 q}{\alpha _2}, \frac{Q}{\alpha _0}\right) \end{aligned}$$

The isocline (15) intersects the straight line \(O=(q_2+q \lambda _1) \alpha _2^{-1}\) at the point F and at the point \(F_{-}\) which lies in the fourth quadrant,

$$\begin{aligned} F_{-}= \left( \frac{q_2+q \lambda _1}{\alpha _2},-\frac{\alpha \lambda _1(q_2 k_{13}+q \lambda _1 k_{13}+\alpha _2 k_{11})}{\omega k q \lambda _1^{2}+ \omega k q_2 \lambda _1+\alpha k_{12}\alpha _2 \lambda _1+k \lambda q \lambda _1 +k \lambda q_2}\right) \end{aligned}$$

Simple calculations give

$$\begin{aligned} \frac{dO}{dP}\left( D \right) =-\frac{\alpha \alpha _0 \lambda _1(Q k_{12}+\alpha _0 k_{11})}{Q k(q \lambda _1 + q_2)} <0 \end{aligned}$$

and

$$\begin{aligned} \frac{dO}{dP}\left( F \right) =\frac{\alpha _0R}{ \alpha _2 Q k(q \lambda _1 + q_2)} >0 \end{aligned}$$

where

$$\begin{aligned} R=(\omega Q k \lambda _1+ \alpha k_{13} \alpha _0 \lambda _1+ Qk \lambda )(q_2+q \lambda _1)+Q \alpha k_{12} \alpha _2 \lambda _1+ \alpha k_{11} \alpha _0 \alpha _2 \lambda _1. \end{aligned}$$

We provide a graphical representation of (15) in Fig. 2.

We note that H is on the right side of D, this means that \(p_0<0\) and that the oblique asymptote intersects the O axes on the right side with respect to C.

In any case, considering the rectangle \(\mathcal R\) in the first quadrant whose vertices are the origin and the points D, F and \(F_{\perp }\), the latter denoting the orthogonal projection of F onto the P axis, in view of the above results, we have that the isocline crosses the boundary of \(\mathcal R\) only at the vertices D and F. Since it is continuous, then in must intersect the isocline (13).

We graphically show that the two isoclines (13) and (15) intersect at \(O^*\) and \(P^*\) in Fig. 3.

Fig. 2
figure 2

Plot of equation (15)

Fig. 3
figure 3

Intersection point of equations (13) and (15)

5 Stability analysis

The Jacobian of (1) is

$$\begin{aligned} J = \left[ \begin{array}{cccc} -\alpha _0 - h(P,O)F &{} -f(P,O) &{} 0 &{} g(P,O)F \\ -\omega h(P,O)F &{} J_{22} &{} k_1 F O &{} k_1 F N -\omega g(P,O) F \\ 0 &{} -k_1 NO &{} -\alpha _1 -k_1 F O &{} - k_1 F N \\ -\lambda h(P,O) F &{} - \lambda _1 k_1 N O- \lambda f(P,O) &{} -\lambda _1 k_1 F O &{} J_{44} \end{array} \right] \end{aligned}$$
(16)

where we have set \(J_{22}=-\omega f(P,O)-\alpha + k_1 NO\), \(J_{44}=-\alpha _2-\lambda _1 k_1 F N-\lambda g(P,O)F\) and, recalling (2), for brevity

$$\begin{aligned} h(P,O)=\frac{\partial f}{\partial P}= \frac{kO\left( k_{11}+k_{13}O \right) }{\left( k_{11}+k_{12} P + k_{13}O\right) ^2}, \\ g(P,O)=\frac{\partial f}{\partial O}= \frac{kP\left( k_{11}+k_{12}P \right) }{\left( k_{11}+k_{12} P + k_{13}O\right) ^2}. \end{aligned}$$

Again, since for the coexistence equilibrium no analytical results are possible, this point will be analysed numerically. In the Conclusions we relate some simulations to show that it can be stably achieved.

Fig. 4
figure 4

Equilibrium \(E_{11}\). Clockwise from top left: P, F, O, N. Note that N is at level zero

Fig. 5
figure 5

Equilibrium \(E_{14}\). Clockwise from top left: P, F, O, N. Note that P is at level zero

The stability analysis for all the remaining equilibria implies that most of them are always locally asymptotically stable. In fact, we have the following results on the eigenvalues of the Jacobian (16) evaluated at the equilibria.

The equilibria \(E_i\), with \(i=0,1,2,4,5,8\) are all locally asymptotically stable, when they exist, because they all have the same eigenvalues as follows: \(-\alpha _0\), \(-\alpha \), \(-\alpha _1\), \(-\alpha _2\).

Also, the following equilibria are unconditionally stable, since they have all negative eigenvalues.

For \(E_3\) we find the eigenvalues \( -\alpha _0\), \(-\alpha \), \(-\alpha _1\), \(-\alpha _2 + \lambda g\left( Q \alpha _0^{-1},0\right) =-\alpha _2\), \(-q \alpha ^{-1}\).

For \(E_6\) instead the eigenvalues are \(-\alpha _0\), \(-\alpha \), \(-\alpha _1\), \(- \alpha _2 - \lambda _1 k_1qq_1 \left( \alpha \alpha _1 \right) ^{-1}\).

At \(E_7\) the eigenvalues are \( -\alpha _0\), \(-\alpha \), \(-\alpha _1\) and

$$\begin{aligned} -\left( \alpha _2 + \lambda _1 k_1 q q_1 \left( \alpha \alpha _1\right) ^{-1} + \lambda g\left( Q \alpha _0^{-1},0\right) q \alpha ^{-1}\right) = -\left( \alpha _2 + \lambda _1 k_1 q q_1 \left( \alpha \alpha _1\right) ^{-1} \right) . \end{aligned}$$

For \(E_9\) we have instead \( -\alpha _0\), \(-\omega f\left( Q \alpha _0^{-1},q_2 \alpha _2^{-1}\right) -\alpha \), \(-\alpha _1\), \(-\alpha _2\).

At \(E_{10}\) we find \( -\alpha _0-h\left( 0,q_2 \alpha _2^{-1}\right) q \alpha ^{-1}=-\alpha _0\), \(-\alpha \), \(-\alpha _1-k_1 q q_2 \left( \alpha \alpha _2\right) ^{-1}\), \(-\alpha _2\).

We have then two conditionally stable equilibria, namely:

\(E_{12}\) with eigenvalues \( -\alpha _0\), \(-\alpha +k_1q_1q_2 \left( \alpha _1 \alpha _2\right) ^{-1}\), \(-\alpha _1\), \(-\alpha _2\). Therefore it is stable if the following condition holds:

$$\begin{aligned} \alpha > \frac{k_1q_1q_2}{\alpha _1 \alpha _2}. \end{aligned}$$
(17)

Further, at \(E_{13}\) we find \( -\alpha _0\), \(-\omega f\left( Q \alpha _0^{-1},q_2 \alpha _2^{-1}\right) -\alpha +k_1 q_1 q_2 \left( \alpha _1 \alpha _2\right) ^{-1}\), \(-\alpha _1\), \(-\alpha _2\) so that it is conditionally stable, requiring

$$\begin{aligned} \frac{k_1 q_1 q_2}{\alpha _1 \alpha _2}<\omega f\left( \frac{Q}{\alpha _0}, \frac{q_2}{\alpha _2}\right) +\alpha . \end{aligned}$$
(18)

There are two more points for which instead the analysis can be done only partially. They are the pollutant-free and the nutrient-free equilibria. At \(E_{14}\) one eigenvalue is \(-\alpha _0\). At \(E_{11}\) we find again one negative eigenvalue, \(-\left( \alpha _1 +k_1 F_{11} O_{11}\right) \). In both these cases, stability depends just on the remaining eigenvalues, that are roots of cubic polynomials. Their coefficients are a bit too involved to be reported here and the corresponding Routh-Hurwitz conditions even more so. Therefore for assessing stability of these equilibria we rely on the numerical simulations, see Figs. 4, and 5.

More specifically, the point \(E_{11}=( 5.4245, 5.3546, 0.0000, 3.4062)\) is obtained with the parameter values \(\alpha _0=3.28873\), \(k=1\), \(k_{11}=1\), \(k_{12}=1\), \(k_{13}=1\), \(q=20.2613\), \(\omega =0.796258\), \(\alpha =2.28732\), \(k_1=2.28273\), \(q_1=0\), \(\alpha _1=1.14407\), \(q_2=13.9699\), \(\alpha _2=2.79653\), \(\lambda _1=0.446216\), \(\lambda =0.441589\), \(Q=27.9039\).

Equilibrium \(E_{14}=(0.0000, 7.3740, 1.8724, 4.6766)\) comes from \(\alpha _0=2.06573\), \(k=1\), \(k_{11}=1\), \(k_{12}=1\), \(k_{13}=1\), \(q=18.3818\), \(\omega =0.113276\), \(\alpha =2.75573\), \(k_1=0.0300296\), \(q_1=9.02427\), \(\alpha _1=3.78408\), \(q_2=16.81\), \(\alpha _2=3.49415\), \(\lambda _1=0.241937\), \(\lambda =0.354569\), \(Q=0\).

Fig. 6
figure 6

Coexistence at the stable equilibrium. Clockwise from top left: P, F, O, N

6 Conclusions

In this paper we introduced a non-linear mathematical model for the biodegradation of organic pollutants in a water body, by using fungi. The analysis shows that in general there is only the coexistence equilibrium, which is found to be locally asymptotically stable by means of numerical simulations, when there is a constant input of all the ecosystem components.

Fig. 7
figure 7

Coexistence \(E_{16}\) is still found if the input of fungi is blocked. Thus the fungi still thrive in these conditions

Fig. 8
figure 8

Equilibrium \(E_{14}\) obtained from coexistence by stopping the input of fungi and pollutants. Here the fungi still thrive

There are however also several particular cases. When all the inputs are absent, the system settles to the zero state. In the other cases, when only some of the system variables are introduced into the system, in general the resulting equilibrium contains only these variables, the remaining ones are washed out, compare Table of the feasibility conditions. For instance if only pollutants are introduced, the equilibrium that is found, namely \(E_1\), contains only these substances; when nutrient and fungi are inputted, we find them at steady state in equilibrium \(E_6\), with no pollutants nor dissolved oxygen. However, four equilibria deserve some care in the analysis. The nutrient-free equilibrium \(E_{11}\) arises if nutrient is not supplied. However the analytical conditions for its stability are not known, for which it may possibly result unstable in some circumstances. Similar considerations hold for the equilibrium with no pollutants, \(E_{14}\). But this is not too much interesting, because it amounts to the purification of a lake in which pollutants will not be anymore introduced. If these immissions do not really take place, then it gives the conditions for which the lake becomes pollution-free. Its feasibility is conditional, provided no pollutants are supplied to the ecosystem, and requires that the product of oxygen and nutrients must be bounded above, see (6) in Proposition 2. Its stability however may or may not hold, as the analysis is inconclusive and we relied only on numerical experiments.

For the equilibrium with no fungi, \(E_{13}\), feasibility is unconditional, provided no fungi are supplied to the ecosystem, but its stability is conditional, (18), requiring a high fungi depletion rate.

To have both fungi and pollutants absent, at \(E_{12}\), they must not be supplied, and furthermore, for stability (17) must be satisfied. Here the fungi washout rate should even be larger than that for \(E_{13}\).

The coexistence equilibrium \(E_{15}(P^*, F^*, N^*, O^*)\) requires condition (10) for feasibility. This is easily seen solving for F the first equation of (1). Note however that for \(q=0\), i.e. when no fungi are introduced in the lake, there is another coexistence feasible equilibrium point \(E_{16}(P_{16}, F_{16}, N_{16}, O_{16})\). For feasibility, it needs again (10) to hold.

Finally, if we start from the equilibrium value obtained with the parameter values \(\alpha _0=2.2841\), \(k=1\), \(k_{11}=1\), \(k_{12}=1\), \(k_{13}=1\), \(q=1.35153\), \(\omega =0.22377\), \(\alpha =3.82954\), \(k_1=0.70742\), \(q_1=21.6952\), \(\alpha _1=1.06129\), \(q_2=19.2035\), \(\alpha _2=3.69832\), \(\lambda _1=0.0875003\), \(\lambda =0.373564\), \(Q=18.0617\) we find the coexistence at level \(E_{15}=(4.0278, 5.0947, 1.4628, 3.8208)\), Fig. 6. If we remove some of the inputs, we reobtain all the particular cases outlined above, with two exceptions. With the choice \(q=0\) we still obtain the coexistence equilibrium, instead of \(E_{11}\), the fungi-free equilibrium, Fig. 7. Setting instead \(q=0\) and \(Q=0\) we find equilibrium \(E_{14}\) instead of \(E_{12}\), the fungi- and pollutants-free point, which we should naturally expect, Fig. 8. The former situation shows that an input of fungi may be needed to start the process, but under suitable circumstances the process continues by itself even in absence of the input of fungi. Alternatively, when achieved without starting from the coexistence, this equilibrium shows that the biodegradation can also be self-sustained. This may make the partial removal of the pollutant economically viable. The biodegradation is only partial because the pollutants still settle at a nonzero level. But this level might be altered, to a desirable low value, by a suitable tuning of the model parameters.