Next Article in Journal
Circular Chromatic Number of Signed Planar Graphs Without Cycles of Length 4 to 9
Previous Article in Journal
Clustering-Based Class Hierarchy Modeling for Semantic Segmentation Using Remotely Sensed Imagery
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Piecewise Analytical Approximation Methods for Initial-Value Problems of Nonlinear Ordinary Differential Equations

Escuela de Ingenierías Industriales, Universidad de Málaga, Doctor Ortiz Ramos, s/n, 29071 Málaga, Spain
Mathematics 2025, 13(3), 333; https://doi.org/10.3390/math13030333
Submission received: 17 December 2024 / Revised: 13 January 2025 / Accepted: 16 January 2025 / Published: 21 January 2025

Abstract

:
Piecewise analytical solutions to scalar, nonlinear, first-order, ordinary differential equations based on the second-order Taylor series expansion of their right-hand sides that result in Riccati’s equations are presented. Closed-form solutions are obtained if the dependence of the right-hand side on the independent variable is not considered; otherwise, the solution is given by convergent series. Discrete solutions also based on the second-order Taylor series expansion of the right-hand side and the discretization of the independent variable that result in algebraic quadratic equations are also reported. Both the piecewise analytical and discrete methods are applied to two singularly perturbed initial-value problems and the results are compared with the exact solution and those of linearization procedures, and implicit and explicit Taylor’s methods. It is shown that the accuracy of piecewise analytical techniques depends on the number of terms kept in the series expansion of the solution, whereas that of the discrete methods depends on the location where the coefficients are evaluated. For Riccati equations with constant coefficients, the piecewise analytical method presented here provides the exact solution; it also provides the exact solution for linear, first-order ordinary differential equations with constant coefficients.

1. Introduction

Nonlinear, first-order ordinary differential equations arise in numerous science and engineering models, such as lumped models in heat and mass transfer [1,2,3,4], blood perfusion [5], electrical circuits, chemical kinetics modeling [6], combustion, pyrolysis [7], bubble dynamics [8,9], etc. Despite a large body of research, e.g., [10,11,12,13], most of these equations do not have closed-form analytical solutions. As a consequence, they are frequently solved by means of finite-difference methods that provide discrete solutions at fixed times. However, piecewise analytical approximations to the solution of these equations may be obtained by linearization [14,15,16] and approximating their right-hand sides by the constant and linear terms of their Taylor series expansions. This linearization results in piecewise exponential solutions, requires the existence of the first-order partial derivatives of the right-hand side of the ordinary differential equation with respect to both the independent and dependent variables, and has been used in the development of exponential integrators, e.g., [17], that integrate exactly the linear terms and use quadrature rules for the nonlinear ones [17,18,19]. For systems of nonlinear, first-order ordinary differential equations, linearization results in matrix exponentials.
In this paper, piecewise approximate analytical solutions to scalar, first-order, nonlinear ordinary differential equations based on second-order Taylor’s approximations of the right-hand side are presented. These approximations require the existence of the second-order derivatives of the right-hand side with respect to the dependent and independent variables, and result in Riccati equations whose solutions are obtained analytically in terms of series if the coefficients of the Riccati equation are not constant and in closed form if they are assumed to be piecewise constant; these piecewise analytical solutions coincide with the exact ones if the coefficients of the generalized Riccati equation are constant. If the second-order derivatives of the right-hand side are not considered, the methods presented in this paper reduce to the linearization techniques described in the previous paragraph, and these linearization techniques provide the exact solution for first-order, linear ordinary differential equations with constant coefficients.
Riccati equations have played an important role in mathematical finance [20] where symbolic computations have been used to classify solutions to an important class of mathematical finance models [21]; control theory, separation of variables, and continued fractions [22,23]; integrability [24]; nonlinear wave propagation [25,26,27]; Painlevé equations, nonlinear special functions, and orthogonal polynomials [28,29], etc. In addition, Riccati hierarchies may be treated by means of Painlevé and symmetry analysis, e.g., [30,31,32].
Finite-difference methods based on the second-order Taylor’s approximations of the right-hand side are also presented in this paper. These methods result in quadratic equations and provide finite-difference equations whose solutions are compared with those of the continuous techniques presented herein.
The manuscript has been arranged as follows. In Section 2 and Section 3, piecewise analytical approximate solutions based on the second-order Taylor series expansion of the right-hand side of the first-order, nonlinear ordinary differential equations are reported for the cases where the dependence of the coefficients on the independent variable is and is not considered, respectively. The explicit finite-difference expressions or nonlinear, one-dimensional mappings corresponding to the piecewise analytical presented in Section 2 and Section 3 are summarized in Section 4. Explicit finite-difference methods based on the quadratic approximations of the right-hand side presented in Section 2 and Section 3 are reported in Section 5 and Section 6, respectively. It is important to keep in mind that the finite-difference equations presented in Section 2, Section 3 and Section 4 are based on continuous solutions, whereas those of Section 5 and Section 6 are based on the discretization of both the dependent and independent variables. Some results for two singularly perturbed problems are presented in Section 7 where the accuracy of continuous and discrete approximations is assessed by comparing them with the exact solution. A final section on conclusions summarizes the most important findings of the paper. For the sake of convenience, continuous and discrete approximations based on linear approximations of the right-hand side of the ordinary differential equations are collected in Appendix A and Appendix B, while Appendix C presents three well-known explicit Taylor’s methods.

2. Piecewise Continuous Solutions Based on Quadratic Approximations

Consider the following nonlinear, initial-value problem:
d y d x = f ( x , y ) , x > 0 , y ( 0 ) = y 0 , y ,
where x and y denote the independent (time) and dependent variables, respectively, f ( x , y ) is a nonlinear function of both x and y, and y 0 denotes a constant (initial) value.
Let the time interval [ 0 , L ] ( L > 0 ) be divided into N non-overlapping subintervals I n = [ x n , x n + 1 ] with x 0 = 0 , x n + 1 > x n and x N = L , and, in each subinterval I n , approximate the right-hand side of Equation (1) by its second-order Taylor series expansion about ( x n , y n ) , i.e., Equation (1) is approximated by
d Y d X = P n ( X ) + Q n ( X ) Y + H n Y 2 , x ( x n , x n + 1 ] ,
where X x x n ( 0 , x n + 1 x n ] , Y y y n ,
P n ( X ) = f n + A n X + B n X 2 , Q n ( X ) = J n + C n X , H n = 1 2 f y y ( x n , y n ) ,
f n = f ( x n , y n ) , A n = f x ( x n , y n ) , B n = 1 2 f x x ( x n , y n ) ,
J n = f y ( x n , y n ) , C n = f x y ( x n , y n ) ,
y n = y ( x n ) , f r = f r , f p q = 2 f p q , and Y ( X = 0 ) = Y n = 0 .
Equation (2) is the (generalized) Riccati equation [33,34,35], which may transformed into a second-order, linear, ordinary differential equation [33,36,37]. However, very few analytical solutions to the generalized Riccati equation are available in the literature [10,11,12,13].

2.1. Piecewise Continuous Solutions of the Generalized Riccati Equation (2) for H n = 0

