Full text
mathematics Article Numerical Solution of Stieltjes Differential Equations Francisco J . Fernández †and F. Adrián F. Tojo *,† Instituto de Matemáticas, Universidade de Santiago de Compostela, 15705 Santiago de Compostela, Spain; fjavier[email protected] *Correspondence: [email protected] † These authors contributed equally to this work. Received: 30 July 2020; Accepted: 9 September 2020; Published: 11 September 2020 Abstract: This work is devoted to the obtaining of a new numerical scheme based on quadrature formulae for the Lebesgue–Stieltjes integral for the approximation of Stieltjes ordinary differential equations. This novel method allows us to numerically approximate models based on Stieltjes ordinary differential equations for which no explicit solution is known. We prove several theoretical results related to the consistency, convergence, and stability of the numerical method. We also obtain the explicit solution of the Stieltjes linear ordinary differential equation and use it to validate the numerical method. Finally, we present some numerical results that we have obtained for a realistic population model based on a Stieltjes differential equation and a system of Stieltjes differential equations with several derivators. Keywords: Stieltjes ordinary differential equation; Lebesgue–Stieltjes quadrature formulae; predictor-corrector method MSC: 34A36; 28A25; 65L20; 65L70 1. Introduction In this work, we present a numerical method in order to approximate the solution of a Stieltjes differential equation of the type: x0 g(t) = f(t,x(t)), for galmost every t∈[0, T), x(0) = x0,(1) where x0 g is the Stieltjes derivative with respect to a left-continuous non-decreasing function g . That is, given x:[ 0, T]→R , we define, for each t∈[ 0, T]\Cg , x0 g(t) as the following limit in the case it exists: x0 g(t):= lim s→t x(s)−x(t) g(s)−g(t), if t/∈Dg, x(t+)−x(t) g(t+)−g(t), if t∈Dg, (2) where Dgdenotes the set of discontinuities of g. In this particular case, Dg={s∈R:g(s+)−g(s)>0}, (3) and Cg={s∈R:gis constant on(s−ε,s+ε)for some ε∈R+}. (4) Mathematics 2020,8, 1571; doi:10.3390/math8091571 www.mdpi.com/journal/mathematics
Mathematics 2020,8, 1571 2 of 30 Defining Equation (1) for “ g almost every t∈[ 0, T) ”, we are implicitly considering the Lebesgue–Stieltjes measure space ([ 0, T] , Mg , µg) , where Mg is the σ -algebra and µg the measure constructed in an analogous fashion to the classical Lebesgue measure, where the length of [a , b) is given by µg([a , b)) = g(b)−g(a) . The interested reader may refer to [ 1 ] for details concerning this measure space. The theoretical study of these kinds of derivatives and their applications appears, for instance, in [ 1 – 5 ], but can be traced back in the more general setting of fractional derivatives to [ 6 ]. More recent works in this direction include [7], where the authors studied Ψ-fractional derivatives. As stated in [ 2 ] (Theorem 7.3), in the case g:[ 0, T]→[ 0, ∞) is increasing, left-continuous, and continuous at zero and f:[0, T]×R→Rsatisfies: Hypothesis 1. f(·,x)is g-measurable for every x ∈R; Hypothesis 2. f(· , x0)∈ L1 g([ 0, T)) , where L1 g([ 0, T)) is the space of the equivalence classes of absolutely integrable functions with respect to the g Lebesgue–Stieltjes integral; Hypothesis 3. there exists L∈ L1 g([ 0, T) , [ 0, ∞)) such that for g almost every t∈[ 0, T) and every x , y∈R , we have that: |f(t,x)−f(t,y)| ≤ L(t)|x−y|; (5) Then, Problem (1) has a unique solution in the space BCg([ 0, T]) of bounded g -continuous functions u:[0, T]→R, that is the solution usatisfies, for every t0∈[0, T], ∀e>0, ∃δ>0 : [t∈[0, T],|g(t)−g(t0)|<δ]⇒ |u(t)−u(t0)|<e. (6) BCg([ 0, T]) is a Banach space with the supremum norm—see [ 2 ] (Theorem 3.4). Furthermore, the solution of Problem (1) is the unique fixed point of the operator F:BCg([0, T]) → BCg([0, T]), x→F(x),(7) where given t∈[0, T], F(x)(t) = x0+Z[0,t)f(s,x(s)) dµg; (8) that is, the solution of Problem (1) is such that x(t) = x0+Z[0,t)f(s,x(s)) dµg,∀t∈[0, T]. (9) Furthermore, from [ 2 ] (Lemma 7.2) and [ 1 ] (Theorem 5.4), the solution will belong to the space ACg([ 0, T]) of g -absolutely continuous functions, that is, of those functions u:[ 0, T]→R such that, for every e> 0, there exists δ> 0 satisfying that, if {(an , bn)}n∈N is a collection of pairwise-disjoint open intervals such that N ∑ n=1 |g(bn)−g(an)|<δ, (10) then, N ∑ n=1 |f(bn)−f(an)|<e. (11) It is precisely Expression (9) that motivates the approximation based on the quadrature formulae for the Lebesgue–Stieltjes integral, which we introduce in Section 2. We will see that, in order to obtain
Mathematics 2020,8, 1571 3 of 30 error bounds, it will be necessary to impose additional conditions on the regularity of the function f and the solution of Problem (1). In order to conveniently organize this work, in Section 2, we obtain some numerical quadrature formulae for approximating the Lebesgue–Stieltjes integral. In Section 3, we present a predictor-corrector method based on the quadrature formulae obtained in Section 2. In Section 4, we analyze mathematically the consistency, convergence, and stability of the numerical method derived in Section 3. In order to validate the numerical method, in Section 5, we obtain the explicit solution of the general linear equation of the Stieltjes type. Finally, in Section 6, we present some numerical results that we have obtained for the general linear equation and for realistic population models based on a Stieltjes differential equation. 2. Quadrature Formulae for the Lebesgue–Stieltjes Integral We now introduce some convenient notation. Given an increasing left-continuous function g:[a , b]→R , we define ∆+g:[a , b)→R as ∆+g(t) = g(t+)−g(t) . In the same way, we define ∆−h(t) = h(t−)−h(t) whenever the left limit of h exists at t . Clearly, g is continuous at t0∈[a , b) if and only if ∆+g(t0) = 0. It is important to point out the fact that the interval [a , b] contains its right extremity, implying that the function gis bounded. We have that 0≤∑ t∈[a,b) ∆+g(t)≤g(b)−g(a), (12) so g has a countable number of discontinuities, say those in Dg={dk}k∈Λ , where Λ⊂N . If we define the bounded increasing function gB:[a,b)→[0, +∞)as gB(t) = ∑ s∈[a,t) ∆+g(s) = ∆+g(a)χ(a,b](t) + ∑ k∈Λ ∆+g(dk)χ(dk,b](t), (13) it is clear that gC:[a , b)→R , given by gC(t):=g(t)−gB(t) , is bounded, increasing, and continuous. We say gCis the continuous part of gand gBis the jump part of g. As we mentioned in the previous section, the numerical method we propose to approximate the solution of the differential problem (1) in its integral form (9) will be based on the approximation of the Lebesgue–Stieltjes integral. We start this section by proving a result that will allow us to interpret the integral in (9) in terms of a Kurzweil–Stieltjes integral for which it will be possible to establish quadrature formulae. The Kurzweil–Stieltjes integral generalizes the Lebesgue–Stieltjes integral. On the one hand, it uses the gauge of the Henstock–Kurzweil integral in order to obtain an integral that is more powerful than that of Riemann (in fact, a function is Lebesgue integrable if and only if the function and its absolute value are Henstock–Kurzweil integrable); on the other hand, it uses the Stieltjes distribution function g in order to put a weight in the integral. The reader will find a comprehensive study of the Kurzweil–Stieltjes integral in [8]. Lemma 1. Let g :[a,b]→[0, ∞)be an increasing left-continuous function and f ∈ L1 g([a,b)). Then, Z[a,b)fdµg=Zb af(s)dg(s) = Zb af(s)dgC(s) + ∑ s∈[a,b) f(s)∆+g(s), (14) where on the right-hand side, we consider a Kurzweil–Stieltjes integral. Furthermore, if {dk}k∈Λ is the set of discontinuities of g in (a,b), we have that Z[a,b)fdµg=Zb af(s)dgC(s) + f(a)∆+g(a) + ∑ k∈Λ f(dk)∆+g(dk). (15)
Mathematics 2020,8, 1571 4 of 30 Proof. This lemma is an immediate consequence of [ 8 ] (Theorems 6.12.3 and 6.3.13). That is, since f is Lebesgue–Stieltjes integrable, by [ 8 ] (Theorem 6.12.3), it is Kurzweil–Stieltjes integrable as well, and furthermore, Z[a,b)fdµg=Z{a}fdµg+Z(a,b)fdµg, Z(a,b)fdµg=Zb af(s)dg(s)−f(a)∆+g(a)−f(b)∆−g(b).(16) Now, due to the fact that g is left-continuous, ∆−g(b) = 0, and since µg({a}) = ∆+g(a) , we obtain: Z[a,b)fdµg=Zb af(s)dg(s). (17) Finally, by [8] (Theorem 6.3.13), Zb af(s)dg(s) = Zb af(s)dgC(s) + f(a)∆+g(a) + f(b)∆g−(b) + ∑ k∈Λ f(dk)∆g(dk).(18) Since g is left-continuous, we have, in particular, that ∆−g(b) = ∆−g(dk) = 0 for every k∈N , and the desired result follows. In Lemma 2, we will see that, under certain regularity hypotheses on f and g , we can obtain error estimates for the quadrature formula for a point and the trapeze formula. Lemma 2. Let us assume f∈BV([a , b]) ∩ L1 g([a , b)) and g:[a , b]→[ 0, ∞) is increasing and left-continuous. Furthermore, assume gCis p-H-Hölder on [a,b], that is, |gC(x)−gC(y)| ≤ H|x−y|p,∀x,y∈[a,b], (19) where H >0and p ∈(0,1]. Then, f(a)(gC(b)−gC(a)) + ∑ s∈[a,b) f(s)∆+g(s)−Z[a,b)fdµg≤H(b−a)pVarb af(20) and f(a) + f(b) 2(gC(b)−gC(a)) + ∑ s∈[a,b) f(s)∆+g(s)−Z[a,b)fdµg≤Hb−a 2p Varb af. (21) Remark 1. The previous quadrature formulae are most interesting in those cases where Dg is finite, since in that case, the sums involved become finite. Proof. Thanks to Lemma 1, it is enough to show that, if gC is p - H -Hölder on [a , b] and f∈BV([a , b]) , then f(a)(gC(b)−gC(a)) −Zb af(s)dgC(s)≤H(b−a)pVarb af, (22) and f(a) + f(b) 2(gC(b)−gC(a)) −Zb af(s)dgC(s)≤Hb−a 2p Varb af. (23)
Mathematics 2020,8, 1571 5 of 30 Indeed, we can adapt the techniques in [ 9 ] for the Riemann–Stieltjes integral to the case of the Kurzweil–Stieltjes’. On the one hand, by [ 8 ] (Theorem 6.3.6), given that h:[a , b]→R is continuous and f∈BV([a,b]), it holds that Zb ah(s)df(s)≤ khkVarb af. (24) On the other, thanks to [8] (Theorem 6.4.2) (integration by parts), Zb agC(s)−gC(a) + gC(b) 2df(s) = −Zb af(s)dgC(s) + gC(x)−gC(a) + gC(b) 2f(x) b a +∑ a≤x≤b∆f−(x)∆−gC(x)−∆+f(x)∆+gC(x), (25) from which, given that gCis continuous, Zb agC(s)−gC(a) + gC(b) 2df(s) = −Zb af(s)dgC(s) + f(a) + f(b) 2(gC(b)−gC(a)).(26) In particular, f(a) + f(b) 2(gC(b)−gC(a)) −Zb af(s)dgC(s)≤Zb agC(s)−gC(a) + gC(b) 2df(s).(27) Let us define h:t∈[a,b]→h(t)as h(t) = gC(t)−gC(a) + gC(b) 2. (28) We have that |h(t)| ≤ gC(t)−gC(a) + gC(t)−gC(b) 2 ≤1 2|gC(t)−gC(a)|+1 2|gC(b)−gC(t)| ≤1 2H[(t−a)p+ (b−t)p]≤Hb−a 2p , (29) for every t∈[a , b] . Then, thanks to the bound (24), we obtain the bound (23). In order to prove (22), we can proceed in an analogous fashion by integrating by parts Zb ahgC(s)−gC(b)idf(s) = −Zb af(s)dgC(s) + hgC(x)−gC(b)if(x)b a,(30) where we have already canceled out the terms concerning the sum. From the previous expression, we obtain f(a)(gC(b)−gC(a)) −Zb af(s)dgC(s)≤Zb a[gC(s)−gc(b)] df(s)≤H(b−a)pVarb af. (31) As we will see later on, it will be of special interest to consider the case when Df⊂Dg and fC behaves in a similar way to gC . In such a case, we can sharpen the previous quadrature formulae to obtain Lemma 5. Definition 1. Let f:[a , b]→R and g:[a , b]→R be left-continuous and increasing. We say f is g -Lipschitz continuous with Lipschitz constant H if |f(t)−f(s)| ≤ H|g(t)−g(s)|for every t,s∈[a,b].
Mathematics 2020,8, 1571 6 of 30 Lemma 3. Let g:[a , b]→R be left-continuous and increasing f:[a , b]→Rg -Lipschitz continuous. Then, f is g-continuous, bounded, g-integrable, and of bounded variation. Proof. It is clear that f is g -continuous. Since g is bounded and |f(t)−f(s)| ≤ H|g(t)−g(s)| for every t,s∈[a,b],fis bounded as well. The g -integrability is a straightforward consequence of the definition of the Riemann–Stieltjes integral and the fact that f is g -continuous. Finally, Varb af≤HVarb ag=H(g(b)−g(a)) , so f is of bounded variation. Corollary 1. Let g:[a , b]→R be left-continuous and increasing with gC being p - H -Hölder on [a , b] . Let f :[a,b]→Rbe g-Lipschitz continuous with Lipschitz constant H. Then, f(a)(gC(b)−gC(a)) −Zb af(s)dgC(s)≤H2(b−a)p(g(b)−g(a)),(32) f(a) + f(b) 2(gC(b)−gC(a)) −Zb af(s)dgC(s)≤H2b−a 2p (g(b)−g(a)).(33) The error estimates obtained in the previous formulae are not enough for our proposes, that is proving the convergence of the numerical approximation to the solution of Problem (1). In order to improve the previous estimations, we must add some extra requirements to the continuous part of functions gand f. In the next lemma and corollary, we will prove that if f is a g -Lipschitz continuous function, some properties of gC and gB are transferred to fC and fB , respectively. In particular, we will see that f is a g -Lipschitz continuous function and gC is Lipschitz continuous, then fC is also Lipschitz continuous. This property will be fundamental in order to improve the previous quadrature formula. For the next lemma, we denote by C(X) the set of connected components (in the usual topology) of X⊂R. Lemma 4. Let g:[a , b]→R be left-continuous in (a , b) and increasing and f:[a , b]→R be g -Lipschitz continuous with Lipschitz constant H . Then, fB is gB -Lipschitz continuous with Lipschitz constant H . Furthermore, if f is increasing, then f Cis gC-Lipschitz continuous with Lipschitz constant H. Proof. Let t∈[a,b),s∈(x,b). Then, |fB(s)−fB(t)|≤|f(s)−f(t)|+|fC(s)−fC(t)| ≤ H(g(s)−g(t)) + |fC(s)−fC(t)|. (34) Thus, taking the limit when stends to tfrom the right, |∆+f(t)|=|∆+fB(t)| ≤ H∆+g(t) = H∆+gB(t). (35) Hence, for t∈[a,b),s∈(x,b), |fB(t)−fB(s)|=∑ r∈[t,s) ∆+f(r)≤∑ r∈[t,s)∆+f(r)≤∑ r∈[t,s) H∆+g(r) = H(gB(s)−gB(t)). (36) Therefore, fBis gB-Lipschitz and g-Lipschitz with constant H. We know that ∑t∈[a,b)∆+g(t)<∞ . This implies, on the one hand, that Dg={tn}n∈Λ with Λ⊂N is countable and, on the other, that ∆+g(tn)→ 0. Observe that g is continuous at b , and either g is continuous at a or a=tk for some k∈Λ . In this last case, we will assume, without loss of generality, that a=t1.
Mathematics 2020,8, 1571 7 of 30 Thus, consider, for n∈N, the functions fn(t):=f(t)−∑ k≤n k∈Λ ∆+f(tk)χ(tk,b](t) = fC(t) + ∑ k>n k∈Λ ∆+f(tk)χ(tk,b](t), gn(t):=g(t)−∑ k≤n k∈Λ ∆+g(tk)χ(tk,b](t) = gC(t)−∑ k>n k∈Λ ∆+g(tk)χ(tk,b](t).(37) Given A∈C([a , b]\{tk}n k=1) (that is, an interval that is a connected component of [a , b]\{tk}n k=1) ) and t , s∈A , t<s , since there are no jumps of {tk}n k=1 in [t , s] , f(s)−f(t) = fn(s)−fn(t) and g(s)−g(t) = gn(s)−gn(t), so |fn(s)−fn(t)| ≤ H|gn(s)−gn(t)|. Define, for t,s∈[a,b],t≤s, Fn(t,s):=H(gn(s)−gn(t)) −(fn(s)−fn(t)). (38) Since Fn(t , s)≥ 0 for every t , s∈A and fn and gn are continuous at the points of ∂A , it also holds for t , s∈A . Furthermore, Fn(t , x) + Fn(x , s) = Fn(t , s) . Hence, if Fn(t , s)≥ 0 for t , s∈[α , β] and t , s∈[β , γ] , then Fn(t , s)≥ 0 for t , s∈[α , γ] . To see this, just observe that if t∈[α , β] and s∈[β , γ] , we consider Fn(t,s) = Fn(t,β) + Fn(β,s)≥0. Now, for any t , s∈[a , b] , t<s , either [t , s]∩ {tk}n k=1=∅ ; thus, Fn(t , s)≥ 0, or [t , s]∩ {tk}n k=1= {tk}q k=p, and Fn(t,s) = Fn(t,tp) + Fn(tp,tp+1) + · · · +Fn(tq−1,tq) + Fn(tq,t)≥0. (39) We conclude that Fn≥0. Observe now that fn converges uniformly to fC and gn converges uniformly to gC , so Fn converges uniformly to F(t,s):=H(gC(s)−gC(t)) −(fC(s)−fC(t)). (40) Since Fn≥ 0 for every n∈N , F≥ 0, and thus, fC is gC -Lipschitz continuous with Lipschitz constant H. Corollary 2. Let g:[a , b]→R be left-continuous in (a , b) and increasing and f:[a , b]→R be g -Lipschitz continuous with Lipschitz constant H. Then, f Cis gC-Lipschitz continuous with Lipschitz constant H. Proof. Since f is g -Lipschitz continuous, it is g -absolutely continuous and, by [ 1 ] (Theorem 5.4), there exists f0 gµg -a.e. and f(t) = R[a,t)f0 g(s)dµg(s) . Since f is g -Lipschitz continuous with Lipschitz constant H, for s>t, Z[t,s)f0 g(r)dµg(r)=|f(s)−f(t)| ≤ H(g(s)−g(t)). (41) Thus, by the definition of the Stieltjes g-derivative, |f0 g| ≤ Hµg-a.e. Let P= (f0 g)−1(R+)and N= [a,b]\P. Define: f1(t) = Z[a,t)∩Pf0 g(s)dµg(s),f2(t) = −Z[a,t)∩Nf0 g(s)dµg(s). (42) Clearly, both f1 and f2 are g -Lipschitz continuous with Lipschitz constant H and increasing, so fC 1 and fC 2 are gC -Lipschitz with Lipschitz constant H . Thus, fC=fC 1−fC 2 is g -Lipschitz with Lipschitz constant H.
Mathematics 2020,8, 1571 8 of 30 Corollary 3. Let g:[a , b]→R be continuous in {a , b} , left-continuous in (a , b) , and increasing and f:[a , b]→R be g -Lipschitz continuous with Lipschitz constant H . If gC is Lipschitz continuous with Lipschitz constant H, then f Cis Lipschitz continuous with Lipschitz constant H2. Proof. This is a direct consequence of the previous corollary since for all s,t∈[a,b] |fC(s)−fC(t)| ≤ H|gC(s)−gC(t)| ≤ H2|s−t|. (43) In order to simplify the notation, from now on, we will assume, when necessary, that both the continuous part of f and the continuous part of g are Lipschitz continuous with the same Lipschitz constant H(if necessary, we redefine Hto be max{H,H2}). Lemma 5. Let g:[a , b]→R be left-continuous and increasing and f:[a , b]→R be g -Lipschitz continuous with Lipschitz constant H . We also assume that fC and gC are Lipschitz continuous with Lipschitz constant H. Then, fC(a)(gC(b)−gC(a)) + ∑ s∈[a,b)hf(s)∆+g(s) + ∆+f(s)(gC(b)−gC(s))i−Z[a,b)fdµg =fC(a)(gC(b)−gC(a)) + f(a)∆+g(a) + ∆+f(a)(gC(b)−gC(a)) +∑ k∈Λhf(dk)∆+g(dk) + ∆+f(dk)(gC(b)−gC(dk))i−Z[a,b)fdµg ≤H2(b−a)2, (44) and fC(a) + fC(b) 2(gC(b)−gC(a)) +∑ s∈[a,b)hf(s)∆+g(s) + ∆+f(s)(gC(b)−gC(s))i−Z[a,b)fdµg = fC(a) + fC(b) 2(gC(b)−gC(a)) + f(a)∆+g(a) + ∆+f(a)(gC(b)−gC(a)) +∑ k∈Λhf(dk)∆+g(dk) + ∆+f(dk)(gC(b)−gC(dk))i−Z[a,b)fdµg ≤H2 2(b−a)2, (45) where {dk}k∈Λis the set of discontinuities of g in (a,b). Proof. First observe that, since f is g -continuous, Df⊂Dg —see [ 2 ] (Proposition 3.2). Separating the jump part from the continuous part in both fand g, we have that: Zb af(s)dg(s) = Zb afB(s)dgB(s) + Zb afB(s)dgC(s) + Zb afC(s)dgB(s) + Zb afC(s)dgC(s), (46)
Mathematics 2020,8, 1571 9 of 30 where the three first integrals correspond to series and the fourth can be approximated using the previous quadrature formulae. Indeed, using analogous reasoning as that in [8] (Theorems 6.3.12 and 6.3.13): Zb afB(s)dgB(s) = fB(a)∆+g(a) + ∑ k∈Λ fB(dk)∆+g(dk) Zb afB(s)dgC(s) = ∆+f(a)(gC(b)−gC(a)) + ∑ k∈Λ ∆+f(dk)(gC(b)−gC(dk)), Zb afC(s)dgB(s) = fC(a)∆+g(a) + ∑ k∈Λ fC(dk)∆+g(dk). (47) Taking that into account, Zb af(s)dg(s) = f(a)∆+g(a) + ∑ k∈Λ f(dk)∆+g(dk) + ∆+f(a)(gC(b)−gC(a)) +∑ k∈Λ ∆+f(dk)(gC(b)−gC(dk)) + Zb afC(s)dgC(s). (48) Now, using the same argumentation as before, fC(a) + fC(b) 2(gC(b)−gC(a)) −Zb afC(s)dgC(s)≤H2 2(b−a)2, (49) since Varb afC≤H(b−a). The proof of identity (44) is analogous. 3. Description of the Numerical Method In this section, we present a predictor-corrector method based on the previous quadrature formulae. We will assume g:[ 0, T]→R is continuous at t0= 0 and that Dg is finite. Let x∈ BCg([ 0, T]) be a solution of problem (1), and in what follows, let f∗(x)(t):=f(t,x(t)), fB ∗(x)(t):=∑ s∈[a,t) ∆+f∗(x)(s), fC ∗(x)(t):=f∗(x)(t)−fB ∗(x)(t). (50) Consider now a set {tk}N+1 k=0⊂[0, T]satisfying: Hypothesis 4. t0= 0and tN+1=T ; tk+1−tk=h> 0, for every k= 0, . . . , N and Dg⊂ {tk}N+1 k=0 . We denote this by K1=max{∆+g(d):d∈Dg}. Hypothesis 5. f∗(x) is g -continuous, and in particular, Df∗(x)⊂Dg and fC ∗(x) and gC are Lipschitz-continuous with the same Lipschitz constant H. Hypothesis 6. f(·,c)∈ BCg([0, T]), for every c ∈R. Let us define xk:=x(tk) and x+ k:=x(t+ k) , for k= 0, . . . , N+ 1. By the definition of the Stieltjes derivative, x+ k=xk+∆+g(tk)f∗(x)(tk), (51) and in the particular case tk6∈ Dg , ∆+g(tk) = 0, so we have that x+ k=xk . Then, for every k= 0, . . . , N+1, xk+1=xk+Z[tk,tk+1)f∗(x)(s)dg(s), (52)
Mathematics 2020,8, 1571 16 of 30 Furthermore, we get the following error bounds: |u∗ j−x∗(tj)| ≤ h1+G5χDg(tj)i[1+G2]#Dg|e0|+hτ/h G1exp G1 htj+G4, |u+ j−x(t+ j)| ≤ h1+G3χDg(tj)i[1+G2]#Dg|e0|+hτ/h G1exp G1 htj, |uj−x(tj)| ≤ [1+G2]#Dg|e0|+hτ/h G1exp G1 htj, (84) for every j =1, . . . , N+1, where G3=K1K2, G4=K3Hh, G5=G3(1+G4). (85) Proof. We analyze each case separately. •Errors associated with the corrector. From the previous lemma: |en+1| ≤ [1+G2]#Dg|e0|+hτ/h G1exp G1 h(n+1)h, (86) where τ/h G1=H2+K2H3h K2H+K3H+K2 3H2h−→ H2 K2H+K3H>0, G1 h=1 2K2H+1 2K3H+1 2K2 3H2h−→ 1 2K2H+1 2K3H>0, (87) when h→0. Hence, given tj∈[0, T], we get |uj−x(tj)| ≤ [1+G2]#Dg|e0|+hτ/h G1exp G1 htj. (88) Then, given that |e0|= 0, we have the convergence of the corrector to the solution of the problem: lim h→0uj=x(tj). (89) • Errors associated with the predictor: Using the bounds in Lemmas 7and 5, we have that, given tj∈[0, T], |u∗ j−x∗(tj)| ≤ h1+K3Hh + (1+K3Hh)K1K2χDg(tj)i|ej| ≤h1+G5χDg(tj)iexp(G4)|ej| ≤h1+G5χDg(tj)i[1+G2]#Dg|e0|+hτ/h G1exp G1 htj+G4, (90) from which we obtain the convergence. • Errors associated with the right limit: Using the bounds in Lemmas 7and 5, we have that, given tj∈[0, T], |u+ j−x(t+ j)| ≤ h1+G3χDg(tj)i[1+G2]#Dg|e0|+hτ/h G1exp G1 htj. (91) We obtain the same kind of convergence as in the previous case. It is worth noting that, in the case tj/∈Dg, the error associated with the right limit coincides with the error of the predictor.
Mathematics 2020,8, 1571 17 of 30 Remark 5. Observe that the order of convergence of the method equals the order of τ minus one, that is of the order of e τ . In the case that we deal with functions with extra regularity, we may be able to improve the order of τ , which would better the order of convergence of the numerical method. Last, we would like to mention that the method we presented generalizes the classical order two Runge–Kutta. This assertion is motivated by the fact that the usual derivative is a particular instance of the Stieltjes derivative in the case g(x) = x. Last, we analyze the stability of the method with the intention of evaluating its sensitivity towards the perturbations generated by the rounding errors produced while evaluating the different elements of Scheme (58). We omit the proof of the following result, as it is essentially a modification of that of Theorem 1. Theorem 2 (Stability of the numerical method) . Given b u0 , we consider the following modification of the numerical scheme (58): b u+ k=b uk+f(tk,b uk)∆+g(tk) + b ρ+ k, b u∗ k+1=b u+ k+f(tk,b u+ k)(g(tk+1)−g(t+ k)) + b ρ∗ k+1, b uk+1=b u+ k+1 2f(tk,b u+ k) + f(tk+1,b u∗ k+1)(g(tk+1)−g(t+ k)) + b ρk+1, (92) where k =0, . . . , N. Defining bek=b uk−x(tk), for k =1, . . . , N+1, it holds that |bek+1| ≤ h1+G1+G2χDg(tn)i|ben|+|τk+1|+|b ρk+1|+G1|b ρ+ k|+G6|b ρ∗ k+1|, (93) where G6=1 2K2Hh. (94) Then, writing b ρ:=max{|b ρk|:k= 1, . . . , N+ 1 } , b ρ∗=max{|b ρ∗ k|:k= 1, . . . , N+ 1 } , and b ρ+=max{|b ρ+ k|:k=0, . . . , N}, we have that, for every tj∈[0, T], |b uj−x(tj)| ≤ [1+G2]#Dg |e0|+h τ h+b ρ h+G1b ρ+ h+G6b ρ∗ h G1 exp G1 htj. (95) 5. The General Linear Equation In order to validate the numerical approximation of the solution of Problem (1) , we will consider the following general linear equation as a test problem: x0 g(t) + d(t)x(t) =h(t),t∈[0, T), x(0) =x0,(96) where x0∈R,h,d∈L1 g([0, T)) and d(t)∆+g(t)6=1∀t∈[a,b)∩Dg, (97) ∑ t∈[a,b)∩Dgln 1−d(t)∆+g(t)<∞. (98)
Mathematics 2020,8, 1571 18 of 30 Under (97) and (98) , we know there is a unique solution of (96) , which can be computed explicitly—see [2]—as the unique solution of the problem x0 g(t) + e d(t)x(t+) =eh(t),t∈[0, T), x(0) =x0,(99) where e d(t):=d(t) 1−d(t)∆+g(t), (100) eh(t):=h(t) 1−d(t)∆+g(t), (101) are L1 g([ 0, T)) functions thanks to [ 2 ] (Proposition 6.8). Therefore, by [ 2 ] (Proposition 6.7), the solution of Problem (99) is given by x(t):=be−1 e d(t)x0+Z[0,t)bee d(s)eh(s)dµg(s), (102) where given an element c∈L1 g([0, T)), bec(t):= exp Z[0,t)b c(s)dµg(s),t∈[0, s1], (−1)kexp Z[0,t)b c(s)dµg(s),t∈[sk,sk+1],k=1, . . . , N, (103) b c(t):= c(t)t∈[0, T]\Dg, ln |1+c(t)∆+g(t)| ∆+g(t),t∈[0, T)∩Dg,(104) {s1 , . . . , sN}={t∈[ 0, T)∩Dg: 1 +c(t)∆+g(t)< 0 } being the set of points such that 1 +c(t)∆+g(t)< 0 and sN+1=T . This set has finite cardinality—see [ 2 ] (Lemma 6.4). In our case, c=e d; thus, 1+e d(t)∆+g(t) = 1+d(t)∆+g(t) 1−d(t)∆+g(t)=1 1−d(t)∆+g(t)<0 (105) if and only if 1 <d(t)∆+g(t). We will still denote by {s1, . . . , sN}={t∈[0, T)∩Dg: 1 −d(t)∆+g(t)<0}(106) and sN+1=T, so be d(t) = e d(t) = d(t),t∈[0, T]\Dg, ln |1+e d(t)∆+g(t)| ∆+g(t)=−ln |1−d(t)∆+g(t)| ∆+g(t),t∈[0, T)∩Dg.(107) As we can see above, the general expression of the exponential bee d(t) , and therefore, of the solution of the general linear Equation (102), has a convoluted statement. This expression can be simplified if
Mathematics 2020,8, 1571 19 of 30 we consider the particular case where d is constant and d∆+g(t)< 1, ∀t∈[a , b)∩Dg —the case that we will consider in the numerical experiments. In that case, bee d(t) = exp(dg(t)) exp −∑ s∈[0,t)∩Dg d∆+g(s) + ln |1−d∆+g(s)| =exp(dg(t)) ∏ s∈[0,t)∩Dg exp(d∆+g(s)) |1−d∆+g(s)| −1 . (108) It is also remarkable that, in the case of g(t) = t , we recover the classical exponential. Furthermore, we have the following direct result for the problem with constant coefficients. Theorem 3. Let g:[ 0, T]→R be increasing, left-continuous, and such that g( 0 ) = 0; x0∈R , h∈R , and d∈Rsuch that d∆+g(t)<1∀t∈[a,b)∩Dg, (109) ∑ t∈[a,b)∩Dgln(1−d∆+g(t))<∞. (110) Then, the solution of the problem x0 g(t) + dx(t) =h,t∈[0, T), x(0) =x0,(111) is given by the following expression: x(t) =x0exp(−dg(t)) ∏ s∈[0,t)∩Dg exp(d∆+g(s)) (1−d∆+g(s)) +hZ[0,t)exp(d(g(s)−g(t))) ∏ u∈(s,t)∩Dg exp(d∆+g(u))(1−d∆+g(u)) dµg(s). (112) If we assume that the set of discontinuities of function g is finite and we consider a time discretization {tk}N+1 k=0⊂[ 0, T] satisfying hypothesis (H4) with d∆+g(t)< 1, ∀t∈[a , b)∩Dg , then the condition ∑t∈[a,b)∩Dg|ln (1−d∆+g(t))|<∞ is trivially satisfied. Therefore, we have the following corollary for the homogenous case. The proof is straightforward. Corollary 6. Let g:[ 0, T]→R be increasing and left-continuous, such that g( 0 ) = 0with a set of discontinuity points that we can assume equal to the discretization points, that is Dg={t1 , . . . , tN} ⊂ ( 0, T) , where tk<tk+1for k =1, . . . , N−1. Then, the solution of the problem x0 g(t) + dx(t) =0, t∈[0, T), x(0) =x0,(113)
Mathematics 2020,8, 1571 20 of 30 where x0,d∈Rand d∆+g(t)<1,∀t∈[a,b)∩Dg, is given by: x(t) = x0exp(−dg(t)) 1, t∈[0, t1], n ∏ k=1 (1−d∆+g(tk)) exp(d∆+g(tk)),t∈(tn,tn+1];n=1, . . . , N−1, N ∏ k=1 (1−d∆+g(tk)) exp(d∆+g(tk)),t∈(tN,T]. (114) Finally, it is remarkable that, in the previous corollary, we can change the hypothesis d∆+g(t)< 1, ∀t∈[a , b)∩Dg by d∆+g(t)6= 1, ∀t∈[a , b)∩Dg , and obtain a similar expression for the solution taking into account the general Formula (102). The last hypothesis is more general than the previous one, but in order to present the results in a clear way, we will assume that the first hypothesis is fulfilled. 6. Numerical Simulations In this section we will present some numerical results that we reached using the scheme (58) for approximating the solution of the homogeneous linear Equation (113) with constant coefficients. We will also compare the numerical solution with the explicit solution (113) that we obtained in the previous section. To test the robustness of the method, we will use the numerical scheme to approximate the solution of a silkworm population model based on the example presented in [ 3 ]. Finally, we approximate the solution of a system of Stieltjes differential equations with several derivators related to a fish population model subject to fishing with open and closed seasons—cf. [ 12 ]. All numerical simulations were performed using MATLAB 2019b software on a 2.4 GHz Intel Core i5 CPU with 8 GB of RAM. 6.1. Approximation of the General Linear Equation In order to validate the scheme (58) for different numbers of discontinuities in the derivator g (the main difficulty of the problem), we will consider an increasing regular continuous part gC , and we will obtain several g test functions adding to the previous one the jump part gB associated with several choices of jumps. We consider the following function: ϕ:x∈R→ϕ(x) = 0, x≤0, h1+exp −2αtan π 2(2x−1)i−1,x∈(0,1), 1, x≥1, (115) where α> 0. We have that ϕ is an increasing C∞(R) function, and we can use it to construct a more sophisticated increasing function gC that will be constant in some intervals. For instance, for α= 4, we can consider the following function gC in the time interval [ 0,10 ] and, from it, build the derivator g by adding the jump function gB. In Figure 1a, we observe that we have concatenated three times the function ϕ , and in order to obtain the derivator function g , we added four jumps at the times ˜ tk= 2 k , k= 1,2, 3, with ∆+g(˜ tk) = 1. In Figure 2a, we plot the solution for d=− 0.5 and in Figure 2b the solution for d= 0.5. As we can see in both figures, we have inactivity periods where the function g is constant and impulses at the times where the function gpresents discontinuities.
Mathematics 2020,8, 1571 21 of 30 (a) Continuous part gC. (b) Derivator g. Figure 1. Example of continuous part gC and derivator g (vertical lines have to be understood as jumps and not as a multivalued function). (a) Solution for d=−0.5. (b) Solution for d=0.5. Figure 2. Explicit solution for different values of d and x0= 1 (vertical lines represent jumps in the solution). We summarize the results obtained for different values of time step h taking x0= 1, d=− 0.5, and for different values of # Dg , with ∆+g(s) = 1, ∀s∈Dg . CPU times were calculated by averaging the CPU times of ten simulations in order to minimize the influence that other processes may have on the measurement. From the Table 1, we can observe that numerical errors grow as the number of discontinuities in the derivator increases. This behavior is consistent with the error bounds obtained in Theorem 1in which the term [ 1 +G2]#Dg appears by multiplying the error expressions. In Figure 3a, we can observe the error evolution for the predictor and, in Figure 3b, the error evolution for the corrector. We realize that the global behavior in terms of h for the predictor is O(h) and O(h2) for the corrector. This improvement in the order of convergence with respect to the one predicted in theory is a consequence of the fact that, thanks to the regularity of the solution, the trapezoidal formula is more accurate.
Mathematics 2020,8, 1571 22 of 30 (a) Predictor error in log10 −log 10 scale. (b) Corrector error in log10 −log 10 scale. Figure 3. Evolution of the global error. Finally, in Figure 4a, we can see the exact solution and the predictor for # Dg= 2 using as the time step h= 1 × 10 −1 and, in Figure 4b, h= 1 × 10 −5 . In Figure 4c,d, we have the analogous graphical representations for #Dg=4. 11 -Exact solution 10 oCorrector 9 8 7 6 5 4 3 2 1 1 Exact solution vs approximate solution 2 3 4 5 Time 6 7 8 9 10 (a)h=1×10−1. . 11 Exact solution vs approximate solution ,--------,------,-----------,-------,----------,---------,----r----------r-------r--- -Exact solution 10 oCorrector 9 8 7 6 > 5 4 3 2 1 1 2 3 4 5 6 7 8 9 10 Time (b)h=1×10−5. . OO. <l.) Exact solution vs approximate solution 25r----------,------,-------,-------c----------,--------,-----,----------r------r---- 20 15 10 5 -Exact solution oCorrector o�-�--�-�--�-�--�-�--�-�-� 1 2 3 4 5 Time 6 7 8 9 10 (c)h=1×10−1. 25 20 - 15 - 10 - 5- o o Exact solution vs approximate solution 1 -Exact solution oCorrector 1 1 1 1 2 3 1 1 4 1 1 5 Time 1 1 1 1 1 1 6 7 8 1 ' - j- - - 1 9 10 (d)h=1×10−5. Figure 4. Exact solution (continuous line; vertical lines have to be understood as jumps and not as a multivalued function) vs. approximate solution (circles).
Mathematics 2020,8, 1571 23 of 30 Table 1. Numerical results (linear equation). #Dg=2h=1×10−1h=1×10−2h=1×10−3h=1×10−4h=1×10−5 max{|e∗ n|} 1.1704 ×10−11.2136 ×10−31.2100 ×10−51.2095 ×10−71.2108 ×10−9 max{|en|} 3.1399 ×10−23.3911 ×10−43.4002 ×10−63.4010 ×10−83.4173 ×10−10 max{|e+ n|} 1.2573 ×10−21.3697 ×10−41.3747 ×10−61.3752 ×10−81.3830 ×10−10 CPU time (s) 4.6389 ×10−34.9582 ×10−33.0678 ×10−22.5494 ×10−12.5286 #Dg=4h=1×10−1h=1×10−2h=1×10−3h=1×10−4h=1×10−5 max{|e∗ n|} 2.6454 ×10−12.7321 ×10−32.7226 ×10−52.7213 ×10−72.7202 ×10−9 max{|en|} 7.2094 ×10−27.6469 ×10−47.6522 ×10−67.6523 ×10−87.6426 ×10−10 max{|e+ n|} 2.9167 ×10−23.0921 ×10−43.0942 ×10−63.0942 ×10−83.0848 ×10−10 CPU time (s) 6.7250 ×10−44.6041 ×10−33.0166 ×10−22.6026 ×10−12.5868 #Dg=6h=1×10−1h=1×10−2h=1×10−3h=1×10−4h=1×10−5 max{|e∗ n|} 6.1870 ×10−16.3567 ×10−36.3285 ×10−56.3250 ×10−76.3250 ×10−9 max{|en|} 1.9034 ×10−11.9793 ×10−31.9749 ×10−51.9744 ×10−71.9764 ×10−9 max{|e+ n|} 8.2704 ×10−28.5267 ×10−48.4975 ×10−68.4941 ×10−88.4977 ×10−10 CPU time (s) 5.5394 ×10−45.0374 ×10−32.7825 ×10−22.4119 ×10−12.3776 #Dg=8h=1×10−1h=1×10−2h=1×10−3h=1×10−4h=1×10−5 max{|e∗ n|} 1.3225 1.3563 ×10−21.3510 ×10−41.3503 ×10−61.3500 ×10−8 max{|en|} 3.4486 ×10−13.5400 ×10−33.5324 ×10−53.5315 ×10−73.5304 ×10−9 max{|e+ n|} 1.3545 ×10−11.3644 ×10−31.3593 ×10−51.3587 ×10−71.3521 ×10−9 CPU time (s) 6.3951 ×10−46.7992 ×10−33.3511 ×10−22.9354 ×10−12.9139 #Dg=10 h=1×10−1h=1×10−2h=1×10−3h=1×10−4h=1×10−5 max{|e∗ n|} 2.9049 2.9828 ×10−22.9723 ×10−42.9708 ×10−62.9703 ×10−8 max{|en|} 6.9124 ×10−17.1152 ×10−37.1039 ×10−57.1025 ×10−77.1110 ×10−9 max{|e+ n|} 2.5333 ×10−12.5546 ×10−32.5465 ×10−52.5456 ×10−72.5464 ×10−9 CPU time (s) 7.9193 ×10−48.5142 ×10−33.8993 ×10−23.4839 ×10−13.4483 6.2. Approximation of a Silkworm Population Model We present in this section the numerical approximation of a realistic case that corresponds to a silkworm population model based on the example presented in [ 3 ], which we will briefly summarize for the convenience of the reader. In this example, the authors considered that the life cycle of silkworms
Mathematics 2020,8, 1571 24 of 30 has three stages: worm, cocoon, and moth. Moths lay eggs and die soon after, then eggs hatch and produce a completely new colony of silkworms. Stage Time Intervals Worms (5k,5k+2],k=0, 1, 2, . . . Cocoons (5k+2,5k+3],k=0, 1,2, . . . Moths (5k+3,5k+4],k=0, 1,2, . . . Eggs (5k+4,5k+5],k=0, 1,2, . . . (116) In order to take into account the previous behavior, they considered the following derivator g:[0, ∞)→R: g(t) = 1 2p4t−t2, if 0 ⩽t⩽2, 1, if 2 <t⩽3, 2−p6t−t2−8, if 3 <t⩽4, 3, if 4 <t⩽5, 4+g(t−5), if 5 >t, (117) and they solved the following Stieltjes equation: x0 g(t) = f(t,x(t),x),t∈(0, ∞)\Dg, x(0) = x0.(118) where f:[0, T]\Cg×R×L1 loc(R)→Ris such that f(t,x,ϕ) = −cx, if t∈(5k,5k+4),k=0,1,2, . . . −x, if t=5k+4, k=0,1, 2,. . . λZt−1 t−5ϕ(s)ds, if t=5(k+1),k=0,1, 2,. . . (119) with c> 0, λ> 0. In [ 3 ] (Proposition 5.1), the authors obtained the explicit solution of the previous model: x(t) = x0exp(−cg(t)), 0 ≤t≤4, λexp −c(g(t)−g(5k+))Z5k−1 5(k−1)x(s)ds, 5k<t≤5k+4, k∈N, 0, otherwise. (120) Now, we approximate the solution of the Stieltjes differential Equation (118) using the scheme (58) in the time interval [ 0,15 ] , for λ= 1.1, c= 1.2, and x0= 8. We realize that in order to evaluate function (119) , we have to approximate the integral value using a classical quadrature formulae, so the convergence order of the full scheme will be penalized by this approximation. In our case, we considered a composite trapezoidal rule. In the following Table 2, we summarize the numerical results that we obtained in this case (we omit the errors for the predictor and the limits from the right):
Mathematics 2020,8, 1571 25 of 30 Table 2. Numerical results (silkworm population model). h=1×10−1h=1×10−2h=1×10−3h=1×10−4h=1×10−5 max{|en|} 2.3724 ×10−13.6493 ×10−26.6993 ×10−32.2157 ×10−37.1252 ×10−4 Finally, in Figure 5a, we can see the exact solution and the predictor using as the time step h=1×10−1and, in Figure 6,h=1×10−5. In Table 3, we can see the successive approximations in some selected times. We can see that the largest errors correspond to the points where the impulses appear. OO. ....-4 ro ;::J '"d ·- > ·- '"d � ·- � o H <l.) ;::J z Exact solution vs approximate solution 18r--------------r------------r-----�-=--=:--=:-.=::-====--==-� 16 14 12 10 8 6 4 2 -Exact solution oCorrector 0L__--------------¼:18888eeeeli!>-----------¼ieeeeae881!>----------�188881� o 5 10 15 Time (a)h=1×10−1. OO. ....-4 ro ;::J '"d ·- > ·- '"d � ·- � o H <l.) ;::J z Exact solution vs approximate solution 18r--------------r------------r-----�-=--=:--=:-.=::-====--==-� 16 14 12 10 8 6 4 2 -Exact solution oCorrector OL__ _______ ____. __ �------- --------...--------------- 0 5 10 15 Time (b)h=1×10−5. Figure 5. Exact solution vs. approximate solution. Observe that in ( b ), the match is perfect, and the circles indicating the corrector are so close together that they look like a continuous stroke. Vertical lines indicate jumps. Table 3. Numerical results at some selected times (silkworm population model). Time Exact Solution h=1×10−1h=1×10−2h=1×10−3h=1×10−4h=1×10−5 t=2 2.4096 2.4404 2.4105 2.4096 2.4096 2.4096 t=4 7.2574 ×10−17.8872 ×10−17.3687 ×10−17.2902 ×10−17.2677 ×10−17.2607 ×10−1 t=7 3.5847 3.6930 3.5880 3.5848 3.5847 3.5847 t=9 1.0797 1.1935 1.0968 1.0846 1.0812 1.0802 t=12 5.3330 5.3852 5.3210 5.3313 5.3329 5.3330 t=14 1.6063 1.7404 1.6266 1.6130 1.6085 1.6070 6.3. Approximation of a System of Stieltjes Differential Equations with Several Derivators Related to a Fish Population Model In this section, we present the application of the algorithm previously deduced to a system of Stieltjes differential equations with several derivators: (xi)0 gi(t) = fi(t,x(t)), for gialmost every t∈[0, T), xi(0) = xi,0,i=1, . . . , n,(121)