Introduction

Understanding of critical phenomena – a qualitative change in the systems properties when a certain parameter passes a critical value – is a major focus in natural sciences and engineering [1]. In mathematics, the criticality is usually linked to the existence of a bifurcation [2]. One example is given by the so called “problem of critical domain” that has been considered in many applications ranging from nuclear physics [3, 4] to ecology [5, 6]. Systems where the dynamics arises from the interplay between the local growth of a substance (e.g. population density) and its transport over space (e.g. diffusion) often exhibit criticality with regard to the size of their spatial domain. The systems dynamics would then lead to extinction in spatial domains of a small size but to a population growth or even an outbreak (“explosion”) in sufficiently large domains.

The problem of critical domain has been attracting a considerable attention in ecology and population dynamics where it is linked to habitat fragmentation. Habitat fragmentation usually results from poorly planned anthropogenic activities (and also exacerbated by the global climate change) and is thought to be the main factors causing significant biodiversity loss worldwide [7]. As a result of fragmentation, populations natural areas may shrink by an order of magnitude or even more and the population extinction in a small habitat is much more likely [8]. The question thus arises as to what is the minimum size of the habitat that keeps the population viable.

Biological invasions are admittedly the second major cause of biodiversity loss [9]. Invasion starts with an introduction when an alien species is brought deliberately or occasionally into a new ecosystem. The new population is usually introduced in small numbers (ultimately, just a few animals or seeds) and hence initially occupies only a small area. Whether it is going to extinct or to establish and eventually proliferate into space is thought to depend on the size of the introduced population and/or on the area of the initially occupied area: small alien populations are likely to disappear but larger colonies are more likely to succeed [10, 11]. Apparently, this is also a problem of the critical domain size, albeit considered from a somewhat different angle.

Although both habitat fragmentation and biological invasions are essentially biological problems, there is a general consensus that their comprehensive understanding can hardly be achieved by means of empirical research approaches traditionally used in ecology (such as data collection and their statistical analysis and/or small-scale field experiments). Mathematical modelling is a powerful research tool that has been efficiently used to elucidate many ecological problems [12,13,14]. The choice of an adequate model or a relevant mathematical framework is a subtle issue though. The problem of critical domain was previously studied in terms of reaction–diffusion equations, e.g. see [15, 16] and further references there. Although reaction–diffusion equations have been used widely in theoretical ecology [17], they have their limits and constraints, and the biological assumptions behind them are not always relevant or sometimes appear to be oversimplified. A modelling framework alternative to reaction–diffusion is based on telegraph equation (the reaction-telegraph equation if births and deaths are taken into account) [18] and it is thought to be more relevant as it accounts the directional preference in individual animal movement [19, 20]. A comprehensive study of the problem of critical domain for the reaction-telegraph equation is still lacking. This paper aims to bridge this gap.

It should be mentioned that, in spite of several decades of intense research, nonlinear dynamics remains to be a major focus in applied mathematics. In particular, considerable progress has been made over the last few years in development powerful analytical tools [21,22,23,24,25,26,27,28,29,30,31,32] as well as precise and efficient numerical methods [33, 34]. However, the comprehensive understanding of the critical domain problem is still lacking, especially for the mathematical frameworks beyond the standard reaction–diffusion systems. In this paper, we consider an initial-boundary problem for the nonlinear partial differential equation of a mixed parabolic-hyperbolic type [35]. This is a highly nontrivial problem and its analytical solution is not available. We therefore have to solve it numerically by combining finite differences (to approximate partial derivatives) with an iteration method (to account for the nonlinear growth). Here we emphasize that its numerical solution is a nontrivial problem as well, in particular because one has to do with unstable stationary solutions. The existence of such solutions makes it difficult to distinguish between the real large-time asymptotics and the long term transient quasi-stationary state and hence requires a careful numerical evaluation of the solution convergence.

Materials and Methods

In this section a complete description of the governing equations and conditions is made. After, the mathematical model is introduced. Besides, details about a new numerical formulation to model is done as well.

Description of the Model

The reaction telegraph equation is deduced from continuity equation and Cattaneo’s constitutive equation [36], then it is obtained that

$$\begin{aligned} \tau \frac{\partial ^2 S}{\partial t^2} + \left[ 1 - \tau \frac{d F\left( S\right) }{d S}\right] \frac{\partial S}{\partial t} = D\frac{\partial ^2 S}{\partial x^2} + F\left( S\right) , \end{aligned}$$
(1)

where t is the time, x a dimensional space and \(S\left( t,x\right) \) the population density. The term D is called diffusion coefficient, \(\tau \) the relaxation time, and finally F(S) is a reactive term (source term). Particularly, if \(\tau = 0\) it is found the reaction–diffusion equation that was exhaustively studied by several authors, e.g., [37]. Also, when \(\tau \rightarrow 0\) the solution of the Eq. (1) converges for solution of the reaction–diffusion equation [18]. The parameter \(\tau \) produces a retard at solution.

There are any source terms F(S) to study of biological problems. The present paper are considered:

$$\begin{aligned} \begin{array}{ll} \text{ Exponential } \text{ Model: } &{} F(S) = K_1 S, \\ \text{ Logistic } \text{ Model: } &{} F(S) = K_1S\left( 1-\frac{S}{K_2}\right) , \\ \text{ Allee } \text{ Effect } \text{ Model: }&{} F(S) = K_1S\left( \frac{S}{K_3}-1\right) \left( 1-\frac{S}{K_2}\right) , \end{array} \end{aligned}$$
(2)

with \(K_1, K_2, K_3\) constants. The parameter \(K_1\) defines the per capita growth rate, \(K_2\) is the carrying capacity and \(K_3\) the critical point.

Furthermore, a rectangular signal and a null rate are provide how initial condition, which are given by