If H n = 0 in the generalized Riccati Equation (2), then a linear ordinary differential equation is obtained whose solution may be written as
Y ( X ) = 0 X P n ( s ) exp ( U ( X ) U ( s ) ) d s ,
where U ( X ) = J n X + 1 2 C n X 2 .
For H n = 0 , C n = 0 and J n 0 , Equation (6) becomes
Y ( X ) = V n exp ( J n X ) 1 J n f n + A n X + 1 J n + B n X 2 + 2 J n X + 1 J n ,
where
V n = 1 J n f n + A n J n + B n 2 ( J n ) 2 .
For H n = 0 , C n = 0 and J n = 0 , the solution to Equation (6) is
Y ( X ) = f n + 1 2 A n X + 1 3 B n X 2 X .
On the other hand, if H n = 0 and C n > 0 , Equation (6) may be written as
Y ( X ) = exp ( α n z 2 ) 1 2 π α n p n + r n 2 α n ( M ( z + ) M ( z ) ) ( N ( z + ) N ( z ) ) ,
where
p n = f n + A n J n C n + B n J n C n 2 ,
q n = A n + 2 B n J n C n , r n = B n ,
M ( z ) = erf ( z α n ) , N ( z ) = 1 2 α n ( r n z + q n ) exp ( α n z 2 ) ,
z = z + = X + J n C n , z = J n C n , α n = 1 2 C n ,
and erf ( z ) = 2 π 0 e z 2 d z is the error function integral.
For H n = 0 and C n < 0 , Equation (6) may be written as
Y ( X ) = exp ( α n z 2 ) 1 2 π α n p n r n 2 α n ( M ( z + ) M ( z ) ) + N ( z + ) N ( z ) ,
where
M ( z ) = erfi ( z α n ) , N ( z ) = 1 2 α n ( r n z + q n ) exp ( α n z 2 ) ,
erfi ( z ) = i erf ( i z ) = 2 π 0 e z 2 d z is related to Dawson’s integral or function F ( x ) = π 2 e x 2 erfi ( x ) [10,38,39,40,41] and i 2 = 1 .

2.2. Piecewise Continuous Solutions of the Generalized Riccati Equation (2) for H n 0

For H n 0 , Equation (2) is a (generalized) Riccati equation with polynomial coefficients of the independent variable which may not have a closed-form compact analytical solution. However, its solution may be obtained as a series, as follows. First, by introducing
Y ( X ) = μ w ( X ) w ( X ) ,
where the prime denotes differentiation with respect to X and μ = 1 H n , Equation (2) becomes the following linear second-order ordinary differential equation:
w Q n ( X ) w + H n P n ( X ) w = 0 .
For the sake of convenience and in order to avoid the cumbersome use of superscripts, hereon, we shall use the following nomenclature:
Q n ( X ) = J n + C n X δ + ϵ X ,
P n ( X ) = ( f n + B n X + C n X 2 ) H n α + β X + γ X 2 ,
which, when substituted into Equation (2) together with
w ( X ) = k = 0 a k X k ,
results in the following sequence of equations for the coefficients a k
2 a 2 δ a 1 + α a 0 = 0 ,
6 a 3 2 δ a 2 + ( α ϵ ) a 1 + β a 0 = 0 ,
and, for k 2 ,
( k + 2 ) ( k + 1 ) a k + 2 ( k + 1 ) δ a k + 1 + ( α k ϵ ) a k + β a k 1 + γ a k 2 = 0 .
With Equations (22)–(24), it is an easy exercise to show that, for k 2 ,
a k = a k 0 a 0 + a k 1 a 1 ,
where, for example,
a 20 = α 2 , a 21 = δ 2 ,
a 30 = 1 6 ( α δ + β ) , a 31 = 1 6 ( δ 2 α + ϵ ) ,
and all a k s for k > 2 may be written as linear combinations of a 0 and a 1 . This means that w ( X ) (cf. Equation (21)) may be written as
w ( X ) = a 0 S 0 ( X ) + a 1 S 1 ( X ) ,
where
S 0 ( X ) = 1 + a 20 X 2 + a 30 X 3 + O ( X 4 ) ,
S 1 ( X ) = X ( 1 + a 21 X + a 31 X 2 + O ( X 4 ) ) ,
and the coefficients a k 0 and a k 1 for k 2 may be easily obtained from Equations (22)–(27).
The use of Equations (28)–(30) in Equation (20) yields
Y ( X ) = μ w ( X ) w ( X ) = 1 H n S 0 ( X ) + F S 1 ( X ) S 0 ( X ) + F S 1 ( X ) ,
where F = a 1 a 0 is an unknown constant.
Use of the (initial) condition Y ( 0 ) = 0 in Equation (31) results in the following expression:
Y ( X ) = μ W ( X ) W ( X ) = 1 H n S 0 ( X ) S 0 ( X ) ,
which contains the ratio of two series; both of them are convergent because the point X = 0 is a regular point for the ordinary differential Equation (18).

3. Piecewise Continuous Solutions Based on Quadratic Approximations with Frozen Coefficients

As shown in the previous subsection, the solution to Equation (2) for H n 0 , i.e., Equation (32), is given by the ratio of two series. This is a consequence of the fact that the coefficients A n , B n and C n in Equations (4) and (5) which arise through f x and f x x , and f x y , respectively, account for the dependence of f ( x , y ) on x. However, if we assume that, in each interval I n , f ( x , y ) is approximated by f ( x * , y ) , where x * [ x n , x n + 1 ] , then by using a second-order Taylor series expansion for f ( x * , y ) around y n , Equation (1) may be approximated by
d Y d X = P n + Q n Y + H n Y 2 , x ( x n , x n + 1 ] , X ( 0 , x n + 1 x n ] ,
where (abusing notation) P n = f ( x * , y n ) , Q n = f y ( x * , y n ) and H n = 1 2 f y y ( x * , y n ) are now constant in each subinterval I n . Hereon, we shall refer to the approximation methods that do not account for f x , f x y and f x x as piecewise continuous frozen-coefficient techniques based on quadratic approximations for the dependent variable.

3.1. Piecewise Continuous Solutions for H n = 0

If H n = 0 and Q n = f y ( x * , y n ) 0 , the solution to Equation (33) subject to Y ( 0 ) = 0 is
Y ( X ) = P n Q n exp ( Q n X ) 1 ,
which is used in the development of exponential integrators, e.g., [14,17,42]. On the other hand, for H n = 0 and Q n = 0 , the solution to Equation (33) subject to Y ( 0 ) = 0 is
Y ( X ) = P n X ,
which yields Euler’s forward or explicit method for x * = x n and X n + 1 = h , where h is the step size.

3.2. Piecewise Continuous Solutions for H n 0

