1 Introduction

Modified Patankar–Runge–Kutta (MPRK) schemes are numerical time integration schemes that are conservative and unconditionally positivity-preserving when applied to a positive and conservative production-destruction system (PDS)

$$\begin{aligned} y_i'=\sum _{\begin{array}{c} j=1\\ j\ne i \end{array}}^N\bigl ( p_{ij}(t,\textbf{y}) - d_{ij}(t,\textbf{y})\bigr ),\quad i=1,\dots , N, \end{aligned}$$
(1)

where \(\textbf{y}=(y_1,\dots ,y_N)^T\) and \(p_{ij}(t,\textbf{y}),d_{ij}(t,\textbf{y})\ge 0\) for all \(\textbf{y}>\textbf{0}\), \(t\ge 0\). A PDS is called positive when positive initial values imply positive solutions for all times and is called conservative when \(\textbf{1}^T\textbf{y}'=0\) or equivalently \(\textbf{1}^T\textbf{y}\) is constant for all times. Here, \(\textbf{1}=(1,\dots ,1)^T\in \mathbb {R}^N\) denotes the vector with all elements equal to one.

For general linear methods unconditional positivity is restricted to first-order schemes, see [1,2,3]. Since MPRK schemes do not belong to the class of general linear methods, they can be unconditionally positivity-preserving and of higher order at the same time. So far, second and third-order MPRK schemes for the integration of autonomous PDS have been constructed in [4,5,6], based on the classical Runge–Kutta (RK) formulation. The same was done in [7, 8], based on the SSP formulation of RK schemes. In [9] arbitrary high-order MPRK schemes on the basis of deferred correction schemes have been introduced. MPRK schemes for time-dependent PDS have been investigated in [10]. For other approaches to obtain unconditional positivity, we refer to [2, 11,12,13,14,15,16]. We also want to mention the novel framework [17] on order conditions for Runge–Kutta-like schemes to which MPRK methods belong. Besides a general theory for deriving order conditions, for the first time, sufficient and necessary conditions for fourth-order MPRK schemes were presented and reduced therein. Additionally, the authors proved that the convergence order of an MPRK method does not depend on the signs of the RK parameters.

In addition to the order of a numerical scheme, its stability is of course crucial for its usefulness in practical applications. In the following, we will be concerned with the linear stability of MPRK schemes, i.e., the stability behavior of MPRK schemes when applied to a positive and conservative linear system. Based on \(\textbf{A}=(a_{ij})\in \mathbb {R}^{N\times N}\), a positive and conservative linear system has the form

$$\begin{aligned} \textbf{y}'=\textbf{A}\textbf{y},\quad \textbf{A} - {{\,\textrm{diag}\,}}(\textbf{A})\ge 0,\quad \textbf{1}^T\textbf{A}=\textbf{0}, \end{aligned}$$
(2)

where \(\textbf{A}-{{\,\textrm{diag}\,}}(\textbf{A})\ge 0\) is necessary and sufficient for positivity, see [18], and \(\textbf{1}^T\textbf{A}=\textbf{0}\) must hold to ensure conservativity. Here, the notation \({{\,\textrm{diag}\,}}(\textbf{A})\in \mathbb {R}^{N\times N}\) is used to denote the diagonal matrix with diagonal elements equal to those of \(\textbf{A}\). Furthermore, the conservation property \(\textbf{1}^T\textbf{A}=\textbf{0}\) together with positivity implies \({{\,\textrm{diag}\,}}(\textbf{A})\le 0\). If we define \(\textbf{B}=\textbf{A}-{{\,\textrm{diag}\,}}(\textbf{A})\), system (2) can be rewritten in production-destruction form as

$$\begin{aligned} \textbf{y}'=\textbf{B}\textbf{y}- (-{{\,\textrm{diag}\,}}(\textbf{A})\textbf{y}),\quad \textbf{B}\ge 0, \quad \textbf{1}^T\textbf{A}=\textbf{0}. \end{aligned}$$
(3)

Since \(\textbf{B}=(b_{ij})\ge \textbf{0}\) and \(\textbf{y}\ge \textbf{0}\) by assumption the system’s production terms are \(p_{ij}(\textbf{y})=b_{ij}y_j=a_{ij}y_j\ge 0\) for \(i\ne j\) and the corresponding destruction terms \(d_{ij}\) are contained within \(-{{\,\textrm{diag}\,}}(\textbf{A})\textbf{y}\ge \textbf{0}\). For \(N=2\) all positive and conservative linear systems (3) can be represented as

$$\begin{aligned} \textbf{y}'= \begin{pmatrix}-a &{} b\\ a &{} -b \end{pmatrix}\textbf{y},\quad a,b\ge 0. \end{aligned}$$
(4)

The central notion for linear stability of general linear methods is A-stability. A general linear method is said to be A-stable, whenever its numerical solution of \(y'=\lambda y\) for an arbitrary time step size \(\Delta t>0\) tends to zero for all \(\lambda \in \mathbb {C}^-=\{z\in \mathbb {C}\mid {\text {Re}}(z)<0\}\). The choice \(\lambda \in \mathbb {C}^-\) comes from the fact, that A-stability ensures that the numerical solution of a linear system \(\textbf{y}'=\textbf{A}\textbf{y}\) tends to \(\textbf{0}\), whenever all eigenvalues of \(\textbf{A}\) belong to \(\mathbb {C}^-\). For an A-stable linear method applied to \(\textbf{y}'=\textbf{A}\textbf{y}\) with a spectrum \(\sigma (\textbf{A})\subseteq \mathbb {C}^-\), the unique steady state solution \(\textbf{y}^*=\textbf{0}\) is an asymptotically stable fixed point for arbitrary time step sizes. However, the crucial difference between A-stability and asymptotic stability is that the former is a global property, i.e., independent of the initial value, while the latter is a local property since asymptotic stability requires that the initial value be sufficiently close to the fixed point.

Due to its importance for general linear methods, we would also like to investigate the A-stability of MPRK schemes. Unfortunately, several obstacles stand in the way. First, MPRK schemes cannot be applied to the scalar linear test equation, particularly not with \(\lambda \in \mathbb {C}^-\), as it is unclear how the complex term \(\lambda y\) can be split into production and destruction terms. To get around this, we can apply MPRK schemes directly to positive and conservative linear systems. But, the conservation property is in contradiction with the asymptotic stability of \(\textbf{y}^*=\textbf{0}\), i.e., there is no conservative linear system whose solution tend to \(\textbf{0}\) for \(t\rightarrow \infty \) for initial values \(\textbf{y}^0>\textbf{0}\), since \(\textbf{1}^T\textbf{y}\) must be constant for all times. Moreover, a conservative linear system can possess several independent linear invariants, i.e., there exist K linear independent vectors \(\textbf{n}_i\) with \(\textbf{n}_i^T\textbf{A}=\textbf{0}\) and hence, \(\textbf{n}_i^T\textbf{y}\) remains constant for all times. To avoid the issue with asymptotic stability, we can weaken the requirement and demand only stability instead, while at the same time, we can require that the numerical approximations tend to the unique steady state solution \(\textbf{y}^*\) of

$$\begin{aligned} \textbf{y}'=\textbf{A}\textbf{y},\quad \textbf{y}(0)=\textbf{y}^0, \end{aligned}$$
(5)

which always satisfies \(\textbf{n}_i^T\textbf{y}^*=\textbf{n}_i^T\textbf{y}^0\). In summary, we are looking for MPRK schemes for which a stable steady state \(\textbf{y}^*\) of a positive and conservative linear system \(\textbf{y}'=\textbf{A}\textbf{y}\), becomes a stable fixed point of the MPRK scheme for all time step sizes \(\Delta t\), and in addition, the iterates \(\textbf{y}^n\) tend to \(\textbf{y}^*\) for all initial values \(\textbf{y}^0\) that satisfy \(\textbf{n}_i^T\textbf{y}^0=\textbf{n}_i^T\textbf{y}^*\).

The fact that an MPRK scheme \(\textbf{y}^{n+1}=\textbf{g}(\textbf{y}^n)\) is not a general linear method makes it complicated to find MPRK schemes with the desired properties, since the application of an MPRK scheme to a linear system results in a nonlinear iteration of the form

$$\begin{aligned} \textbf{y}^{n+1}=\textbf{R}(\Delta t\textbf{A},\textbf{y}^n)\textbf{y}^n, \end{aligned}$$

whereas the stability function \(\textbf{R}\) of a general linear method is independent of the iterate \(\textbf{y}^n\). In addition, the conservation property implies the existence of infinitely many non-hyperbolic fixed points \(\textbf{y}^*\ne \textbf{0}\) of the map \(\textbf{g}\), i.e., the Jacobian \(\textbf{D}\textbf{g}(\textbf{y}^*)\) has eigenvalues with an absolute value equal to one. Hence, a linear stability theory for MPRK schemes must be a stability theory for non-hyperbolic fixed points of nonlinear iterations. One such approach to study stability is based on the center manifold theory of dynamical systems and was introduced in [19, 20]. Assuming that the initial value \(\textbf{y}^0\) is sufficiently close to the fixed point \(\textbf{y}^*\), the theory provides sufficient conditions for the stability of \(\textbf{y}^*\), as well as for the convergence of the iterates to the steady state of the corresponding initial value problem. Thus, this stability theory would almost suffice to find the desired schemes if the theory did not make local statements only, with respect to the initial value. However, to the authors’ knowledge, this is the only approach to studying the stability of MPRK schemes so far.

The stability theory of [19, 20] was used to investigate the linear stability of MPRK22 schemes and it was proven therein that MPRK22(\(\alpha \)) schemes with \(\alpha \ge 0.5\) are linearly stable and that their iterates tend to the correct fixed point \(\textbf{y}^*\), whenever the initial value \(\textbf{y}^0\) is sufficiently close to \(\textbf{y}^*\). The stability theory was used in [21] to find SSP-MPRK schemes with the same properties. Stability analysis of the third-order MPRK schemes from [6] and the MPDeC schemes of [9] was carried out in [22]. We also want to note, that the stability theory of [19, 20] is not only applicable to MPRK schemes and was also used in [23] to analyze the linear stability of BBKS [10, 12, 13] and GeCo schemes [14]. Furthermore, it was used in [24] to investigate the stability of an MPRK scheme in the context of a nonlinear PDS.

Even though the stability results of [19, 20] are only valid in a sufficiently small neighborhood of the fixed point, the numerical results in [19,20,21] suggested that the local stability might actually be a global one, just like it is the case for A-stable general linear methods.

However, in [22, 25], it was discovered that the MPDeC(8) method with equidistant nodes is indeed only locally stable. To check the conjecture that this is due to the negative RK parameters of the MPDeC(8) scheme, the family of MPRK22(\(\alpha \)) schemes with negative RK parameters, i.e., \(\alpha <0.5\), was investigated in [26]. The numerical experiments presented therein show that MPRK22(\(-0.5\)) is another MPRK scheme, which is only locally stable.

The aim of this paper is to summarize and extend the results of [26] and to justify the conjecture that this local linear stability behavior, which is unknown from general linear methods, only occurs for MPRK schemes if the Butcher tableau of the underlying RK scheme contains negative values.

2 Linear stability of MPRK22(\(\alpha \)) schemes

This section summarizes some of the results of [26].

The idea of MPRK schemes is to modify explicit RK schemes by introducing additional weighting factors that ensure unconditional positivity and conservation. Destruction terms are multiplied by weights with respect to the equation they appear in. Production terms are multiplied by the same weights as their corresponding destruction counter parts. If all parameters of the underlying RK schemes are nonnegative, there is no difference between production or destruction terms on the continuous and discrete levels. But if production or destruction terms are multiplied by a negative RK parameter they switch their roles from the continuous to the discrete level, which has to be dealt with appropriately within the implementation of the scheme.

The MPRK22\((\alpha )\) schemes were introduced in [5] and are based on general second-order explicit RK schemes, i.e., \(a_{21}=\alpha \ne 0\), \(b_2=\frac{1}{2\alpha }\), \(b_1=1-b_2\). In [5] only nonnegative RK parameters were considered, which is the case, if \(\alpha \ge \frac{1}{2}\). For \(0<\alpha <\frac{1}{2}\) the parameter \(b_1\) becomes negative and for \(\alpha <0\) the parameters \(a_{21}\) and \(b_1\) are negative. Consequently, we need to distinguish these three different cases, for varying values of \(\alpha \).

In a form which is suitable for positive as well as negative RK parameters, the MPRK22(\(\alpha \)) schemes for the solution of (1) can be reformulated as

$$\begin{aligned} y_i^{(1)}&=y_i^n,\end{aligned}$$
(6a)
$$\begin{aligned} y_i^{(2)}&= y_i^n + a_{21}\Delta t \sum _{j=1}^N \biggl (p_{ij}(\textbf{y}^{(1)})\frac{y_{\gamma (j,i,a_{21})}^{(2)}}{ y^{(1)}_{\gamma (j,i,a_{21})}}-d_{ij}(\textbf{y}^{(1)})\frac{y_{\gamma (i,j,a_{21})}^{(2)}}{ y^{(1)}_{\gamma (i,j,a_{21})}}\biggr ),\end{aligned}$$
(6b)
$$\begin{aligned} y_i^{n+1}&=y_i^n+\Delta t \sum _{k=1}^2 b_k \sum _{j=1}^N\biggl ( p_{ij}(\textbf{y}^{(k)})\frac{y_{\gamma (j,i,b_k)}^{n+1}}{\sigma _{\gamma (j,i,b_k)}}-d_{ij}(\textbf{y}^{(k)})\frac{y_{\gamma (i,j,b_k)}^{n+1}}{\sigma _{\gamma (i,j,b_k)}}\biggr ), \end{aligned}$$
(6c)

for \(i=1,\dots ,N\), with

$$ \sigma _i = \sigma _i(\textbf{y}^n,\textbf{y}^{(2)})= (y_i^n)^{1-1/a_{21}}(y_i^{(2)})^{1/a_{21}},\quad i=1,\dots ,N $$

and the index function

$$\begin{aligned} \gamma (i,j,\theta )=i \ \ \text {for } \ \theta \ge 0 \ \ \text {und } \ \gamma (i,j,\theta )=j \ \ \text {for } \ \theta < 0. \end{aligned}$$
(7)

The purpose of the index function is to decide, whether a term is a production or destruction term and to choose the weighting factors accordingly. We also note that the index function (7) was introduced in [9] for the definition of MPDeC schemes.

It was proven in [5] that MPRK22\((\alpha )\) schemes with \(\alpha \ge \frac{1}{2}\) are unconditionally positive and conservative second-order schemes. The same is true for \(0<\alpha <\frac{1}{2}\) and \(\alpha <0\), which was proven in [26] by a straight-forward modification of the proof given in [5]. For a general framework concerning the order conditions of MPRK schemes, we refer to [17].

To examine the linear stability of MPRK22\((\alpha )\) schemes in terms of the stability theory [19, 20], we consider their application to positive and conservative linear PDS (3).

$$ {{\,\textrm{diag}\,}}(\textbf{v}/\textbf{u})={{\,\textrm{diag}\,}}(\textbf{v}){{\,\textrm{diag}\,}}(\textbf{u})^{-1}, $$

where \({{\,\textrm{diag}\,}}(\textbf{v})={{\,\textrm{diag}\,}}(v_1,\dots ,v_n)\in \mathbb {R}^{N\times N}\) denotes the diagonal matrix with the elements of the vector \(\textbf{v}=(v_1,\dots ,v_n)^T\in \mathbb {R}^N\) on the diagonal. As mentioned above, we need to distinguish between the following three cases.

2.1 Case \(\alpha \ge 0.5\)

This case was already considered in [19, 20], and we present the results for the sake of completeness.

As \(\alpha =a_{21}>0\) implies that all RK parameters are nonnegative, the application of an MPRK22(\(\alpha \)) scheme () to (3) yields

$$\begin{aligned} \textbf{y}^{(2)}= & {} \textbf{y}^n + a_{21}\Delta t\bigl (\textbf{B}{{\,\textrm{diag}\,}}(\textbf{y}^{(2)}/\textbf{y}^n)\textbf{y}^n+{{\,\textrm{diag}\,}}(\textbf{y}^{(2)}/\textbf{y}^n){{\,\textrm{diag}\,}}(\textbf{A})\textbf{y}^n\bigr ),\\ \textbf{y}^{n+1}= & {} \textbf{y}^n+\Delta t\bigl (\textbf{B}{{\,\textrm{diag}\,}}(\textbf{y}^{n+1}/\varvec{\sigma })(b_1 \textbf{y}^n+b_2\textbf{y}^{(2)})\\{} & {} +{{\,\textrm{diag}\,}}(\textbf{y}^{n+1}/\varvec{\sigma }){{\,\textrm{diag}\,}}(\textbf{A})(b_1 \textbf{y}^n+b_2\textbf{y}^{(2)})\bigr ), \end{aligned}$$

In comparison to the underlying RK scheme, a diagonal matrix with Patankar-weights was introduced on the left of \({{\,\textrm{diag}\,}}(\textbf{A})\) in the destruction parts and on the right of \(\textbf{B}\) in the production parts. This is done in the other cases as well.

The dependence of \(\textbf{y}^{n+1}\) on \(\textbf{y}^n\) can be expressed by an implicit function \(\textbf{g}\), i.e., \(\textbf{y}^{n+1}=\textbf{g}(\textbf{y}^n)\). Each steady state \(\textbf{y}^*\) of (3) is also a fixed point of \(\textbf{g}\) and

$$\begin{aligned} \textbf{D}\textbf{g}(\textbf{y}^*) = \bigl (\textbf{I}- \Delta t \textbf{A} \big )^{-1} \bigl (\tfrac{1}{2\alpha } \Delta t \textbf{A} \bigl (\textbf{I}-\bigl (\textbf{I}-\alpha \Delta t \textbf{A} \bigr )^{-1}\bigr ) + \textbf{I}\bigr ) \end{aligned}$$

has the eigenvalues \(R(\Delta t \lambda )\), where \(\lambda \) is an eigenvalue of \(\textbf{A}\) and the stability function is

$$\begin{aligned}R(z) = \frac{\tfrac{1}{2\alpha } z \left( 1-\tfrac{1}{1-\alpha z}\right) +1}{1- z} = \frac{-z^2-2\alpha z+2}{2(1-\alpha z)(1-z)}. \end{aligned}$$

As a result, \(|R(z)|<1\) for all \(z\in \mathbb {C}^-\), which implies stability of fixed points and convergence towards the steady state of the underlying initial value problem. Hence, the MPRK22(\(\alpha \)) schemes with \(\alpha \ge 0.5\) fulfill all desired properties, apart from the fact that stability could only be proven in a sufficiently small neighborhood of the fixed point. Furthermore, we want to emphasize that in this case, apart from \(\Delta t\), stability depends only on \(\lambda \) like in the continuous case.

2.2 Case \(0<\alpha <0.5\)

A similar analysis as for \(\alpha \ge 0.5\) can be conducted for the situation that \(0<\alpha <0.5\). This was done in [26] and the results will be summarized here. In this case, we have \(b_1<0\) and \(a_{21},b_2>0\). Consequently, the scheme () applied to (3) reads

$$\begin{aligned} \textbf{y}^{(2)}= & {} \textbf{y}^n + a_{21}\Delta t\bigl (\textbf{B}{{\,\textrm{diag}\,}}(\textbf{y}^{(2)}/\textbf{y}^n)\textbf{y}^n+{{\,\textrm{diag}\,}}(\textbf{y}^{(2)}/\textbf{y}^n){{\,\textrm{diag}\,}}(\textbf{A})\textbf{y}^n\bigr ),\end{aligned}$$
(8a)
$$\begin{aligned} \textbf{y}^{n+1}= & {} \textbf{y}^n+\Delta t\bigl (b_1{{\,\textrm{diag}\,}}(\textbf{y}^{n+1}/\varvec{\sigma })\textbf{B}\textbf{y}^n+b_2\textbf{B}{{\,\textrm{diag}\,}}(\textbf{y}^{n+1}/\varvec{\sigma })\textbf{y}^{(2)}+\\{} & {} b_1{{\,\textrm{diag}\,}}(\textbf{A}){{\,\textrm{diag}\,}}(\textbf{y}^{n+1}/\varvec{\sigma })\textbf{y}^n+b_2{{\,\textrm{diag}\,}}(\textbf{y}^{n+1}/\varvec{\sigma }){{\,\textrm{diag}\,}}(\textbf{A})\textbf{y}^{(2)}\bigr ).\nonumber \end{aligned}$$
(8b)

Next, we summarize the results of [26] and present details in Appendix A.1.

The stability behavior is more complicated than for \(\alpha \ge 0.5\) as the Jacobian \(\textbf{D}\textbf{g}(\textbf{y}^*)\) in general also depends on \(\textbf{A}^T\) and the steady state \(\textbf{y}^*\) itself

However, if we restrict ourselves to the specific system (4), then

$$\begin{aligned}&\textbf{D}\textbf{g}(\textbf{y}^*) = -\bigl (-\textbf{I} + \Delta t \bigl ( -1 + \tfrac{1}{\alpha } \bigr ) \textbf{A} \big )^{-1} \bigl (\textbf{I} + \Delta t \bigl (2 - \tfrac{5}{2\alpha } + \tfrac{1}{\alpha ^2} \bigr ) \textbf{A} \\&\qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad -\Delta t \bigl (\tfrac{3}{2\alpha } - \tfrac{1}{\alpha ^2} \bigr ) \textbf{A} \bigl (-\textbf{I}+\alpha \Delta t \textbf{A} \bigr )^{-1} \bigr ) \end{aligned}$$

and

$$\begin{aligned}R(z)= -\frac{1+\bigl (2- \tfrac{5}{2\alpha } + \tfrac{1}{\alpha ^2} \bigr )z -\bigl ( \tfrac{3}{2\alpha } - \tfrac{1}{\alpha ^2} \bigr ) \frac{z}{(-1+\alpha z)} }{-1+\bigl (-1+\frac{1}{\alpha }\bigr )z}. \end{aligned}$$

A technical computation shows that for every \(\alpha \) there exists a \(z^*<0\), given by

$$z^* = \frac{-2 \alpha ^2 +3 \alpha - 2 - \sqrt{4 \alpha ^4+ 12 \alpha ^3 - 11 \alpha ^2 - 4 \alpha +4}}{6 \alpha ^2 - 7 \alpha +2}, $$

such that \(|R(z)|>1\) for all \(z<z^*\). Hence, the MPRK22(\(\alpha \)) schemes are only conditionally stable for \(0<\alpha < 0.5\).

The above analysis results in the following theorem.

Theorem 1

Let the unique steady state \(\textbf{y}^*\) of the initial value problem (5) with system matrix (4) be positive. Then the iterates of the MPRK22(\(\alpha \)) scheme with \(0<\alpha < 0.5\) locally converge towards \(\textbf{y}^*\), if \(\Delta t<-\frac{z^*}{a+b}\).

As mentioned before, details can be found in [26] and Appendix A.1.

2.3 Case \(\alpha <0\)

In this case, we have \(a_{21},b_2<0\) and \(b_1>0\). Hence, terms multiplied by \(a_{21}\) or \(b_2\) change their role from the continuous to the discrete level. As a result, MPRK22(\(\alpha \)) schemes () applied to (3) become

$$\begin{aligned} \textbf{y}^{(2)}= & {} \textbf{y}^n + a_{21}\Delta t\bigl ({{\,\textrm{diag}\,}}(\textbf{y}^{(2)}/\textbf{y}^n)\textbf{B}\textbf{y}^n+{{\,\textrm{diag}\,}}(\textbf{A}){{\,\textrm{diag}\,}}(\textbf{y}^{(2)}/\textbf{y}^n)\textbf{y}^n\bigr ),\end{aligned}$$
(9a)
$$\begin{aligned} \textbf{y}^{n+1}= & {} \textbf{y}^n+\Delta t\bigl (b_1\textbf{B}{{\,\textrm{diag}\,}}(\textbf{y}^{n+1}/\varvec{\sigma })\textbf{y}^n+b_2{{\,\textrm{diag}\,}}(\textbf{y}^{n+1}/\varvec{\sigma })\textbf{B}\textbf{y}^{(2)}\\{} & {} +b_1{{\,\textrm{diag}\,}}(\textbf{y}^{n+1}/\varvec{\sigma }){{\,\textrm{diag}\,}}(\textbf{A})\textbf{y}^n+b_2{{\,\textrm{diag}\,}}(\textbf{A}){{\,\textrm{diag}\,}}(\textbf{y}^{n+1}/\varvec{\sigma })\textbf{y}^{(2)}\bigr ).\nonumber \end{aligned}$$
(9b)

Again, we summarize the results of [26] and present details in Appendix A.2.

As for \(0<\alpha <0.5\) the Jacobian \(\textbf{D}\textbf{g}(\textbf{y}^*)\) in general depends on \(\textbf{A}^T\) and the steady state \(\textbf{y}^*\) itself. But for the purpose of this paper, it is sufficient to restrict ourselves to system (4), in which case it can be seen that the dependence on \(\textbf{A}^T\) and \(\textbf{y}^*\) within () disappears due to the property (A3), and we have

$$\begin{aligned}&\textbf{D}\textbf{g}(\textbf{y}^*) = -\bigl (-\textbf{I} + \Delta t \bigl ( 1 - \tfrac{1}{\alpha } \bigr ) \textbf{A} \big )^{-1} \bigl (\textbf{I} + \Delta t \bigl ( \tfrac{3}{2\alpha } - \tfrac{1}{\alpha ^2} \bigr ) \textbf{A} \\&\qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad -\Delta t \bigl ( -\tfrac{1}{2\alpha } + \tfrac{1}{\alpha ^2} \bigr ) \textbf{A} \bigl (-\textbf{I}-\alpha \Delta t \textbf{A} \bigr )^{-1} \bigl ( \textbf{I}+2\alpha \Delta t \textbf{A} \bigr ) \bigr ) \end{aligned}$$

as well as

$$\begin{aligned} R(z)= -\frac{1+\bigl ( \tfrac{3}{2\alpha } - \frac{1}{\alpha ^2} \bigr )z -\bigl ( -\tfrac{1}{2\alpha } + \frac{1}{\alpha ^2} \bigr )z \frac{1}{(-1-\alpha z)} \bigl (1+2\alpha z\bigr )}{-1+\bigl (1-\frac{1}{\alpha }\bigr )z}. \end{aligned}$$

The nonzero eigenvalue of \(\textbf{A}\) in (4) is \(\lambda =-(a+b)<0\). Hence, we only need to consider \(z\in \mathbb {R}\) with \(z<0\). For every \(\alpha <0\) the function R is monotonically increasing on \((-\infty ,0)\) with

$$ \lim _{z\rightarrow -\infty }R(z)=-\frac{\alpha +2}{2\alpha (\alpha -1)} $$

and consequently

$$\begin{aligned} -\frac{\alpha +2}{2\alpha (\alpha -1)}<R(z)<1 \quad \text {for } z<0 \text { and } \alpha <0. \end{aligned}$$

If we restrict \(\alpha \) additionally to \(\alpha \le -0.5\), then \(|R(z)|<1\) for \(z<0\) and it follows that MPRK22(\(\alpha \)) schemes with \(\alpha \le -0.5\) are unconditionally stable, i.e., the stability is independent of \(\Delta t\). Moreover, convergence to the steady state of the corresponding initial value problem is guaranteed as well, whenever the initial value is sufficiently close to the fixed point. The situation is different for \(-0.5<\alpha <0\), for which the schemes are only conditionally stable. For \(-0.5<\alpha <0\) stability requires \(z^*<z<0\) with

$$ z^*= \frac{2 \alpha ^2 - \alpha +2+ \sqrt{4 \alpha ^4+ 4 \alpha ^3 - 3 \alpha ^2 - 12 \alpha +4}}{2 \alpha ^2 - 3 \alpha -2}. $$

As mentioned before, see [26] or Appendix A.2 for details.

Now, we know that MPRK22(\(\alpha \)) schemes with \(\alpha \le -0.5\) are unconditionally stable and converge to the steady state of the corresponding initial value problem, at least when applied to the linear system (4) and the initial value is not too far away from the steady state. As mentioned above, the numerical results in [19,20,21] suggested that this local behavior might actually be the global behavior. But it was observed in [26] and [22, 25] that MPRK22(\(-0.5\)) and MPDeC(8) with equidistant nodes are indeed only locally stable. Such a linear stability behavior is unknown from general linear methods.

The conjecture that this can only occur in the presence of negative RK parameters is supported in Section 3, where we also show that there are further values of \(\alpha \) with \(\alpha <-0.5\) for which the same stability behavior can be observed. Moreover, the experiments with \(\alpha \ge 0.5\), corresponding to non-negative RK parameters, do not show a case for which the stability properties are local.

The above analysis results in the following theorem.

Theorem 2

Let the unique steady state \(\textbf{y}^*\) of the initial value problem (5) with system matrix (4) be positive.

  1. 1.

    The iterates of the MPRK22(\(\alpha \)) scheme with \(-0.5<\alpha <0\) locally converge towards \(\textbf{y}^*\), if \(\Delta t<-\frac{z^*}{a+b}\).

  2. 2.

    The iterates of the MPRK22(\(\alpha \)) scheme with \(\alpha \le -0.5\) locally converge towards \(\textbf{y}^*\) for all \(\Delta t>0\).

As mentioned before, details can be found in [26] and Appendix A.2.

3 Numerical results

In this section, we demonstrate numerically that for some MPRK22(\(\alpha \)) schemes with \(\alpha <0\), the linear stability and convergence to the correct steady state is indeed only given locally, i.e., the initial value must be sufficiently close to the fixed point. To show this, it is already sufficient to consider the linear system

$$\begin{aligned} \textbf{y}' = \left( \begin{array}{cc}-a &{} a\\ a &{} -a\end{array}\right) \textbf{y},\quad a>0 \end{aligned}$$
(10a)

with initial value

$$\begin{aligned} \textbf{y}^0=\frac{1}{2} \begin{pmatrix} 1\\ 1\end{pmatrix} +\delta \begin{pmatrix}\quad 1\\ -1\end{pmatrix},\quad 0\le \delta <\frac{1}{2}, \end{aligned}$$
(10b)

where the restriction on \(\delta \) is necessary to ensure positive initial data. The solution of this initial value problem is

$$ \textbf{y}(t)=\frac{1}{2}\begin{pmatrix}1\\ 1\end{pmatrix}+\delta e^{-2 a t}\begin{pmatrix}\quad 1\\ -1\end{pmatrix} $$

and its steady state is

$$ \textbf{y}^*=\lim _{t\rightarrow \infty } \textbf{y}(t)=\frac{1}{2}\begin{pmatrix}1\\ 1\end{pmatrix} $$

independent of \(\delta \).

The following computations were performed with MATLAB 2023b. The MATLAB code is available from https://github.com/SKopecz/locstabMPRK22.git.

Fig. 1
figure 1

Numerical solutions of the initial value problem (10a) and \(a=20\) computed with MPRK22(\(-0.5\)) and \(\Delta t = 1\) for \(\delta =0.23\) and \(\delta =0.24\)

First, we consider system (10a) with \(a=20\) for which the system is nonstiff. In Fig. 1, we see numerical solutions computed by MPRK22(\(-0.5\)) for two slightly different values of \(\delta \). The rather large time step size \(\Delta t = 1\), which is of course unsuitable for accuracy, was chosen to demonstrate the stability behavior of the scheme. As described in Section 2.3 the MPRK22(\(-0.5\)) scheme is stable and the iterates tend to the steady state of the corresponding initial value problem for all time step sizes, as long as the initial value is close enough to the steady state. This behavior is depicted in Fig. 1a. Now, in Fig. 1b, the value of \(\delta \), i.e., the distance to the steady state, is slightly increased and as a result, the numerical approximations tend to a spurious steady state. As discussed above, we would like to have a linear stability behavior similar to A-stability, i.e., the stability should not depend on the initial values. But here it is demonstrated that MPRK schemes exist for which stability crucially depends on the initial value.

To gain a better insight into the dependence of the stability on \(\delta \), we compute the steady states for \(N=200\) equidistantly spaced samples of \(\delta \) between 0 and 0.5. In each case, the steady state is computed by performing \(M=10^4\) steps of the MPRK22(\(-0.5\)) scheme to obtain \(\textbf{y}^{M}\). To check if the correct or a spurious steady state is approached, we compute the distance

$$\begin{aligned} d(\alpha ,\delta ) = \Vert \textbf{y}^* - \textbf{y}^M\Vert _{\infty }. \end{aligned}$$

We expect \(d(\alpha ,\delta )\ll 1\) if the scheme is stable and tends to the steady state of the corresponding initial value problem and \(d(\alpha ,\delta )\gg 0\) if a spurious steady state is reached. Figure 2a shows a plot of \(d(-0.5,\delta )\) for \(0\le \delta < 0.5\). We see that the stability behavior changes abruptly from stable to unstable for some \(\delta \) between 0.23 and 0.24 as suggested by Fig. 1. If we increase the stiffness of the system by choosing \(a=200\) the critical value of \(\delta \), for which the change from stable to unstable behavior occurs, decreases, as can be observed from Fig. 2b. In this case, the stability behavior changes from stable to unstable for \(\delta \approx 0.06\).

Next, we want to answer the question if \(\alpha =-0.5\) is the only value of \(\alpha \) for which the linear stability of MPRK22(\(\alpha \)) crucially depends on the initial value. To answer this question, we again compute the distance \(d(\alpha ,\delta )\), but this time, we vary both \(\delta \) and \(\alpha \). We use an equidistant grid with 160 samples of \(\delta \) and 241 samples of \(\alpha \) for \(0< \delta < 0.5\) and \(0<|\alpha |\le 2\). Again, we use \(a=200\) in (10a), \(\Delta t=1\) and \(M=10^4\) steps to compute the steady state. The result of this computation can be seen in Fig. 3a, and we note that the MPRK22(\(\alpha \)) scheme is not defined for \(\alpha =0\), which is not indicated in the plot. Based on Fig. 3a, we can make the following statements. First, the expected unstable behavior for \(0<|\alpha |<0.5\), which was discussed in Sections 2.2 and 2.3, is clearly visible. Second, for \(\alpha \ge 0.5\), we observe stable behavior independent of \(\delta \). Therefore, local stability could actually be global stability for \(\alpha \ge 0.5\). Third, for \(\alpha \le -0.5\) there exists an \(\alpha ^*<-0.5\) such that stability of MPRK22(\(\alpha \)) is indeed only local stability, and for \(\alpha <\alpha ^*\) no unstable behavior can be observed. To see this more clearly, Fig. 3b shows a zoom of Fig. 3a with higher resolution for \(-0.6\le \alpha \le -0.5\). As we can see, \(\alpha =-0.5\) is not the only value of \(\alpha \) for which the stability depends on the initial value. The same is true for all \(\alpha \) between \(\alpha ^*\approx -0.56\) and \(-0.5\).

Fig. 2
figure 2

Plots of \(d(-0.5,\delta ) = \Vert \textbf{y}^* - \textbf{y}^M\Vert _{\infty }\) with 200 samples of \(\delta \). The steady state of (10a) is \(\textbf{y}^*=(0.5,0.5)^T\) and \(\textbf{y}^M\) is computed by \(M=10^4\) steps of MPRK22(\(-0.5\)) with \(\Delta t=1\)

Fig. 3
figure 3

Plots of \(d(\alpha ,\delta ) = \Vert \textbf{y}^* - \textbf{y}^M\Vert _{\infty }\) with 160 samples of \(\alpha \) and 241 samples \(\delta \). The steady state of (10a) is \(\textbf{y}^*=0.5(1,1)^T\) and \(\textbf{y}^M\) is computed by \(M=10^4\) steps of MPRK22(\(\alpha \)) with \(\Delta t=1\)

4 Summary and outlook

We have discussed the linear stability behavior of MPRK22(\(\alpha \)) schemes for all \(\alpha \ne 0\) based on the local stability theory of [19, 20]. Moreover, we have confirmed that negative RK parameters in MPRK schemes can lead to linear stability actually being a local property. In particular, we have shown that there are MPRK22(\(\alpha \)) schemes with \(\alpha <-0.5\) that are linearly stable but converge to a spurious fixed point instead of the steady state of the corresponding linear system if the initial value is not sufficiently close to the steady state. Such a linear stability behavior is unknown from general linear methods. We further note that we cannot recommend to use MPRK22(\(\alpha \)) schemes with \(\alpha <0.5\) since apart from the time step size restrictions for \(0<\alpha <0.5\), the stability of these numerical methods shows an artificial dependence on \(\textbf{A}^T\) and \(\textbf{y}^*\) that is not present in the continuous case. In addition, the convergence towards the steady state of the corresponding initial value problem cannot be guaranteed in the case of general linear systems by means of the stability theory from [19, 20], see [22].

Nevertheless, for MPRK22(\(\alpha \)) schemes relevant in practice, i.e., \(\alpha \approx 1\), the parameters of the underlying RK scheme are nonnegative and no restrictions on the initial value could be found numerically. Therefore, for these methods, it still seems that the local linear stability is actually a global linear stability.

Since we would like to have MPRK schemes with properties similar to A-stable general linear methods, it is therefore essential that the convergence to the steady state of the corresponding initial value problem is given for all initial values which satisfy \(\textbf{n}_i^T\textbf{y}^0=\textbf{n}_i^T\textbf{y}^*\), where the vectors \(\textbf{n}_i\) define the independent linear invariants of the system matrix. For this reason, there is a great need for a theory that makes statements not only about local stability but also about global stability.