$$\begin{aligned} S_I = \left\{ \begin{array}{ll} 0, \quad x < A\\ \\ B, \quad A \le x \le C \qquad ;\qquad \left. \frac{\partial S}{\partial t}\right| _{t=0} = 0,\\ \\ 0, \quad x > C \end{array}\right. \end{aligned}$$
(3)

and \(A, B>0, C\) real numbers.

For border, the Dirichlet Boundary Condition (DBC) is assumed with population density null. Nevertheless, how the partial differential equation (1) is a wave equation, the reflection phenomena [38]—with phase changing—happens on border. Then a difficulty may arise, for example negative values for \(S\left( t, x\right) \) may appear if wave’s amplitude is enough to do it. Considering the cut off condition given by

$$\begin{aligned} S\left( t,x\right) < 0 \rightarrow S\left( t,x\right) = 0, \end{aligned}$$

the difficulty can be fixed to some cases.

Thus, the analysis model at the present work is:

$$\begin{aligned} \left\{ \begin{array}{ll} \tau \frac{\partial ^2 S}{\partial t^2} + \left[ 1 - \tau \frac{d F\left( S\right) }{d S}\right] \frac{\partial S}{\partial t} = D\frac{\partial ^2 S}{\partial x^2} + F\left( S\right) &{} \quad \left( 0,t_{end}\right] \times \left( 0,L\right) \\ S\left( 0,x\right) = S_I; \quad \frac{\partial S\left( 0,x\right) }{\partial t} = 0 &{} \quad \left( 0,L\right) \\ S\left( t,0\right) = S\left( t,L\right) = 0 &{} \quad \left[ 0,t_{end}\right] \end{array}\right. \end{aligned}$$
(4)

together with cut off condition

$$\begin{aligned} \Bigl \{\begin{array}{ll} \forall \left( t,x\right) \in \left( 0,t_{end}\right] \times \left( 0,L\right) ;S\left( t,x\right) < 0 \rightarrow S\left( t,x\right) = 0&\qquad \quad \quad \end{array}\Bigr . \end{aligned}$$
(5)

where \(t_{end}\) is the final time and L the length of the one-dimensional domain. Specifically, the equilibrium happens when the temporal variations of the \(S\left( t,x\right) \) aren’t significant, what lead the reactive term be exactly opposite to diffusive term. From this consideration the model (4) can be rewritten as

$$\begin{aligned} \left\{ \begin{array}{ll} D\frac{\partial ^2 S}{\partial x^2} = - F\left( S\right) &{} \quad \left( 0,L\right) \\ S\left( 0\right) = S\left( L\right) = 0 \end{array}\right. \end{aligned}$$
(6)

with population density changing just in the space, which means \(S \equiv S\left( x\right) \). Also, to starter the model (6) one begin condition must be considered, e.g., the rectangular signal \(S_I\) from (3) can be used to this purpose.

Numerical Modelling

So far, the model (4) does not have analytical solution, writing by a finite quantity of elementary mathematical terms, for biological context mentioned here in this paper. Thus, a new numerical modelling that resolve this model is introduced in this section then. A code in gfortran to show the numerical modelling efficiency was written too.

The one-dimensional domain of length L is discretized by a set of points. Then an internal mesh to the domain is done, similar the Fig. 1.

Fig. 1
figure 1

Computational grid

In Fig. 1 are present—discrete points (\(x_i, i=1,\ldots ,ni \in N\)), population density (\(S_i,i=0,\ldots ,ni \in N\)), and cardinal location (\(W \equiv i-1, P \equiv i, E \equiv i+1\)). Note that \(S_i\) values are not localized together with the nodes, these are between discrete nodes except \(S_0, S_{ni}\). The boundary conditions are applied in the red points, to green points the partial differential equation (PDE) of the model (4) and initial conditions are calculated.

From model (4), the PDE can be written as:

$$\begin{aligned} \left. \tau \frac{\partial ^2 S}{\partial t^2}\right| _{P}^{k+1} + \left. \left[ 1-\tau \frac{d F\left( S\right) }{d S}\right] \right| _{P}^{k+1}\left. \frac{\partial S}{\partial t}\right| _{P}^{k+1} = \left. D\frac{\partial ^2 S}{\partial x^2}\right| _{P}^{k+1} + \left. F\left( S\right) \right| _{P}^{k+1}, \end{aligned}$$
(7)

here P is the cardinal location, see Fig. 1, and \(k+1\) an advance in time’s line, such that \(\left( k+1\right) - \left( k\right) = \varDelta t\) is a time lapse. Thus, applying the Finite Difference Method in PDE (7) is found

$$\begin{aligned}&\frac{\tau }{\varDelta t^2}\left( S_{P}^{k+1}-2S_{P}^{k}+S_{P}^{k-1}\right) + \left. \left[ 1-\tau \frac{d F}{d S}\right] \right| _{P}^{k+1} \frac{1}{\varDelta t}\left( S_{P}^{k+1} - S_{P}^{k}\right) \nonumber \\&\quad =\frac{D}{\varDelta x^2}\left( S_{W}^{k+1}-2S_{P}^{k+1}+S_{E}^{k+1}\right) + F_{P}^{k+1}, \end{aligned}$$
(8)

which results

$$\begin{aligned} -C_W S_{W}^{k+1} + \left( C_P+\tau {\widetilde{C}}_P\right) S_{P}^{k+1} - C_E S_{E}^{k+1} = {\widetilde{b}}_{P} + \tau {\bar{b}}_{P}, \end{aligned}$$
(9)

such that

$$\begin{aligned} \begin{array}{llllll} C_{P} &{}=&{} \frac{1}{\varDelta t} + \frac{2D}{\varDelta x^2}, \quad &{}{\widetilde{C}}_P &{}=&{} \frac{1}{\varDelta t^2} - \frac{1}{\varDelta t}\left. \frac{d F}{d S}\right| _{P}^{k+1},\\ C_{W} &{}=&{} {D}/{\varDelta x^2}, \quad &{}C_{E} &{}=&{} {D}/{\varDelta x^2},\\ {\widetilde{b}}_{P} &{}=&{} F_{P}^{k+1} + \frac{1}{\varDelta t}S_{P}^{k}, \quad &{}{\bar{b}}_{P} &{}=&{} \left[ \frac{2}{\varDelta t^2} - \frac{1}{\varDelta t}\left. \frac{d F}{d S}\right| _{P}^{k+1}\right] S_{P}^{k} - \frac{1}{\varDelta t^2}S_{P}^{k-1}. \end{array} \end{aligned}$$

Making \(i=1,\ldots ,ni-1\) and considering the following discrete conditions

$$\begin{aligned} \begin{array}{ccccccc} S\left( 0,x\right) _{i}^{0} = S_{i}^{0} &{}\quad \Rightarrow \quad &{} S_{i}^{0} &{}=&{} S_I, &{}&{}\\ \frac{\partial S\left( 0,x\right) _{i}^{0}}{\partial t} = \frac{S\left( 0,x\right) _{i}^{0}-S\left( 0,x\right) _{i}^{-1}}{\varDelta t} = 0 &{}\quad \Rightarrow \quad &{} S_{i}^{-1} &{}=&{} S_I, &{}&{}\\ S\left( t,0\right) _{0}^{k+1} = S\left( t,L\right) _{ni}^{k+1} = 0 &{}\quad \Rightarrow \quad &{} S_{0}^{k+1} &{}=&{} S_{ni}^{k+1} &{}=&{} 0, \end{array} \end{aligned}$$

the Eq. (9) can be written in the matrix form below

$$\begin{aligned} \underbrace{ \left[ \begin{array}{cccc} C_1+\tau {\widetilde{C}}_1 &{}-C_2 &{} &{} \\ -C_1 &{}C_2+\tau {\widetilde{C}}_2 &{}-C_3 &{} \\ &{}-C_2 &{}C_3+\tau {\widetilde{C}}_3 &{} \\ \cdots &{}\cdots &{}\cdots &{}\cdots \\ \cdots &{}\cdots &{}\cdots &{}\cdots \\ &{}-C_{ni-3} &{}C_{ni-2}+\tau {\widetilde{C}}_{ni-2} &{}-C_{ni-1} \\ &{} &{}-C_{ni-2} &{}C_{ni-1}+\tau {\widetilde{C}}_{ni-1} \end{array}\right] }_\mathbf{\large C } \overbrace{ \left[ \begin{array}{c} {\mathop {{S}_1^{k+1}}\limits ^{}} \\ S_2^{k+1} \\ S_3^{k+1} \\ \cdots \\ \cdots \\ S_{ni-2}^{k+1} \\ {\mathop {S_{ni-1}^{k+1}}\limits ^{}} \end{array}\right] }^\mathbf{\large S } = \underbrace{ \left[ \begin{array}{c} {\widetilde{b}}_{1} + \tau {\bar{b}}_{1} \\ {\widetilde{b}}_{2} + \tau {\bar{b}}_{2} \\ {\widetilde{b}}_{3} + \tau {\bar{b}}_{3} \\ \cdots \ \\ \cdots \\ {\widetilde{b}}_{ni-2} + \tau {\bar{b}}_{ni-2} \\ {\widetilde{b}}_{ni-1} + \tau {\bar{b}}_{ni-1} \end{array}\right] }_\mathbf{\large b } \end{aligned}$$
(10)

where the matrix \(\mathbf C \) and vector \(\mathbf b \) aren’t always constant, also the vector \(\mathbf S \) is calculated by iterative process. Specifically, to time step \(k+1\) the terms \({\widetilde{C}}_i, {\widetilde{b}}_{i}\) and \({\bar{b}}_{i}\) are computed by code as

$$\begin{aligned} \begin{array}{lllll} {\widetilde{C}}_i &{}\equiv &{} {\widetilde{C}}_{i}^{{k+1}_{\left( IT\right) }} &{}=&{} \frac{1}{\varDelta t^2} - \frac{1}{\varDelta t}\left. \frac{d F}{d S}\right| _{i}^{{k+1}_{\left( IT-1\right) }},\\ {\widetilde{b}}_{i} &{}\equiv &{} {\widetilde{b}}_{i}^{{k+1}_{\left( IT\right) }} &{}=&{} F_{i}^{{k+1}_{\left( IT-1\right) }} + \frac{1}{\varDelta t}S_{i}^{k},\\ {\bar{b}}_{i} &{}\equiv &{} {\bar{b}}_{i}^{{k+1}_{\left( IT\right) }} &{}=&{} \left[ \frac{2}{\varDelta t^2} - \frac{1}{\varDelta t}\left. \frac{d F}{d S}\right| _{i}^{{k+1}_{\left( IT-1\right) }}\right] S_{i}^{k} - \frac{1}{\varDelta t^2}S_{i}^{k-1}, \end{array} \end{aligned}$$
(11)

with \(IT=1,\ldots ,it_{max}\in N\), where \(S_{i}^{{k+1}_{\left( 0\right) }}=S_{i}^{k}\) and \(it_{max}=10^6\). Beyond \(S_i^{k+1}\equiv S_{i}^{{k+1}_{\left( IT\right) }}\) as well.

Remember that the cut off condition could be requested too. So, the computation may be done by means of \(S_{i}^{k+1} < 0 \rightarrow S_{i}^{k+1} = 0\).

In this way, the interesting is that a set of non-linear algebraic equations (10) is locally a linear system, i.e., the set of non-linear equations, to each IT assumed, is a linear system of equations. This is being called a quasi-non-linear scheme.

Also, the matrix \(\mathbf C \) of the linear system is diagonally dominant. The code monitors it numerically. The system (10) is solved by Gauss-Seidel Iterative Method until to reach convergence with a stopped criteria \(\varepsilon = 10^{-7}\). Consequently, the vector \(S^{k+1}\) stays available to verify if the steady state was achieved, the following condition is used to do it

$$\begin{aligned} \frac{||S^{k+1}-S^{k}||_2}{||S^{k+1}||_2} < 10^{-7}. \end{aligned}$$
(12)

If previous condition is true the stationary situation was reached, else the code advances to time step \(k+2\) and all process begins again.

Of course the set of Eq. (10) could be solved by other form, e.g., from Linearization Technique which is based on first-order Taylor’s expansions and that presented a good accuracy already [39]. But, the set of equations would be rewritten, it would have more terms and the new computations costs would increase then.

Additionally, other numerical modelling concept concerns a new numerical procedure to calculate the contributions of the PDE’s terms. It is important to know the specific contribution of the terms—temporal, diffusive and reactive—to each time step, their respectively equations are:

$$\begin{aligned} Term_d\left( t\right)= & {} \left( \frac{1}{ni-1}\right) \sum _{i=1}^{ni} \left. D\frac{\partial ^2 S}{\partial x^2}\right| _{i}^{k+1}, Term_r\left( t\right) = \left( \frac{1}{ni-1}\right) \sum _{i=1}^{ni} \left. F\left( S\right) \right| _{i}^{k+1},\nonumber \nonumber \\ Term_t\left( t\right)= & {} \left( \frac{1}{ni-1}\right) \sum _{i=1}^{ni} \left\{ \left. \tau \frac{\partial ^2 S}{\partial t^2}\right| _{i}^{k+1} + \left. \left[ 1-\tau \frac{d F}{d S}\right] \right| _{i}^{k+1}\left. \frac{\partial S}{\partial t}\right| _{i}^{k+1} \right\} , \end{aligned}$$
(13)

to \(t>0\).

To report questions about equilibrium, the optimized model (6) is used. The model is resolved by finite difference method and the equilibrium (namely numeric equilibrium) is found then. Before, inserting the term \(K_1 S\) into PDE, it can be written as

$$\begin{aligned} D\frac{\partial ^2 S}{\partial x^2} - K_1 S = - F\left( S\right) - K_1 S, \end{aligned}$$
(14)

and approaching derivative’s term by central finite difference at the cardinal point P and considering other terms in the same cardinal point, the equation stays

$$\begin{aligned} E_W S_{W} - E_P S_{P} + E_E S_{E} = MF_{P}, \end{aligned}$$
(15)

where

$$\begin{aligned} \begin{array}{llllll} E_{P} = \frac{2D}{\varDelta x^2} + K_1, \quad E_{W} = E_{E} = \frac{D}{\varDelta x^2}, \quad MF_{P} = - F_{P} - K_1 S_{P} \end{array} \end{aligned}$$

whose matrix form of the last equation is type

$$\begin{aligned} \left[ \begin{array}{cccc} -E_1 &{}E_2 &{} &{} \\ E_1 &{}-E_2 &{}E_3 &{} \\ \cdots &{}\cdots &{}\cdots &{}\cdots \\ \cdots &{}\cdots &{}\cdots &{}\cdots \\ &{}E_{ni-3} &{}-E_{ni-2} &{}E_{ni-1} \\ &{} &{}E_{ni-2} &{}-E_{ni-1} \end{array}\right] \left[ \begin{array}{c} {\mathop {{S}_1}\limits ^{}} \\ S_2 \\ \cdots \\ \cdots \\ S_{ni-2} \\ {\mathop {S_{ni-1}}\limits ^{}} \end{array}\right] = \left[ \begin{array}{c} MF_{1} \\ MF_{2} \\ \cdots \\ \cdots \\ MF_{ni-2} \\ MF_{ni-1} \end{array}\right] . \end{aligned}$$
(16)

The set of algebraic equations (16) is linear for Exponential Model, and non-linear to other models. But, from iterative proceeding it’s true that the set is a linear system of equations if the term \(MF\) is caught at previous iteration in any model. In this way, it’s assumed which \(S_{i} \equiv S_{i}^{IT}, MF_{i} \equiv MF_{i}^{IT-1}\) to \(i=1,\ldots ,ni-1\) with \(IT=1,\ldots ,it_{max}\) and \(it_{max}=5\times 10^5\).

It’s interesting adding the \(K_1 S\) term in this process because the coefficients’ matrix becomes diagonally dominant, thus the Gauss-Seidel scheme’s convergence is guaranteed. The numeric equilibrium is looked for from Gauss-Seidel scheme with accuracy \(10^{-8}\).

Particularly, \(t \rightarrow \infty \) implies that reactive and diffusive terms written in (13) are the same to model (14) as well. Just writing \(Term_r\) and \(Term_d\), it was implemented the following condition about numeric equilibrium

$$\begin{aligned} Q_{r | d} = \frac{\bigl | | Term_r | - | Term_d | \bigr |}{\bigl | | Term_r | + | Term_d | \bigr |}. \end{aligned}$$
(17)

The quotient (17) is a proportion’s measuring between diffusive and reactive terms. It done a simulation, if the accuracy condition \(Q_{r | d}<10^{-8}\) isn’t verified it means the last population density calculated is far of numeric equilibrium. This carries on a new length of the domain to be calculated, that is

$$\begin{aligned} L_{new} = \left\{ \begin{array}{ll} L \left( 1-Q_{r | d}\right) , \quad | Term_r | > | Term_d | \\ L \left( 1+Q_{r | d}\right) , \quad | Term_r | < | Term_d | \end{array}\right. . \end{aligned}$$
(18)

Thereby, the simulation is started with this new length (18) and the code is run up to condition (17) to be evaluated again. All this proceeding is going to until convergence.

Whenever \(\tau =0\) the model (4), with \(F(S) = K_1 S\), becomes a simple reactive-diffusive model of exponential growth, that has analytical solution [40] given by:

$$\begin{aligned} S\left( t,x\right) = \sum _{n=1}^{\infty } B_n sin\left( \frac{n \pi x}{L}\right) e^{\left( K_1-\frac{n^2 \pi ^2 D}{L^2}\right) t}, \end{aligned}$$
(19)

where \(B_n = \frac{2B}{n\pi }\left[ cos\left( \frac{n \pi A}{L}\right) - cos\left( \frac{n \pi C}{L}\right) \right] \) in the present work. With population’s density gotten, from (10) and (19), populations are found to each time step by expression:

$$\begin{aligned} Pop\left( t\right) = \int _{0}^{L} S\left( t,x\right) dx, \end{aligned}$$
(20)

whose integral form is numerically calculated via Composite Trapezoidal Rule to ni odd, or Composite Simpson’s Rule otherwise. This two rules were considered to increase accuracy of results.

Besides, for to evaluate performance of the code is used Euclidean Norm. From Euclidean norm the error’s equation is

$$\begin{aligned} ||E||_2 = \frac{||A_S-N_S||_2}{||A_S||_2}, \end{aligned}$$
(21)

where \(A_S, N_S\) are population’s density analytic and numeric, respectively.

To estimate the order of convergence, verifying the numerical scheme’s quickness, is used the following equation adapted from equation of [41]:

$$\begin{aligned} p \approx \frac{1}{log\left[ \frac{n+1}{n}\right] } log \left( \frac{||E_{\varDelta x/n}||_2}{||E_{\varDelta x/n+1}||_2}\right) , \end{aligned}$$
(22)

with n being an integer multiplicity factor.

In summary, the model (4)–(5) presents in this work is resolved by means of a new numerical modelling composed by (10), (13), (16), (17) and (18). So, its performance and results are discussed now in the next section.

Results and Discussion

Assuming \(\tau = 0\) the model (4) becomes a reaction–diffusion model. When the source term is like exponential, then it has analytical solution (19). In the work [16] was demonstrated that there is a critical length (\(L_c\)), whose expression is \(L_c = \pi \sqrt{\frac{D}{K_1}}\). The authors explained that \(L>L_c\) the reactive term (\(K_1 S\)) is dominant and population increases. If \(L<L_c\) the diffusive term \(\left( D\frac{\partial ^2 S}{\partial x^2}\right) \) is dominant and population decreases up to extinction. Though, whenever \(L=L_c\) the diffusion and reaction forces stay identical and population persist. In the last situation has the equilibrium between forces.

Table 1 Parameters for study when \(L=L_c\)

Considering the Table 1, some simulations was performed to verify what are \(\varDelta t\) and \(\varDelta x\) values necessary to obtain the equilibrium between forces, but accurately and in agreement with analytical solution.

Firstly, assuming \(\varDelta t = 0.01\) and changing the number grids points (\(ni=300\); 400; 500; 600; 700; 800; 900; 1000; 2000; 4000) the accuracy of numerical scheme is investigated. After this, with \(ni=900\) mesh points and \(\varDelta t\) changing from 0.005 to 0.0001 the accuracy is seen as well. For each simulation is calculated the error by means equation (21). Therefore, the parallel axis plot, Fig. 2, shows the error values.

Fig. 2
figure 2

Graphic of the errors

The Fig. 2 displays that:

  • if ni increases from 300 to 900, with \(\varDelta t = 0.01\), the norm decreases until 2.7e−03; but if ni is more than 900 the error is very more than 2.7e−03 and this is not desirable;

  • however, if \(ni=900\) and \(\varDelta t\) change from 0.01 to 0.0001 the norm decreases to next 1.1e−03; although this last value is not useful, because the computational costs are a lot of expensive;

thus, when \(ni=900\) (\(\varDelta x \approx 0.011050\)) and \(\varDelta t = 0.0005\) the norm is approximately 1.9e−03 with computational costs not being expensive. This result shows which the relationship between \(\varDelta x\) and \(\varDelta t\) must to be type \(\frac{\varDelta t}{\varDelta x} \approx 0.045245\).

Table 2 Estimating of convergence order to some grids with \(\varDelta t = 0.0005\)

Now, the Table 2 shows the estimate order of convergence to numerical modelling employed. When \(ni = 150\) we get \(\varDelta x = L_c /(150-1) = 0.066675089\) with \(n=1\) to Eq. (22), also if \(ni = 300\) it implies \(\varDelta x = L_c /299 = 0.033226048\) to \(n=2\). These provide \(p=-0.70\), consult equation (22) again.

In summary, the red colour values are saying: if the mesh has 900 points (\({\varDelta x = 0.011050}\)) it leads the norm \(||E_{\varDelta x/6}||_2=0.001987\) which produces the quickness \(p=1.79\) of the numerical code.

How the relation \(\frac{\varDelta t}{\varDelta x} \approx 0.045245\) provides a satisfactory quickness of the code and a relative error very small as well, so it will be used as base for next simulations in following subsections.

Exponential Model

  • Case \(\tau = 0\):

For following results are considered exactly Table’s data 1, but \(\varDelta t = 0.0005\) and \(ni = 900\). The Fig. 3 shows profiles analytical and numerical solutions together for any times. The simulation is made until to reaching steady state. Note which both solutions are quite agreement, it is supported by calculates of Eqs. (21) and (22). The agreement can be observed from of colour map Fig. 4, yet.

Fig. 3
figure 3

Numerical \(\left( N_S\right) \) and analytical \(\left( A_S\right) \) population densities from Table 1 with \(\varDelta t = 0.0005\) and \(ni = 900\)

Fig. 4
figure 4

Colour map from Fig. 3 of the populations density \(A_S\) (left) and \(N_S\) (right)

This case, the numeric equilibrium condition (17) is satisfied to time near of 7.15. The code doesn’t calculate a new length, because was used the exactly value \(L_c=\pi \sqrt{\frac{1}{0.1}} \approx 9.934588266\). It shows that the numerical modelling is adequated and the code is calibrated as well.

From Composite Simpson’s Rule the integral (20) was calculated then. The Fig. 5 displays the integration on the space to each time. Particularly, in last time both populations were obtained with good precision:

$$\begin{aligned} Pop_{A_S}\left( 7.15\right) \approx 24.854771 \qquad \text{ and } \qquad Pop_{N_S}\left( 7.15\right) \approx 24.873675, \end{aligned}$$

still, populations seem to be completely agreement along the time as well.

Fig. 5
figure 5

Development of populations \(Pop_{A_s}\) and \(Pop_{N_S}\) at the time

Fig. 6
figure 6

Contribution of each term of the Eq. (7) when \(L=L_c\)

On Fig. 6 can be seen the development of each PDE term—equations in (13)—note that \(|Term_r\left( 7.15\right) | \cong |Term_d\left( 7.15\right) | \approx 0.25\). It means, that the dynamic begins with reactive term dominating, after a transition period the temporal term moves towards 0, and diffusive term equilibrates with reactive term. All this process happens from converged numerical solutions to each lapse time.

Table 3 Parameters to \(L>L_c\)

If \(L>L_c\) the PDE’s reactive term is dominant over time. It happens because \(K_1-\frac{n^2 \pi ^2 D}{L^2}>0\) then \(\lim _{t \rightarrow \infty } e^{\left( K_1-\frac{n^2 \pi ^2 D}{L^2}\right) t} = \infty \), see solution (19), it implies that population increases.

From parameters’ Table 3 with \(L = 1.5\times L_c\) the simulation was carried on then. For to keep the same relation between \(\varDelta x\) and \(\varDelta t\) previously considered, we made \(ni = 1350\) because the characteristic length was modified in this new situation. Besides, was changed the values \(A=6.450, C=8.450\) to keep the same initial population of the equilibrium case.

Fig. 7
figure 7

Population’s increasing—\(Pop_{A_s}\) and \(Pop_{N_S}\) on the time

The Fig. 7 shows the pattern of population’s growing, note that \(Pop_{N_S}\) is agree with \(Pop_{A_s}\). At time \(t=7.15\) (the same used in the previous analysis) was observed that \(Pop_{N_S}\left( 7.15\right) \approx 36.325215, Pop_{A_S}\left( 7.15\right) \approx 36.452911\) (see blue arrow position) and one relative error of 0.35% between solutions. Analogously, at the time last \(t=15.0\) was found an error 2.76% too.

The detachment between solutions occurs specifically because of the numerical approach employed in the temporal term. Remember that \(\frac{\partial S}{\partial t}\), Eq. (7), was written by a first order finite difference and it decreases the numerical model’s accuracy [Eq. (9)] to very long time. But this was not enough to disqualify the numerical solution.

Now, just changing \(ni=450, L = 0.5\times L_c, A=1.483\) and \(C=3.483\), it was gotten the figure below.

Fig. 8
figure 8

Population’s decrease—\(Pop_{A_s}\) and \(Pop_{N_S}\) on the time

In opposite to Fig. 7, Fig. 8 shows the population’s declining, here both solutions are agreement as well. In time \(t=7.15\) (see blue arrow) the \(Pop_{N_S}\) is 3.95% far of \(Pop_{A_s}\), and at the time last \(t=15.0\) it is 8.03% far then. The difference between solutions occurs by same previous reason. But it isn’t bad again, because \(\frac{\partial S}{\partial t}\) is going to 0. Furthermore, in this case, the steady state happens a bit more than \(t=14\), but with population towards to extinction.

  • Case \(\tau \ne 0\):

Now, it’s important to know what is population’s profile submitted the influences of hyperbolic telegraph equation.

Considering e.g., \(t_{end}=15.0, ni=900\) to range \(\tau = 0.01; 0.05; 0.10; 0.50; 1.00\), on the cases:

\(K_1\)

L

ABC

0.1

9.9345882658

3.9672; 9.9345; 5.9672

0.4

4.9672941329

1.9836; 4.9672; 2.9836

0.7

3.7549214184

1.4994; 3.7549; 2.2554

1.0

3.1415926536

1.2545; 3.1415; 1.8870

in Table 3, were found the populations’ profiles plotted at Fig. 9.

Fig. 9
figure 9

Population’s profiles from telegraphic equation to several per capita growth rate \(K_1\)

Particularly, the analytical solution showed here is from Eq. (19) with the calculus \(L = \pi \sqrt{\frac{D}{K_1}}\). Besides, the values ABC are proportional among themselves for the different values \(K_1\) and L.

Note that there are a delay among population’s values because of changing on \(\tau \). When the values \(K_1\) and \(\tau \) increases, the gradient of populations curves are more evidenced as well. However, after a time, the gradient decreases and the colours solutions converge to black analytical solution. So, the equilibrium stays established, see the Fig. 9 again.

Table 4 Times whose \(S\left( t,x\right) < 0\)

On the other hand, there are some problems about use the model  (4). At the Table’s data 4 are shown time values where population’s density stayed negative. Note that negative population’s density problem happens more earlier if the value \(\tau \) is kept constant and \(K_1\) increase. This problem happened because of reflection phenomena on the border. Thus, it isn’t true that can be used any value to \(\tau \) or \(K_1\) at governing equation.

The Table 5 presents relative errors values. The left table values were calculated from model (4) and right by same model, but considering cut off condition (5).

Looking the left table above, the errors values are \(O\left( 10^{-3}\right) \). Analogously, to right table, the errors are same order except if \(K_1 = 1.00\) and \(\tau = 0.50; 1.00\) that are bad.

Table 5 Error’s table calculated by formula (21)
Fig. 10
figure 10

Population’s profile to several per capita growth rate \(K_1\) with cut off

The Fig. 10 shows the populations’ profiles from telegraphic equation with cut off condition. Note that the profiles aren’t bad. But to \(K_1=1.0\) and \(\tau =0.5; 1.0\) the bad values profiles (green,blue) converged to other equilibrium points far of analytical solution (black), what aren’t correct.

It happened which the energy associated with PDE was cut off too. This led the other equilibrium point, of the other PDE, which it does not is the original problem. So, it’s very important to have careful with cut off condition as well.

In additional, e.g., just to \(K_1 = 0.7; 1.0\) with \(\tau = 0.5\) can be seen in the Fig. 11 the populations densities profiles to some times. The top plots are displayed profiles without and with cut off, respectively. The profiles present a plenty similarity, the cut off condition wasn’t enough to promote a great change over profiles, this occurs because \(K_1=0.7\) isn’t large to do that yet.

Fig. 11
figure 11

Populations density’s profile to several times (\( t = 0.4; 0.8; 1.2; 1.6\))

In contrast, the under graphics of the Fig. 11 show other dynamic. If \(K_1=1.0\) the phase changing phenomena is more important, which carry on the negatives populations densities very more evident. So, from cut off condition the energy associated with PDE is severely modified, consequently the steady state of population is very different then, look Fig. 10 again.

Now on conditions \(L > L_c\) or \(L < L_c\) the analytical solution, Eq. (19), shows that the patterning is growing or extinction respectively, see on page 13 for details. So, several simulations were made considering, e.g., \(t_{end}=15.0, \varDelta t = 0.00005, D=1.0, K_1=0.1\) for ni, L, A, B and C below,

ni

L

ABC

1350

14.90188239

6.450; 9.9345; 8.450

450

4.967294133

1.483; 9.9345; 3.483

to range \(\tau = 0.0; 0.0001; 0.001; 0.01; 0.1; 1.00\) in growing case and \(\tau = 0.01;\) 0.05; 0.10; 0.50; 1.00 about extinction. The profiles are displayed at left (top–bottom) of the Fig. 12 respectively.

Fig. 12
figure 12

Populations profiles, from telegraphic equation. The upper is about growing, and the right plot with cut off condition. The under is about extinction, and the right plot with cut off as well

Table 6 Times whose \(S\left( t,x\right) < 0\) in cases like growing and extinction, respectively

Over again there are problems about model (4). At Table 6 are shown the time values where population’s density stayed negative too, so not correct. In repetition, using cut off condition (5) were gotten the graphics at right (top–bottom) of the Fig. 12. This results aren’t bad. The negative population’s density problem happened more late when \(\tau \) increased to extinction’s case. In special, was used small relaxation time values at the growing case, because it is very sensible from changing on.

Logistic Model

  • Case \(\tau = 0\):

Parameters’ Table 7 was used to performance simulation for \(F(S) = K_1S\left( 1-\frac{S}{K_2}\right) \), to verify if there is numeric equilibrium.

Table 7 Parameters to discover when steady state is achieved
Fig. 13
figure 13

Populations’ profiles to several values \(K_2\) on Logistic model

When \(t_{end}=15, ni=900, L=L_c, A=3.967, C=5.967\) to each \(K_2 = 0.1\), 1.0, 10.0, 100.0, 1000.0 are admitted at the Table 7 the pattern of populations’ profile was changed from extinction to steady state, see Fig. 13. A simple change of the carrying capacity (\(K_2\)) provides different patterns between extinction and stabilisation.

Fig. 14
figure 14

Populations’ profiles to several lengths values when Logistic model is used to \(K_2 = 10.0\) (left). The critical length to Logistic model \(L_c^{l}\) (right)

Particularly, if \(K_2=1000.0\) the numerical result agrees with \(Pop_{A_S}\) (the same displayed at Fig. 5). This is enough to shows that numerical scheme was correctly implemented as well.

The central question is—what is the domain length necessary to found steady state? So, e.g., from green population (Fig. 13 with \(K_2=10.0\)), keeping \(\frac{\varDelta t}{\varDelta x} \approx 0.045245\), setting \(t_{end} = 30\), and changing niLA and C, the steady state is found and it can be seen in the Fig. 14 by colour red. This figure shows clear evidence of existence of critical length, called Logistic critical length (\(L_c^{l}\)).

Fig. 15
figure 15

Numerical solution of population’s density and its colour map to Logistic model

Specifically, the new numerical modelling calculated the Logistic critical length \(L_c^{l} = 11.592287147\) (labelled by red triangle) iteratively, whose population is plotted by red dots. Thus, the code calculated the population density with \(L_c^{l}, ni=1050\), \(A=4.796, C=6.796\). The results are displayed at the Figs. 15 and 16.

Fig. 16
figure 16

Contribution of each term of the Eq. (7) when \(L_c^{l} = 11.592287147\)

  • Logistic equilibrium:

More, after a lot of simulations with the equilibrium model (6) it was observed one connection between parameters \(L_c^{l}\) and \(K_2\) in numeric equilibrium situation, the Fig. 17 shows it. It can be seen that there is an inverse relation between parameters. This is displayed by line black. In additional, e.g., if \(L_c^{l}\) decreases and \(K_2\) increases, it leads to growing population value, look the dots’ colour maps. This is consistent with biological phenomenons observed.

Fig. 17
figure 17

Critical length against carrying capacity value, with population’s colour map highlighted to Logistic model

  • Case \(\tau \ne 0\):

From data that led to Figs. 15 and 16, it was obtained the plot 18 to \(\tau \) value between 0.00 and 1.00. In special case \(\tau =1.0\), it was found \(S\left( t,x\right) < 0\). So, by means cut off condition (5) one new simulation (labelled \(\tau = 1.00_{\text{ c }}\)) was made and putted into the graphic, then.

Fig. 18
figure 18

Population’s profile from telegraphic equation with Logistic model

The Fig. 18 displays that telegraph equation with different relaxation time values provide solutions delayed. But, the populations values are very near each other one another in the steady state.

The data Table 8 presents the stationary values showed in the Fig. 18, and their percentage deviations with respect of 23.87245253. Look that deviations are not large. Besides, there are a good agreement between populations, with and without cut off if \(\tau =1.00\), as well. The precisions happened with five digits.

This shows that new numerical modelling is able to resolve biological problems with Logistic model implemented too. Though, very careful over parameters’ values is necessary as well.

Allee Effect Model

  • Case \(\tau = 0\):

Analogously, the aim now consists to investigate the population’s profile pattern when Allee Effect Model, \(F(S) = K_1 S\left( \frac{S}{K_3}-1\right) \left( 1-\frac{S}{K_2}\right) \), is used. In this case the PDE does not have analytical solution as well, though it can be solved numerically.

Table 8 Population’s value in steady state with percentage deviation to Logistic model
Table 9 Parameters to discover when steady state is achieved to Allee effect model
Fig. 19
figure 19

Populations’ profiles to several values \(K_3\) on Allee effect model

The values of the Table 9 were used to make simulations. Firstly, the set \(t_{end}=50.0, ni=900\), \(L=L_c, K_2=10.0\) and \(A=3.967, C=5.967\) together with a range of critical points \(K_3\) were used such that the Allee Effect be clearly visualized. So, the several population’s profiles were simulated and now showed at the Fig. 19. For this analysis was kept the condition: \(0<S<K_3\) (where population have negative growth rate); and positive growth rate to \(K_3<S<K_2\) assuming \(0<K_3<K_2\), that are common to biological problems. A large number values \(K_3\) were used to show one split of populations groups. One populations’ group which reach the steady state (with different times), and other that to go to extinction, see previous figure again.

Fig. 20
figure 20

Populations’ profiles to several lengths values when Allee Effect Model is used to \(K_3 = 1.4\) (left). The critical length to Allee Effect Model \(L_c^{a}\) (right)

Fig. 21
figure 21

Numerical solution of population’s density and its colour map to Allee Effect Model

Changing the values \(t_{end}, ni, L, A, C\), keeping \(K_2=10.0, K_3=1.4\), and \(\frac{\varDelta t}{\varDelta x} \approx 0.045245\), what is the new population’s profile? Setting \(t_{end}=100.0, ni=900, L = L_c\), \(A = 3.967, C = 5.967\) the code is executed until to get the profile and Allee Critical Length (\(L_c^{a}\)), labelled by triangle, in red colour, see Fig. 20. The red population profile was found to: \(L_c^{a}=10.730020417, ni=973\), \(A = 4.365, C = 6.365\), its details can be seen in the Figs. 21 and 22.

Fig. 22
figure 22

Contribution of each term of the Eq. (7) when \(L_c^{a}= 10.730020417\)

  • Allee Effect equilibrium:

Similarly what it was done with Logistic model about equilibrium, now with Allee Effect Model were gotten several populations’ values that achieving steady state or went to extinction. From \(D = 1.0\), \(K_1 = 0.1, L = 14.901882389, ni=1350, A = 6.450, B = 9.9345, C = 8.450\), the Fig. 23 was obtained to \(K_2 \times K_3 = \left[ 1;10\right] \times \left[ 0.1;3\right] \).

Fig. 23
figure 23

Final values of populations over grid \(K_2 \times K_3\) (left) and some contour lines to \(L_c^{a}\) (right)

About Fig. 23-left can be said that in fact there is a non-linear relation among \(L_c^{a}, K_2\) and \(K_3\). Additionally, e.g., \(Pop_{N_S}\) move from extinction state to persistence for \(K_3<2\), with \(K_2\) increasing then. On the other hand, e.g., the persistence state is lost by means of \(K_3\) growing to all \(K_2\) values as well. Particularly, the greatest population value happens if \(K_3\) is very far of \(K_2\), i.e., \(K_3=0.1\) and \(K_2 = 10\).

More, the Fig. 23-right shows behaviour of \(L_c^{a}\) over \(K_2 \times K_3\). Specifically, e.g., increasing \(K_2\) and decreasing \(K_3\), this carries on to successive growing of the \(L_c^{a}\), thereby, the numerical equilibrium stays established, with population’s persistence. Still, the Allee efect model shows to be very sensible by changing in carrying capacity and critical point, what modify \(Pop_{N_S}\) value between extinction and persistence quickly. This behaviour is very common in biological process as well.

  • Case \(\tau \ne 0\):

Analogously, from data which carried on to Figs. 21 and 22, but with \(\tau \ne 0\), results were gotten and are showed at Fig. 24 then.

Fig. 24
figure 24

Population’s profile from telegraphic equation with Allee Effect Model

In fact, \(\tau \ne 0\) provides a delay at solution too. So, for biological problems the question is to know what is the best \(\tau \) to be applied, that explain the population behaviour then.

Table 10 Population’s value in steady state with percentage deviation to Allee effect model

In contrast, data’s Table 10 shows populations values in stationary state for several different relaxation time. Additionally, are displayed others solutions and their deflects respect to 63.86172295. Look that there are a good agreement among populations values. The values \(S\left( t,x\right) <0\) arose just when \(\tau = 1.00\). The table presents solution from cut off condition (\(\tau = 1.00_{\text{ c }}\)). Observe that solution is very accurate with five digits precision too.

Again, new numerical modelling can be used to solve biological problems modelled by Allee Effect Model. But, it is necessary to have very careful about the choice of the parameters values as well.

Discussion and Concluding Remarks

Critical phenomena are ubiquitous in nature [1]. Their understanding is important for a predictive modelling of system’s dynamics to identify critical transitions and regime shifts where the system’s properties can change abruptly (over a short transition time) following a change in the system’s parameters [42,43,44]. In particular, in an open reaction–diffusion system (that is allowing for the mass flow through the domain boundaries) the size of the domain is known to be a parameter that can have such an effect [4].

In ecology, the size of the habitat is known to be a factor that can change the population dynamics qualitatively [7, 8, 10]. Population dynamics of a given species becomes unsustainable when the habitat size becomes too small (e.g. as a result of human intervention or the climate change) – to fall below a certain critical value – resulting in the species extinction. A thorough understanding of this phenomenon is therefore needed in the context of nature conservation and indeed the problem of critical domain has been in the focus of theoretical ecology for several decades [5, 6, 10]. However, the theoretical approaches have mostly been limited to the reaction–diffusion framework. Meanwhile, although reaction–diffusion systems have been successfully used in theoretical ecology for several decades, they have their limitations and arguably, not all their properties are fully relevant. An alternative mathematical framework is based on correlated random work (contrary to uncorrelated Brownian motion) and the corresponding mean-field model is the reaction-telegraph equation.

Whilst the problem of critical domain can be solved exactly for the linearized models, both for the reaction–diffusion and reaction-telegraph equations [4, 5, 45], the more interesting and more realistic nonlinear case can only be studied by numerical simulations. Meanwhile, calculating the critical domain size in the model (4) is nontrivial, in particular if the population growth rate is affected by the strong Allee effect, because in this case the system possesses an unstable stationary solution. The problem becomes even more complicated in the case of a finite relaxation time, i.e. for \(\tau \ne 0\).

In the present work, we have proposed a new, efficient numerical algorithm to solve the reaction-telegraph equation, see (10), (13), (16), (17), (18). One feature of our numerical algorithm that makes it superior to standard approaches is the way to deal with non-linear coefficients \({\widetilde{C}}_P, {\widetilde{b}}_{P}\) and \({\bar{b}}_{P}\) by means of (11), hence making use of the fact that at each IT the matrix form (10) is a linear system. A numerical code was built and validated by means of numerical simulations in a simpler case \(\tau = 0\); see Section 3.1. The code was then used to investigate the critical domain problem by means of extensive simulations to calculate the critical lengths \(L_c^{l}\) and \(L_c^{a}\) (in the case of the logistic growth and the strong Allee effect, respectively) to reveal their dependence on essential model parameters; see Figs. 1417 and 2023.

One generic problem with the reaction-telegraph equation considered on a bounded domain is that its solutions are not positively defined. Although this issue has been a focus of several studies [46,47,48], the question as to what is the root of the problem and how the model (either the equation or the boundary conditions) could possibly be modified to restore the positivity remains largely open. In this paper (see also [45]), we addressed this issue by introducing a cutoff as given by condition (5). We have shown that, for values of \(\tau \) sufficiently small, the reaction-telegraph equation with cutoff is well defined and do not attain any artificial properties; in particular, the total mass is conserved. For a larger value of \(\tau \), however, the mass conservation principle becomes violated. Interestingly, the critical value of \(\tau \) where the model attains unrealistic properties appears to depend on the parameters of the growth rate, e.g. on \(K_1, K_2\) and \(K_3\). That opens a possibility of identifying the corresponding domain in the parameter space where the extension of the reaction-telegraph equation using the cutoff is well defined. Further investigation into this issue will become a focus of future work.