If H n 0 , Equation (33) is a constant-coefficient Riccati equation whose solution may be obtained by using Equation (17), which results in the following constant-coefficient, linear, second-order ordinary differential equation
W Q n W + P n H n W = 0 ,
whose solution depends on the sign of the radicand ( Q n ) 2 4 P n Q n , as discussed next.
If the radicand is positive, then Equations (36) and (17) subject to Y ( 0 ) = 0 yield
Y ( X ) = y ( x ) y ( x n ) = P n 1 exp ( ( λ λ + ) X ) λ λ + exp ( ( λ λ + ) X ) ) ,
where λ ± = 1 2 ( Q n ± ( Q n ) 2 4 P n Q n ) , while if the radicand is nil,
Y ( X ) = y ( x ) y ( x n ) = λ 2 H n X 1 λ X = P n X 1 λ X ,
where λ = Q n 2 .
If the radicand is negative, then the solution to Equations (36) and (17) subject to Y ( 0 ) = 0 is
Y ( X ) = y ( x ) y ( x n ) = P n sin ( ω X ) ω cos ( ω X ) λ sin ( ω X ) ,
where λ = Q n 2 and ω = 4 P n H n ( Q n ) 2 .

4. Discrete Mappings/Finite-Difference Techniques for Piecewise Continuous Methods Based on Quadratic Approximations

The solutions corresponding to Equations (7), (9), (32), (34), (35) and (37)–(39) result in the following one-dimensional mappings or explicit finite-difference equations:
y n + 1 = y n + 1 J n f n + A n J n + B n 2 ( J n ) 2 ( exp ( J n h ) 1 ) h J n A n + 2 B n h J n h ,
y n + 1 = y n + f n + 1 2 A n h + 1 3 B n h 2 h ,
y n + 1 = y n 1 H n S 0 ( h ) S 0 ( h ) ,
y n + 1 = y n + P n Q n exp ( Q n h ) 1 ,
y n + 1 = y n + P n h ,
y n + 1 = y n P n 1 exp ( ( λ λ + ) h ) λ λ + exp ( ( λ λ + ) h ) ) ,
y n + 1 = y n + λ 2 P n H n h 1 λ h = y n + P n 2 h 2 Q n h ,
y n + 1 = y n + P n sin ( ω h ) ω cos ( ω h ) λ sin ( ω h ) ,
respectively, where h = x n + 1 x n is the step size.
Equations (10) and (15) also result in one-dimensional mappings that are not reported here. Note, however, that these mappings involve the error function and the erfi function.
For autonomous differential equations, i.e., f ( x , y ) = f ( y ) , A n = B n = C n = 0 , P n = f n = α , and Q n = 0 , all the above mappings preserve the fixed points of the original differential equation, i.e., Equation (1).
For the sake of convenience, we shall refer to the finite-difference Equation (42) as CRsm where C, R and s denote continuous, Riccati/quadratic, and series, respectively, and m stands for a natural number that corresponds to the number of terms of the series S 0 ( X ) used in these methods (cf. Equations (29) and (32)); CR corresponds to Equation (2) when f ( x , y ) does not depend on x. We shall also refer to Equations (45)–(47) as CRF, where F stands for frozen, i.e., the dependence of f ( x , y ) on x has not been considered (cf. Equation (33)). Furthermore, we shall refer to Equation (42) with A n = B n = C n = 0 (cf. Equations (4) and (5)) as CRFsm. For both CRF and CRFsm, A n = B n = C n = 0 ; however, the former employs the exact solutions given by Equations (45)–(47) (cf. Equations (37)–(39)), whereas the latter employs Equations (32) and (42) which depend on the series S 0 ( X ) . This means that the solutions provided by CRF and CRFsm will in general differ because the latter make use of a finite number of terms in S 0 ( X ) (cf. Equation (29)). Moreover, CRF and CR are identical if f ( x , y ) does not depend on x.

5. Discrete Methods Based on Quadratic Approximations

The use of a θ -method in Equation (1) in the interval I n yields
Δ y = h ( θ f ( x n + 1 , y n + 1 ) + ( 1 θ ) f ( x n , y n ) ) ,
where Δ y = y n + 1 y n , 0 θ 1 . θ = 0 , 1 2 and 1 correspond to the well-known Euler’s forward or explicit, trapezoidal and Euler’s backward or implicit methods, respectively; the latter two techniques result in nonlinear algebraic equations if f ( x , y ) is a nonlinear function of y and their corresponding finite-difference expressions must be solved iteratively by means of, for example, the Newton–Raphson technique. Hereon, we shall refer to the implicit, finite-difference expressions corresponding to Equation (48) for θ = 1 2 and 1 as Dt and either D or Dn which are O ( h 2 ) and O ( h ) accurate, respectively, where D, t and n stand for discrete, trapezoidal, and implicit, respectively.

5.1. Discrete Methods Based on Quadratic Approximations for P 0

In this section, some methods based on the approximation of f ( x n + 1 , y n + 1 ) by its second-order Taylor expansion, i.e.,
f ( x n + 1 , y n + 1 ) f n + f x n h + f y n Δ y + 1 2 ( f x x n h 2 + 2 f x y n h Δ y + f y y n Δ y 2 ) ,
are presented, where F n = F ( x n , y n ) .
Substitution of Equation (49) into Equation (48) yields the following quadratic expression:
P Δ y 2 + Q Δ y + R = 0 ,
where
P = 1 2 f y y n , Q = θ ( f y n + f x y n h ) 1 h , R = f n + θ h f x n + 1 2 h f x x n .
If P 0 , the two roots of Equation (50) may be easily determined; they are real provided that Q 2 4 P R 0 , and the valid root may be easily determined by Taylor series expansion of the radicand. Hereon, we shall refer to the finite-difference methods corresponding to Equations (50) and (51) as DRn and DRt for θ = 1 and 1 2 , respectively, where R stands for Riccati (quadratic). Note that Equation (50) provides Δ y in an explicit manner.

5.2. Discrete Methods Based on Quadratic Approximations for P = 0 and Q 0

If P = 0 and Q 0 , Equation (50) is linear and provides the following solution:
y n + 1 = y n R Q ,
which accounts for the dependence of the solution on f x , f x y and f x x through Equations (50) and (51) for 0 < θ 1 .
The explicit finite-difference methods corresponding to Equation (52) will be referred to as DLn and DLt for θ = 1 and 1 2 , respectively, where L stands for linear; these methods account for the dependence of f ( x , y ) on x, as indicated in Equation (51).
If such a dependence is not considered, i.e., if f ( x n + 1 , y n + 1 ) is approximated by
f ( x n + 1 , y n + 1 ) f n + f y n Δ y ,
where F n = F ( x n , y n ) , then Equation (50) or (52) yields
y n + 1 = y n f n θ h f y n 1 ,
which results in the first-order accurate Euler’s forward or explicit method for θ = 0 . The explicit finite-difference Equation (54) will be referred to as DLFn and DLFt for θ = 1 and 1 2 , respectively.

6. Discrete Methods Based on Frozen-Coefficient Approximations

Equation (51) shows that Q and R depend on f x y n , and f x n and f x x n , respectively. If these three terms are not considered in Equation (49), Equation (51) remains valid and the resulting finite-difference methods will be referred to as DRFn and DRFt for θ = 1 and 1 2 , respectively, where F stands for frozen, i.e., f ( x n + 1 , y n + 1 ) is approximated by the second-order Taylor expansion (compared with Equation (49))
f ( x n + 1 , y n + 1 ) f ( n + 1 , n ) + f y ( n + 1 , n ) Δ y + 1 2 f y y ( n + 1 , n ) Δ y 2 ,
where F ( n + 1 , n ) = F ( x n + 1 , y n ) .
In the interval I n , Equation (1) may also be approximated by
d y d x f ( x * , y * ) ,
where x * I n .
If x * = x n , first-order discretization of Equation (56) results in the well-known Euler’s explicit or forward method, i.e.,
y n + 1 = y n + h f n , f n = f ( x n , y n ) ,
whereas for x n < x * x n + 1 , the discretization of Equation (56) yields
y n + 1 = y n + h ( f ( x * , y n ) + f y ( x * , y n ) ( y * y n ) ) ,
which, for x * = x n + 1 , yields
y n + 1 = y n + h ( f ( x n + 1 , y n ) + f y ( x n + 1 , y n ) ( y n + 1 y n ) ) ,
and, for x * = x n + 1 2 ,
y n + 1 = y n + h ( f ( x n + 1 2 , y n ) + 1 2 f y ( x n + 1 2 , y n ) ) ,
where y n + 1 2 has been approximated by 1 2 ( y n + y n + 1 ) .
Equations (59) and (60) provide the following explicit finite-difference expressions:
y n + 1 = y n + h f ( x n + 1 , y n ) 1 h f y ( x n + 1 , y n ) ,
and
y n + 1 = y n + 2 h f ( x n + 1 2 , y n ) 2 h f y ( x n + 1 2 , y n ) ,
which we will refer to as DLFnp1 and DLFmp, respectively, where np1 and mp stand for n + 1 and the midpoint, i.e., n + 1 2 , respectively.

7. Results

As indicated in Section 2, Section 3, Section 4, Section 5 and Section 6, a large variety of continuous and discrete methods for the solution of scalar, first-order, nonlinear ordinary differential equations have been developed in this manuscript. In order to ease the reading of this section where the accuracy of some of the methods presented in this paper is reported for two singularly perturbed initial-value problems that have exact solutions, it seems convenient to recall that the techniques reported here have been identified by some letters and numbers whose meaning is as follows: C and D refer to the continuous and discrete formulations presented in Section 2, Section 3 and Section 4 and Section 5 and Section 6, respectively; F indicates that the dependence on the independent variable is not accounted for, but may change in each interval of integration; and L and R indicate first- and second-order Taylor series expansions, respectively, of the right-hand side of Equation (1) (cf. Section 2, Section 3 and Section 4) or linear and quadratic approximations of the dependent variable (cf. Section 5 and Section 6), respectively. Other symbols such as n indicate that the Taylor series expansion or approximation is evaluated at the n-th time level. Furthermore, the figures and tables for each example are presented in the corresponding subsection. In addition, in the tables, the section or appendix where the methods have been presented is also reported.
Unless stated otherwise, all the results presented in this section were obtained using a constant step size. It must be noted, however, that, since both the piecewise analytical and discrete methods presented in this paper make use of the first- and/or second-order derivatives of f ( x , y ) with respect to x and y, the step size could be controlled according to the magnitude of these derivatives, thus resulting in step-adaptive procedures. However, adaptive procedures are not reported in this paper.

7.1. Example 1

Here, we consider the following (autonomous) singularly perturbed, Bernoulli equation:
ϵ d y d t = 1 80 ( y 2 20 y ) , t > 0 ,
subject to y ( 0 ) = 1 , whose exact solution is
y ( t ) = 20 1 + 19 exp t 4 ϵ ,
and 0 < ϵ < < 1 .
Equation (63) exhibits an initial layer of thickness O ( ϵ ) and has two fixed points y = 0 and y = 20 which are unstable and stable, respectively. Upon introducing τ t ϵ , Equation (63) becomes
d y d τ = 1 80 ( y 2 20 y ) ,
also subject to y ( 0 ) = 0 . Furthermore, upon using z 1 y , Equation (63) becomes the following linear, constant-coefficient, first-order ordinary differential equation:
ϵ d z d t = 1 80 ( 1 20 z ) ,
subject to z ( 0 ) = 1 .
The errors of some of the continuous and discrete approximate methods presented in Section 2, Section 3 and Section 4 and Section 5 and Section 6, respectively, and in Appendix A, Appendix B and Appendix C for Equation (63) are reported in Figure 1 and Figure 2 and Table 1.
Figure 1 shows the decimal logarithm of E M ( t ) = | y M ( t ) y e x ( t ) | which is the error of the method M applied to Equation (63), for h = 10 4 , where the subscript e x stands for exact solution, i.e., Equation (64). Since the right-hand side of Equation (63) is quadratic and does not depend explicitly on t, CR and CRF provide the exact solution, i.e., E CR ( t ) = E CRF ( t ) = 0 ; this is not the case for CRs2 and CRs3, which use two and three terms of the series S 0 ( t ) , as discussed previously (cf. Equation (29)).
Figure 1 indicates that throughout the whole domain, CR is more accurate than CRs3, and the latter is more accurate than CRs2 except in a very small region for ϵ = 10 h and h, i.e., when the initial layer near t = 0 contains roughly ten and one (grid) points, respectively. However, if the initial layer does not contain any grid points, neither CRs2 nor CRs3 provides bounded solutions as indicated in Figure 1 for ϵ = 0.1 h , i.e., ϵ = 10 5 ; this is in marked contrast to the (linear) CL and CLF methods, which provide a solution for ϵ = 0.1 h that is very accurate away from the initial layer, but extremely inaccurate in that layer as illustrated in Figure 1 and Table 1, which show that the logarithm of the error is positive near t = 0 for CL.
Figure 1 also shows that DRt and DRn do not diverge even when the initial layer is not resolved, i.e., for ϵ = 0.1 h , and that DRt is more accurate than DRn except in a small region located in the initial layer; this is somewhat expected owing to the higher accuracy of the trapezoidal discretization used in DRt. Figure 1 also shows that, in the initial layer, DRt is more accurate than CL which in turn is more accurate than DRn; however, away from the initial layer, CL is more accurate than DRt which in turn is more accurate than DRn. Figure 1 also indicates that, away from the initial layer, Dt is more accurate than DLt, which in turn is more accurate than Dn, which in turn is more accurate than DLn; this is consistent with the fact that linearization and first-order accurate implicit techniques are less accurate than nonlinearized and second-order accurate implicit methods, respectively. In addition, CL, DRt, and DRn are very inaccurate near t = 0 for ϵ = 0.1 h , owing to the lack of resolution of the initial layer.
In Figure 2, the errors of the implicit and trapezoidal methods, i.e., Dn and Dt, respectively; linearized implicit and trapezoidal techniques, i.e., DLn and DLt, respectively; and the first-, second- and third-order accurate methods presented in Appendix A, Appendix B and Appendix C, respectively, are reported for ϵ = 10 h , h and 0.1 h .
For ϵ = 0.1 h , i.e., when there are no grid points in the initial layer, Figure 2 shows that DLn and DTL do not provide bounded solutions. On the other hand, Dn and DLt do not diverge but are very inaccurate near t = 0 . Figure 2 also shows that the accuracy of Dn, Dt, DLn, DLt, DTL, DTQ and DTC increases as ϵ / h increases, i.e., as the number of grid points in the initial layer increases.
For ϵ = 10 h and h, the accuracy of DTQ illustrated in Figure 2 is almost identical to that of DTC and higher than that of DTL, in accordance with the truncation errors of these techniques. Figure 2 clearly indicates that Dt is more accurate than DLt which, in turn, is more accurate than DLn and Dn; DLn and DLt are less accurate than Dn near t = 0 ; and the accuracy of Dn is slightly higher than that of DLn away from the initial layer.
CL and CR provide the exact solution when applied to the linear Equation (66). This indicates that the accuracy of these methods depends on how the original differential equation is treated (cf. Equations (63) and (66)).
If E is assumed to be equal to A ϵ p where A > 0 , the results shown in Table 1 for ϵ = h and ϵ = 10 h indicate that p 2 for CRs3 and CL, DRtn and Dtn, and DTQ and DTC; p = for CR and CRF; and p = 1 for the rest of the methods presented in that table. Furthermore, Table 1 indicates that CR and CRF provide the exact solution for Example 1 and, therefore, are the most accurate methods presented in this paper for this example.

7.2. Example 2

In this subsection, we consider the following singularly perturbed initial-value problem:
ϵ d y d x = exp x ϵ y 2 + y exp x ϵ , x > 0 ,
subject to y ( 0 ) = 1 , with 0 < ϵ < < 1 .
Equation (67) contains a transcendentally small term, i.e., exp x ϵ , and a transcendentally large coefficient, i.e., exp x ϵ . However, upon making use of t x ϵ , Equation (67) becomes
d y d t = y 2 e t + y e t ,
subject to y ( 0 ) = 1 , whose analytical solution is y ( t ) = e t or y ( x ) = exp x ϵ .
Figure 3, Figure 4 and Figure 5 and Table 2 provide the errors of some of the continuous and discrete approximate methods presented in Section 2, Section 3, Section 4, Section 5 and Section 6 for Equation (68).
The top row of Figure 3 shows that, away from the initial layer, CRF is more accurate than CL, which in turn is more accurate than CLF, in accordance with the fact that CRF uses a quadratic approximation, whereas CL employs a linear one, and CLF does not account for the dependence of f ( x , y ) on the independent variable x in each interval. The top row of Figure 3 also shows that CL and CLF diverge for h = 0.1 but provide almost the same errors for h = 1 and 10, and that the accuracy of CRF, CL and CLF increases as the step size is decreased, in accordance with the improvement of the accuracy of the Taylor series expansion as the step size is decreased.
The middle row of Figure 3 shows that, for h = 0.1 , CRs2 diverges and CRs3 is slightly more accurate than CRs4. For h = 0.01 and 0.001, the middle row of Figure 3 indicates that CRs2 is less accurate than CRs4, and the latter, in turn, is less accurate than CRs3. This may seem a bit counter-intuitive at first sight since CRs4 contains one term more than CRs3 in the truncation of the series S 0 ( X ) (cf. Equations (29) and (32)); however, both methods truncate the series S 0 ( X ) and their solutions are given by the ratio of a truncated series to the derivative of such a truncated series. Furthermore, the higher accuracy of CRs3 shown in the middle row of Figure 3 has not been observed in numerical experiments on other ordinary differential equations not reported here.
Figure 3 also indicates that, for h = 0.001 , CRs3 and CRs4 are more accurate than CRF, and the (absolute value of the) slope of log E beyond the maximum value of E for CRs2, CRs3 and CRs4 decreases much more slowly with time than that of CL, CLF and CRF.
The bottom row of Figure 3 shows the errors for CRFs2, CRFs3 and CRFs4, which exhibit similar trends to those for CRs2, CRs3 and CRs4 illustrated in the middle row of that figure. For h = 0.1 , CRFs2 diverges, but the errors of CRFs3 are almost identical to those of CRFs4.
Figure 4 indicates that DRmp is more accurate than DRn and DRnp1; this is in accordance with the fact that, in DRmp, the coefficients are evaluated at the midpoint x n + 1 2 , whereas they are evaluated at x n and x n + 1 in DRn and DRnp1, respectively. Figure 4 also shows that DRnp1 is more accurate than DRn.
The bottom row of Figure 4 shows that DRt is more accurate than DRFt; the latter, in turn, is more accurate than DRFn. This is to be expected because the coefficients of Equation (68) depend on t and are assumed to be (frozen) constant in DRFt and DRFn. In addition, DFRt is based on a trapezoidal rule evaluation.
The results presented in the top row of Figure 5 show that the accuracy of DLFn is very close to that of DLFnp1 but lower than that of DLFmp in accordance with results previously shown in this paper, thus indicating that the accuracy of constant-coefficient (frozen) approximations is higher when these coefficients are evaluated at the midpoint t n + 1 2 than when evaluated at t n or t n + 1 .
The bottom row of Figure 5 shows that DLt is more accurate than DLFt and this, in turn, is more accurate than DLn or DL. The error of DLt is very close to that of DLFt for h = 0.01 and 0.001, and smaller than that for DLFt for h = 0.1 , in accordance with the fact that the accuracy of the linearization of f ( x , y ) increases as the step size is decreased.
A comparison of the results presented in the two rows of Figure 5 clearly shows that DLt is more accurate than DLFt; the latter is more accurate than DLFmp, which, in turn, is more accurate than DLFn and DLFnp1.
If E is assumed to be equal to B h p where B > 0 is a constant and p is the order, the results shown in Table 2 clearly indicate that piecewise analytical methods CRF, CRs3, CRs4, CRFs3 and CRFs4 and the discrete techniques DRt, DRFt and DRmp, which are based on the second-order Taylor series expansion of f ( x , y ) and quadratic approximations, respectively, are second-order accurate. Table 2 also indicates that the linear methods DLt, DLFt and DLmp are also second-order accurate; the remaining methods reported in Table 2 are first-order accurate.
Table 2 also shows that the accuracy of CRs3 is about the same as that of CRFs3 and CRFs4 and higher than that of CRF; the latter is more accurate than CRs4. On the other hand, Table 2 shows that DLt and DLFt exhibit almost the same accuracy, thus indicating that the dependence of the coefficients on the independent variable does not play much a role in discrete linearization methods for Equation (68). However, the location where these coefficients are evaluated plays an important role as a comparison between the errors of DLt and DLmp indicates.
Table 2 also shows that the error of DRmp is about the same as that of DRt and smaller than that of DRFt, thus indicating once again that the accuracy of the discrete methods presented in this paper depends on the location where the coefficients are evaluated.

8. Conclusions

Piecewise analytical, continuous and discrete (approximate) solutions to scalar, nonlinear, first-order, ordinary differential equations based on the use of the second-order Taylor series expansion of their right-hand sides have been reported. The continuous approximation results in Riccati equations whose analytical solutions are given in terms of convergent series if the dependence of the right-hand side on the independent variable is taken into account, and, in closed form, this involves exponential, linear polynomials, or trigonometric functions depending on the sign and value of a (local) radicand, otherwise. On the other hand, the discrete approximation results in quadratic equations.
It has been shown that, for a singularly perturbed, constant-coefficient Bernoulli equation, the piecewise analytical continuous method provides the exact solution, whereas it provides a second-order accurate one for a Riccati equation whose coefficients depend exponentially on the independent variable. It has also been shown that linearization methods that only account for the constant and linear terms in the Taylor’s series expansion of the right-hand side provide very accurate solutions if the initial layer is adequately resolved; otherwise, they may result in errors which may be larger than the exact solution, not only in that layer but also away from it. A similar behavior has been observed for the discrete, analytical methods reported in this paper.
For a Riccati equation whose coefficients depend exponentially on the dependent variable, it has been shown that the piecewise analytical continuous method presented in this paper which does not account for the dependence of the right-hand side on the independent variable provides slightly less accurate solutions than piecewise analytical continuous methods that account for such a dependence, provided that at least three terms in the series expansion are used. It has also been shown that the accuracy of the discrete, analytical, approximate methods presented here depends strongly on the locations where the right-hand side and its first- and second-order derivatives are evaluated. The highest accuracy has been found when such an evaluation is performed at the midpoint or when a trapezoidal method is used.

Funding

This research received no external funding.

Data Availability Statement

Data are contained within the article.

Acknowledgments

The author is grateful to the reviewers for their critical comments on the manuscript.

Conflicts of Interest

The author declares no conflicts of interest.

Appendix A. Piecewise Continuous Methods Based on Linear Approximations

In this appendix, some piecewise continuous approximate solutions to Equation (1) based on linear approximations are presented. Although some of these solutions may be obtained from those presented in Section 2, it was considered to be convenient to present/summarize them here. The approximation methods presented in this appendix are based on the approximation of f ( x , y ) by its first-order (linear) Taylor series expansion in I n , i.e.,
f ( x , y ) f n + f x n X + f y n Y ,
where the symbols are the same as those of Section 2, e.g., f n = f ( x n , y n ) , X = x x n and Y = y y n .
Use of Equation (A1) in Equation (1) and integration of the resulting equation subject to Y ( X = 0 ) = 0 yield, for f y n 0 ,
Y ( X ) = 1 f y n f n + f x n f y n ( exp ( f y n X ) 1 ) f x n f y n X .
If f y n = 0 , the solution to Equations (1) and (A1) is
Y ( X ) = f n X .
For a step size equal to h, i.e., X n + 1 = h (recall that X ( 0 ) = X n = 0 ), Equations (A2) and (A3) result in the following one-dimensional mappings or explicit finite-difference methods
y n + 1 = y n + 1 f y n f n + f x n f y n ( exp ( f y n h ) 1 ) f x n f y n h .
and
y n + 1 = y n + h f n ,
respectively.
The method corresponding to Equation (A4) is an exponential one and will hereon be referred to as CL, where C and L stand for continuous and linear (approximations), respectively. Note that CL accounts for f x , i.e., the dependence of f on x, and that Equation (A5) is Euler’s explicit or forward method.
If f x n is not accounted for in Equation (A1), i.e., the second term in the right-hand side of that equation is ignored, the resulting method will be referred to as CLF, where F stands for frozen and indicates that the dependence of f ( x , y ) has been ignored in Equation (A1).
If f ( x , y ) in Equation (1) is approximated as f ( x , y ) f ( x * , y ) , where x * [ x n , x n + 1 ] and, in turn, f ( x * , y ) is approximated by its first-order Taylor series expansion about y n , i.e.,
f ( x , y ) f ( x * , y ) f ( x * , y n ) + f y ( x * , y n ) Y ,
and this equation is substituted in Equation (1), the solution of the resulting equation is
Y ( X ) = f ( x * , y n ) f y ( x * , y n ) ( exp ( f y ( x * , y n ) X ) 1 ) ,
if f y ( x * , y n ) 0 , and
Y ( X ) = f ( x * , y n ) X ,
if f y ( x * , y n ) = 0 .
For a step size equal to h, i.e., X n + 1 = h , Equations (A7) and (A8) result in the following one-dimensional mappings or explicit finite-difference methods
y n + 1 = y n + f ( x * , y n ) f y ( x * , y n ) ( exp ( f y ( x * , y n ) h ) 1 ) ,
and
y n + 1 = y n + h f ( x * , y n ) ,
respectively.
The explicit finite-difference methods corresponding to Equation (A9) for x * = x n , x n + 1 2 and x n + 1 will here be referred to as CLn, CLmp and CLnp1, respectively, where n, mp and np1 correspond to the superscripts of x n , x n + 1 2 and x n + 1 , respectively, or the time levels n, n + 1 2 and n + 1 , respectively.

Appendix B. Discrete Methods Based on Linear Approximations

Some of the discrete methods presented in this appendix make use of Equation (48), i.e., the θ -method, and the following linear approximation
f ( x n + 1 , y n + 1 ) f n + f x n h + f y n Δ y ,
where Δ y = y n + 1 y n . Equation (A11) corresponds to a first-order Taylor series expansion of f ( x n + 1 , y n + 1 ) , and its use in Equation (48) yields
y n + 1 = y n + h f n + θ h f x n θ h f y n 1 ,
where the denominator has been assumed to be different from zero.
Hereon, we shall refer to explicit finite-difference Equation (A12) as either DLn or DL and DLt for θ = 1 and 1 2 , respectively. Both DL and DLt account for the dependence of f ( x , y ) on x. If this dependence is ignored, the resulting explicit finite-difference methods will be referred to as either DLFn or DLF and DLFt for θ = 1 and 1 2 , respectively.
If f ( x , y ) in Equation (1) is approximated by f ( x * , y * ) , where x * [ x n , x n + 1 ] , Equation (1) is discretized as
Δ y = h f ( x * , y * ) ,
and f ( x * , y * ) is then approximated by its first-order Taylor series expansion around y n , i.e.,
f ( x * , y * ) f ( x * , y n ) + f y ( x * , y ) ( y * y n ) ,
and this expression is substituted in Equation (A13), one can easily obtain
y n + 1 = y n + h f ( x * , y n ) 1 ϕ h f y ( x * , y n ) ,
where ϕ = 1 and 1 2 for x * = x n + 1 and x * = x n + 1 2 , respectively, where, in the latter, y n + 1 2 has been approximated by 1 2 ( y n + y n + 1 ) which is accurate to O ( h 2 ) . Hereon, we shall refer to the explicit finite-difference Equation (A15) as DLFnp1 and DLFmp for ϕ = 1 and 1 2 , respectively.

Appendix C. Taylor’s Methods

Taylor’s methods are based on the truncation of the Taylor series solution of y ( x ) about x n . The three Taylor’s methods considered in this paper are
y n + 1 = y n + h f n ,
y n + 1 = y n + h f n + h 2 2 ( f x n + f n f y n ) ,
y n + 1 = y n + h f n + h 2 2 ( f x n + f n f y n ) + h 3 6 ( f y n ( f x n + f n f y n ) + f x x n + 2 f n f x y n + ( f n ) 2 f y y n ) ) .
Equation (A16) is usually referred to as Euler’s forward or explicit method; Equations (A17) and (A18) require the first- and the first- and second-order derivatives of f ( x , y ) , respectively. The CL and DL methods and the CR and DR techniques presented in this paper also require the first-, and the first- and second-order derivatives of f ( x , y ) , respectively. In this manuscript, we shall refer to the finite-difference Equations (A16), (A17) and (A18) as DTL, DTQ and DTC, respectively, where D, T, L, Q and C stand for discrete, Taylor’s method, and the linear, quadratic and cubic terms in the Taylor series expansion of y ( x ) , respectively.
For autonomous, first-order, ordinary differential equations, it is easy to see that the methods presented in Appendix A, Appendix B and Appendix C preserved the fixed points of Equation (1).

References

  1. Tan, Z.; Su, G.; Su, J. Improved lumped models for combined convective and radiative cooling of a wall. Appl. Therm. Eng. 2009, 29, 2439–2443. [Google Scholar] [CrossRef]
  2. Su, G.; Tan, Z.; Su, J. Improved lumped models for transient heat conduction in a slab with temperature–dependent thermal conductivity. Appl. Math. Model. 2009, 33, 274–283. [Google Scholar] [CrossRef]
  3. Alhama, F.; Zueco, J. Application of a lumped model to solids with temperature–dependent thermal conductivity. Appl. Math. Model. 2007, 31, 302–310. [Google Scholar] [CrossRef]
  4. Sahu, S.K.; Behera, P. An improved lumped analysis for transient heat conduction in different geometries with heat generation. C. R. Mec. 2012, 340, 477–484. [Google Scholar] [CrossRef]
  5. Shitzer, A.; Stroschein, L.A.; Gonzalez, R.R.; Pandolf, K.B. Lumped–parameter tissue temperature–blood perfusion model of a cold-stressed fingertip. J. Appl. Physiol. 1996, 80, 1829–1834. [Google Scholar] [CrossRef] [PubMed]
  6. Gao, Y.; Shan, R.; Lyra, S.; Li, C.; Wang, H.; Chen, J.H.; Lu, T. On lumped-reduced reaction model for combustion of liquid fuels. Combust. Flame 2016, 163, 437–446. [Google Scholar] [CrossRef]
  7. Ranzi, E.; Dente, M.; Goldaniga, A.; Bozzano, G.; Faravelli, T. Lumping procedures in detailed kinetic modeling of gasification, pyrolysis, partial oxidation and combustion of hydrocarbon mixtures. Prog. Energy Combust. Sci. 2001, 27, 99–139. [Google Scholar] [CrossRef]
  8. Ramos, J.I. Lumped models of gas bubbles in thermal gradients. J. Appl. Math. Model. 1997, 21, 371–386. [Google Scholar] [CrossRef]
  9. Ramos, J.I. Multicomponent Gas Bubbles. II. Bubble Dynamics. J. Non-Equilib. Thermodyn. 1988, 13, 107–131. [Google Scholar] [CrossRef]
  10. Abramowitz, M.; Stegun, I.A. (Eds.) Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, 9th ed.; Dover: New York, NY, USA, 1972. [Google Scholar]
  11. Zwillinger, D. Handbook of Differential Equations, 3rd ed.; Academic Press: New York, NY, USA, 1997. [Google Scholar]
  12. Polyanin, A.D.; Zaitsev, V.F. Handbook of Exact Solutions for Ordinary Differential Equations, 2nd ed.; Chapman & Hall/CRC Press: New York, NY, USA, 2003. [Google Scholar]
  13. Murphy, G.M. Ordinary Differential Equations and Their Solutions; Dover: New York, NY, USA, 2011. [Google Scholar]
  14. Pope, D.A. An exponential method of numerical integration of ordinary differential equations. Commun. ACM 1963, 6, 491–493. [Google Scholar] [CrossRef]
  15. Ramos, J.I. Linearization techniques for singularly–perturbed initial–value problems of ordinary differential equations. Appl. Math. Comput. 2005, 163, 1143–1163. [Google Scholar] [CrossRef]
  16. De la Cruz, H.; Bisccay, R.J.; Carbonell, F.; Ozaki, T.; Jimenez, J.C. A higher order linearization method for solving ordinary differential equations. Appl. Math. Comput. 2007, 185, 197–212. [Google Scholar] [CrossRef]
  17. Hochbruck, M.; Ostermann, A. Exponential integrators. Acta Numer. 2010, 19, 209–286. [Google Scholar] [CrossRef]
  18. Chu, S.C.; Berman, M. An exponential method for the solution of systems of ordinary differential equations. Commun. ACM 1974, 17, 699–702. [Google Scholar] [CrossRef]
  19. Guderley, K.G.; Hsu, C.-C. A predictor–corrector method for a certain class of stiff differential equations. Math. Comput. 1972, 26, 51–69. [Google Scholar] [CrossRef]
  20. Boyle, P.P.; Tian, W.; Guan, F. The Riccati equation in mathematical finance. J. Symb. Comput. 2002, 33, 343–355. [Google Scholar] [CrossRef]
  21. Kovacic, J.J. An algorithm for solving second order linear homogeneous differential equations. J. Symb. 1986, 2, 3–43. [Google Scholar] [CrossRef]
  22. Bittani, S.; Laub, A.J.; Willems, J.C. (Eds.) The Riccati Equation; Springer: Berlin, Germany, 1991. [Google Scholar]
  23. Jungers, M. Historical perspectives of the Riccati equation. IFAC-PapersOnLine 2017, 50, 9535–9546. [Google Scholar] [CrossRef]
  24. Lagrange, R. Quelques théorèmes d’integrabilité par quadratures de l’équation de Riccati. Bull. Soc. Math. Fr. 1938, 66, 155–163. [Google Scholar] [CrossRef]
  25. Haley, S.B. An underrated entanglement: Riccati and Schrödinger equations. Am. J. Phys. 1997, 65, 237–243. [Google Scholar] [CrossRef]
  26. Al Bastami, A.; Belić, M.R.; Petrović, N.Z. Special solutions of the Riccati equation with applications to the Gross–Pitaevskii nonlinear pde. Electron. J. Differ. 2010, 66, 1–10. [Google Scholar]
  27. Kudryashov, N.A.; Sinelshchikov, D. Comment on ‘Exact solutions to the various nonlinear evolution equations’. Phys. Scr. 2011, 83, 017001. [Google Scholar] [CrossRef]
  28. Clarkson, J. Painlevé equations–Nonlinear special functions. In Orthogonal Polynomials and Special Functions: Computation and Application; Marcellán, F., van Assche, W., Eds.; Lecture Notes in Mathematics; Springer: Berlin, Germany, 2006; Volume 1883, pp. 331–411. [Google Scholar]
  29. Olver, F.W.J.; Lozier, D.W.; Boisvert, R.F.; Clark, C.W. (Eds.) NIST Handbook of Mathematical Functions; Cambridge University Press: New York, NY, USA, 2020. [Google Scholar]
  30. Euler, M.; Euler, N.; Leach, P. The Riccati and Ermakov–Pinney hierarchies. J. Nonlinear Math. Phys. 2007, 14, 290–310. [Google Scholar] [CrossRef]
  31. Musette, M. Painlevé analysis for nonlinear partial differential equations. In The Painlevé Property: One Century Later; Conte, R., Ed.; Springer: New York, NY, USA, 1999; pp. 517–572. [Google Scholar]
  32. Conte, R.; Musette, M. The Painlevé Handbook, 2nd ed.; Springer: New York, NY, USA, 2008. [Google Scholar]
  33. Ince, E.L. Ordinary Differential Equations; Dover: New York, NY, USA, 1956. [Google Scholar]
  34. Davis, H.T. Introduction to Nonlinear Differential and Integral Equations; Dover: New York, NY, USA, 1962. [Google Scholar]
  35. Reid, W.T. Riccati Differential Equations; Academic Press: New York, NY, USA, 1972. [Google Scholar]
  36. Glaisher, J.W.L. On Riccati’s Equation. Q. J. Pure Appl. Math. 1871, 11, 267–273. [Google Scholar]
  37. Bender, C.M.; Orszag, S.A. Advanced Mathematical Methods for Scientists and Engineers; McGraw-Hill: New York, NY, USA, 1978. [Google Scholar]
  38. Dawson, H.G. On the numerical value of 0 h e x 2 dx. Proc. Lond. Math. Soc. 1897, s1–29, 519–522. [Google Scholar] [CrossRef]
  39. Spanier, J.; Oldham, K.B. An Atlas of Functions; Hemisphere: Washington, DC, USA, 1987. [Google Scholar]
  40. Luke, Y.L. The Special Functions and Their Approximations; Academic Press: New York, NY, USA, 1969; Volume 2. [Google Scholar]
  41. Press, W.H.; Flannery, B.P.; Teukolsky, S.A.; Vetterling, W.T. Numerical Recipes: The Art of Scientific Computing, 3rd ed.; Cambridge University Press: Cambridge, UK, 2007. [Google Scholar]
  42. Certaine, J. The solution of ordinary differential equations with large time constants. In Mathematical Methods for Digital Computers; Ralston, A., Wilf, S., Eds.; John Wiley & Sons: New York, NY, USA, 1965; pp. 128–132. [Google Scholar]
Figure 1. (Color online) decimal logarithm of the error E of several finite-difference methods as a function of time t for Example 1. (CR and CRF provide the exact solution; CL and CLF have the same errors).
Figure 1. (Color online) decimal logarithm of the error E of several finite-difference methods as a function of time t for Example 1. (CR and CRF provide the exact solution; CL and CLF have the same errors).
Mathematics 13 00333 g001
Figure 2. (Color online) decimal logarithm of the error E of several finite-difference methods as a function of time t for Example 1.
Figure 2. (Color online) decimal logarithm of the error E of several finite-difference methods as a function of time t for Example 1.
Mathematics 13 00333 g002
Figure 3. (Color online) decimal logarithm of the error E of several finite-difference methods as a function of time t for Example 2.
Figure 3. (Color online) decimal logarithm of the error E of several finite-difference methods as a function of time t for Example 2.
Mathematics 13 00333 g003
Figure 4. (Color online) decimal logarithm of the error E of several finite-difference methods as a function of time t for Example 2.
Figure 4. (Color online) decimal logarithm of the error E of several finite-difference methods as a function of time t for Example 2.
Mathematics 13 00333 g004
Figure 5. (Color online) decimal logarithm of the error E of several finite-difference methods as a function of time t for Example 2.
Figure 5. (Color online) decimal logarithm of the error E of several finite-difference methods as a function of time t for Example 2.
Mathematics 13 00333 g005
Table 1. Largest values of e ( t ) log E = log | y ( t ) y e x ( t ) | for some piecewise analytical continuous and discrete methods and different values of ϵ h for Example 1. (The Sect/App column indicates the section or appendix where the methods listed in the first column appear; the subscript e x stands for exact solution).
Table 1. Largest values of e ( t ) log E = log | y ( t ) y e x ( t ) | for some piecewise analytical continuous and discrete methods and different values of ϵ h for Example 1. (The Sect/App column indicates the section or appendix where the methods listed in the first column appear; the subscript e x stands for exact solution).
MethodSect/App e max ( ϵ = 10 h ) e max ( ϵ = h ) e max ( ϵ = 0.1 h )
CRSection 4
CRFSection 4
CRs2Section 4−0.978+0.064Diverges
CRs3Section 4−3.073−1.098Diverges
CLAppendix A−3.245−1.256+0.681
DRtnSection 5.1−3.884−1.886−0.365
DRnSection 5.1−0.984+0.018−0.984
DtnSection 5−3.586−1.886−0.327
DnSection 5−0.984+0.018+0.683
DLnAppendix B−1.492−0.499Diverges
DLtnAppendix B−0.906−0.070+1.553
DTLAppendix C−0.984+0.011Diverges
DTQAppendix C−3.589−1.611Diverges
DTCAppendix C−3.589−1.611Diverges
Table 2. Largest values of e ( t ) log E = log | y ( t ) y e x ( t ) | for some piecewise analytical continuous and discrete methods and different values of h for Example 2. (The Sect/App column indicates the section or appendix where the methods listed in the first column appear; the subscript e x stands for the exact solution).
Table 2. Largest values of e ( t ) log E = log | y ( t ) y e x ( t ) | for some piecewise analytical continuous and discrete methods and different values of h for Example 2. (The Sect/App column indicates the section or appendix where the methods listed in the first column appear; the subscript e x stands for the exact solution).
MethodSect/App e max ( h = 0.001 ) e max ( h = 0.01 ) e max ( h = 0.1 )
CRFSection 4−6.911−4.909−2.890
CRs2Section 4−3.735−2.733Diverges
CRs3Section 4−7.212−5.209−3.180
CRs4Section 4−6.735−4.731−2.696
CRFs2Section 4−3.735−2.733Diverges
CRFs3Section 4−7.212−5.207−3.158
CRFs4Section 4−7.212−5.207−3.159
CLAppendix A−3.735−2.735−1.731
CLFAppendix A−3.735−2.733Diverges
DRtSection 5.1−7.513−5.513−3.507
DRFtSection 6−6.668−4.668−2.663
DRnSection 5.1−3.736−2.739−1.761
DRFnSection 6−3.736−2.742−1.808
DRmpSection 5.1−7.514−5.513−3.513
DRnp1Section 5.1−3.736−2.738−1.760
DLtSection 6−7.513−5.513−3.514
DLFtSection 6−7.513−5.513−3.493
DLnp1Section 6−3.735−2.729−1.682
DLnSection 6−3.736−2.738−1.762
DLFnSection 6−3.735−2.734−1.720
DLmpSection 6−7.212−5.212−3.214
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Ramos, J.I. Piecewise Analytical Approximation Methods for Initial-Value Problems of Nonlinear Ordinary Differential Equations. Mathematics 2025, 13, 333. https://doi.org/10.3390/math13030333

AMA Style

Ramos JI. Piecewise Analytical Approximation Methods for Initial-Value Problems of Nonlinear Ordinary Differential Equations. Mathematics. 2025; 13(3):333. https://doi.org/10.3390/math13030333

Chicago/Turabian Style

Ramos, Juan I. 2025. "Piecewise Analytical Approximation Methods for Initial-Value Problems of Nonlinear Ordinary Differential Equations" Mathematics 13, no. 3: 333. https://doi.org/10.3390/math13030333

APA Style

Ramos, J. I. (2025). Piecewise Analytical Approximation Methods for Initial-Value Problems of Nonlinear Ordinary Differential Equations. Mathematics, 13(3), 333. https://doi.org/10.3390/math13030333

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop