Abstract
A new approach for numerical solving initial value problems for systems of second-order nonlinear ordinary differential equations with a singularity of the first kind at the start point \(x=0\) is proposed. By substitution of the independent variable \(x=e^t\), we reduce the original initial value problem on the interval [0, a] to the equivalent one on the interval \((-\infty ,\ln a]\). For solving this initial value problem at the grid node \(t_0\) of finite grid \(\{ t_{n}\in ( {-\infty , \ln a}], n =0,1,...,N, t_{N} = \ln a\}\), new fourth-order explicit Runge-Kutta-type methods have been constructed. For finding the solution in other nodes of the grid, we can apply any of the standard Runge-Kutta methods or linear multistep ones, using the solution at the point \(t_0\), calculated by the constructed in this article methods, as an initial condition. For the proposed approach, a new effective numerical algorithm with a given tolerance has been developed.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
The initial value problems (IVPs) for nonlinear singular equations of Lane-Emdem type
are encountered in many scientific and engineering fields [3, 12]. Several approximate analytical methods for solving such singular nonlinear problems have been proposed: Adomian’s decomposition method [25], perturbation technique based on an artificial parameter [2], linearization technique [18], homotopy perturbation method [17], integral transform method [13] etc. Mainly, these methods can be used for finding solutions only in a small vicinity of the point \(x=0\). Moreover, in the general case, there are no methods that would allow us to find an approximate analytical solution of singular IVPs for systems of nonlinear ODEs.
Standard numerical methods for solving this type of problem often also work badly since the equation has a singularity at \(x=0\). In [9, 11] it was established that the application of Runge-Kutta and linear multistep methods to singular IVPs leads to order reduction of these methods. This fact does not allow for the correct using any of the known algorithms for practical error estimation and automatic selection of step size. Moreover, in [11] it was shown that in a general case, the order of arbitrary s-stage explicit Runge-Kutta methods is at most two.
It should be noted that for solving singular IVPs collocation methods (see, e.g., [1, 10, 14]) may be used. Typically, collocation methods are applied to singular boundary value problems (BVPs), which are more difficult for numerical solving than IVPs. However, it is well known (see [6, p. 212], Theorem 7.7) that for IVPs the collocation methods are equivalent to implicit Runge-Kutta methods. Last time also hybrid block methods were developed [20,21,22,23], which allow solving the IVPs for the Lane-Emden problem with a variable step size. However, the above-mentioned methods are implicit and require big computational costs for solving systems of nonlinear algebraic equations by Newton’s iterative method, especially in the case of systems of ODEs of large dimensions. A nonlinear explicit one-step numerical schemes for IVPs with other types singularities are considered in [19]. We refer readers to [21, 22] and references therein to introduce present trends in solving the considered problem in more detail.
In this paper, we consider the next singular IVP
where \(\mathbb {R}^s\) is the space of s-measurable vectors with a scalar product (u, v) and norm \(\Vert u\Vert =(u,u)^{1/2},\;\lambda>0,\;c_1\Vert u\Vert \le (K(x)u,u) \; \forall x\in [0,a],\; u\in \mathbb {R}^s,\; c_1>0\). Note that the last condition implies that there exists an inverse matrix \(K^{-1}(x)\) and \(\Vert K^{-1}(x)\Vert \le 1/c_1.\) It is known (see [24]) that the solutions u(x) and \(K(x)\frac{du}{dx}\) of the problem (1), (2) are continuous if \(K(x)=\{k_{ij}(x)\}_{i,j=1}^s, f(x,u)=\{f_i(x,u)\}_{i=1}^s\) satisfy the conditions
The problem (1), (2) arises when axial or central symmetry is used for reducing systems of partial differential equations to ordinary ones and it includes at least all systems of the Lane-Embden type equations. The interest in this problem is connected also with the fact that three-point difference schemes of high-order accuracy (see [5, 15]) for solving singular BVPs require the solution of the associated singular IVPs.
In our article, we present an approach that allows us to construct explicit fourth-order Runge-Kutta methods that do not lose their order in the solution of the singular problem (1)–(2). For the constructed methods, we developed an effective numerical algorithm for solving the problem (1)–(2) with a given tolerance. We also compared the efficiency of our methods with the implicit Runge-Kutta methods of collocation type, namely with one of the best codes RADAU5 (see [7]). The performed numerical experiments demonstrate a significant advantage of our approach over the implicit Runge-Kutta methods.
The organization of this paper is as follows: In Sect. 2, using the substitution \(x=e^t\) we reduce the problem (1), (2) to an IVP on an infinite interval \((-\infty ,\ln a]\). For finding the numerical solution of this IVP near the singularity point, i.e., at the node \(t_0\) of some finite irregular grid \(\{t_n\in (-\infty ,\ln a],\) \(n=0,1,...,N, t_{N}=\ln a\}\) similarly to [16] we construct the Taylor series method and 3-stage Runge-Kutta type method of order 4. For finding the numerical solution at other points of nodes of the grid we apply the standard explicit four-order Runge-Kutta methods. In Sect. 3, we prove this approach allows for guaranteeing the fourth order of accuracy on the entire interval. In Sect. 4, the algorithm for error estimation and step size selection for numerical solving IVPs near the singular point with a given tolerance which is based on Richardson extrapolation is described. The effectiveness of the presented approach is demonstrated by numerical examples in Sect. 5.
2 Construction of Runge-Kutta type methods near the singular point
The problem (1), (2) can be rewritten in the following form
We assume that the solution of the problem (3)–(5) exists, is unique and has the necessary properties of smooth.
Using the substitution \(x=e^t\) we reduce the problem (3)–(5) to the following one
where \(U(t)=u(e^t),W(t)=w(e^t),\tilde{K}(t)=K(e^t),\tilde{f}(t,U)=f(e^t,U).\)
On the semi-infinite interval \(( {-\infty ,b}],\,b\le \ln a\) we choose the finite irregular grid \(\hat{\bar{{\omega } }}_{h} = \{ t_{n} \in ( {-\infty ,b}], n =0,1,...,N, t_{N} = b\}\) with the step sizes \(h_{n}=t_{n} -t_{n-1}>0,n=1,2,...,N\). Further on, we will use such a grid near the singularity point.
We postulate the next inequalities at the first node of the grid \(\hat{\bar{{\omega } }}_{h}\)
where \(h_{\max }= \underset{1\le n \le N}{\max }\, h_n, \; h_{\min }= \underset{1\le n \le N}{\min }\, h_n\). The inequalities
and (9) imply the following ones
Due to the conditions \(C_{1}\le {h_{\max }}/{h_{\min }}\le C_{2}\), which are satisfied for arbitrary finite grids, we further obtain the inequalities
where \(C_1\) and \(C_2\) are real constants. It follows that
Note that from (10) we have \(h_{\max }\rightarrow 0, t_{0}\rightarrow -\infty \) as \(N\rightarrow \infty \). As an example, the next equidistant grid
satisfies the conditions (10) with \(C_1=C_2=1\).
Based on (3)–(5), the following statement can be proved.
Lemma 1
Suppose that \(f(x,u)=\{f_i(x,u)\}_{i=1}^s:f_i(x,u)\in C^{(m)}\left( [0,x_0]\times \Omega _{\lambda } ([0,\right. \) \(\left. x_0],r_{\lambda })\right) ,\) \(K(x)=\{k_{ij}(x)\}_{i,j=1}^{s}:k_{ij}(x)\in C^{(m-1)}[0,x_0]\). Then following relations are satisfied
where \(\displaystyle \left( {\begin{array}{c}i\\ j\end{array}}\right) \) are binomial coefficients,
Notice that the formulas (12), (13) hold only near the singularity point \(x=0\). The proof of the lemma is based on the fact that in Taylor’s formula, the limits as \(x\rightarrow 0\) of all singular at a point \(x=0\) derivatives of functions w(x) can be calculated. For more details see please [16].
For the problem (3)–(5), we construct 3-stage explicit Runge-Kutta type methods which have the fourth order near the singularity point \(x=0\) the following form
where \(c_2, c_3, a_{21}, a_{31}, r_{31},a_{32}, d_{1},p_{1}, q_{1}, d_{2}, p_{2},\) \(d_{3}, b_1, b_2, b_3\) are real coefficients.
Then we compare the Taylor expansions for numerical solution \(y_0,v_0\) and for exact solution \(u_0,w_0\) (see (13), (12)) and equate equal powers of \(h_0\) up to \(h_0^4\). As a result, we obtain the next system of equations with respect to unknown coefficients:
This system has the solution
3 Error estimation and convergence for Runge-Kutta type methods
The IVP (6)–(8) can be rewritten in the following form
where
Then the numerical solution of problem (21) at the grid nodes \(\hat{\bar{{\omega } }}_{h}\) can be obtained by a step-by-step procedure
where
Let the conditions
and assumptions of Lemma 1 be fulfilled.
If conditions (15)–(20) and the order conditions for (23)
are satisfied then the method (22), (23) is of order 4.
Let \((Z,Y)_{\mathbb {R}^{2s}}=(U,Y^{(1)})+(W,Y^{(2)})\) be a scalar product of vectors \(Z=(U,W)\), \(Y=(Y^{(1)},Y^{(2)})\in \mathbb {R}^{2s}\) and \(\Vert Z\Vert _{\mathbb {R}^{2s}}=(Z,Z)^{1/2}_{\mathbb {R}^{2s}}\) is the norm of vector \(Z\in \mathbb {R}^{2s}\). For the fourth-order method (22), the local error estimations, which follow from the relations \(y_0-u_0=O(h_0^5),v_0-w_0=O(h_0^5)\) and the analogous relations for the standard Runge-Kutta methods, have the following form
where the constant C is independent of \(h_n\).
Taking into account the equality
the Cauchy-Schwarz inequality, the Lipschitz condition for function \(\tilde{f}(t,U)=f(e^t,U)\), the condition \(\Vert \tilde{K}^{-1}(t)\Vert =\Vert K^{-1}(e^t)\Vert \le \frac{1}{c_1}\) and the inequality \(|ab|\le \frac{1}{2}(a^2+b^2)\) we obtain
where \(\mathcal {L}=\frac{1}{2}(1/c_1+L).\)
Now, we can prove the next theorem.
Theorem 1
Suppose that \(l(t)=\mathcal {L}e^t\) is one-sided Lipschitz constant for F in the neighborhood \(\Delta =\{(t,Z(t))|t_0\le t\le \ln a\}\) of the exact solution Z(t) of the problem (21) and the local error estimates (24) are valid. Then the global error \(E=Y_N-Z_N\) can be estimated by
where \(h=\max \{h_0,h_{\max }\},x_0=e^{t_0}\), \(E_{1}(x)\) is the following exponential integral
Proof
From Theorem 10.6 (see [6, p. 61]) with \(\delta =0\) we have
Then we insert it into the estimation for the global error
Taking into account that \(x_0=e^{t_0}\), we get
\(\square \)
From the inequality (25) it follows that the method (22) is convergent of the fourth order for fixed \(t_n,n=0,1,...,N\) as \(N\rightarrow \infty \).
4 Algorithm for numerical solving singular IVPs
In this section, we describe the algorithm that automatically selects the node \(t_0=b-\sqrt{N}\) of the grid (11) and the step size \(h_0=e^{t_0}\) to achieve a prescribed tolerance of the local error.
Using a fixed Runge-Kutta-type method of order 4 (14) for a given N and \(b=\ln a\) with a step \(h_0=e^{b-\sqrt{N}}\) we find a solution of IVP (6)–(8) \(y_0,v_0\) at the point \(t_0=b-\sqrt{N}\). Based on point \((t_0,y_0,v_0)\) and step size \(h=1/\sqrt{N}\), we compute two steps, using a fixed standard Runge-Kutta method of order 4, and obtain the numerical solution of IVP (6)–(8) \(y_1^h,v_1^h\), \(y_2^h,v_2^h\) at points \(t_1=t_0+h,t_2=t_1+h\) respectively. Starting from point \((t_0,y_0,v_0)\), we also compute one step with step size \(2h=2/\sqrt{N}\) to obtain the solution \(y_2^{2h},v_2^{2h}\) at the point \(t_2=t_0+2h\). Then, according to the Richardson extrapolation algorithm, the error estimations of \(y_2^h,v_2^h\) are as follows
We want these errors to satisfy the componentwise conditions
where Atol and Rtol are the desired tolerances prescribed by the user (relative ones are considered for \(Atol=0\), absolute — for \(Rtol=0\); usually both tolerances are different from zero). Then, if the componentwise conditions are fulfilled, the computed step is accepted. Otherwise, the step is rejected and the computations are repeated with \(N_{new}=4N\), \(b_{new}=t_2\).
With increasing N the grid node \(t_0=b-\sqrt{N}\) approaches the point \(t=-\infty \). At the same time step size \(h=1/\sqrt{N}\) decreases. Due to this reason, we used the local Richardson’s strategy for practical error estimation and step size selection, and not some other approach.
The values
are approximations of order 5 for \(u(t_0+2h)\) and \(w(t_0+2h)\) correspondingly.
The numerical solutions \(\hat{y}_2^h,\hat{v}_2^h\) or \(y_2^h,v_2^h\) at the node \(t_2=t_0+2h\), calculated by the above-described algorithm, we use as initial conditions for solving the problem (6)–(8) with the same tolerance on interval \((t_2,\ln a]\). For this, we can apply the standard explicit Runge-Kutta methods of order 4 with Richardson strategy or embedded Runge-Kutta methods 5(4) (see, e.g., [6, pp. 164–168]).
5 Numerical examples
Example 1
Let us consider the singular IVP for system of ODEs
with the exact solution \( \displaystyle u_1(x)=e^{-x^2},\; u_2(x)=x^2+x^4.\)
We solved the problem (26) with a given tolerance, using our algorithm near the singular point. At other points of the interval we applied embedded Dormand-Prince-5(4) methods [4] (code DOPRI5 [6]) and Adams methods with functional iteration (code DLSODE [8]) accordingly. The results of the solving are given in Tables 1 and 2. In the tables, NSTEP and NFUN denote the number of steps and the number of right-hand side evaluations of the differential equations,
CPU denotes the time needed to solve the problem.
To compare the results we have solved the problem (26) by implicit Runge-Kutta (code RADAU5 [7]). The results of the solving are given in Table 3, where NJAC is the number of Jacobian evaluations, and NDEC is the number of LU-decompositions of matrices.
The code RADAU5 requires using of the iterative Newton method, and therefore the Jacobian evaluations and solving systems of linear equations. As a consequence of it, computational costs to solve the problem (26) for our approach are less than for implicit Runge-Kutta methods.
Example 2
Consider one more IVP
with the exact solution \( \displaystyle u_1(x)=x^2+e^{x^2},\;u_2(x)=x^2-e^{x^2}.\)
The results of numerical solving of the problem (27) presented in Tables 4, 5, and 6 show the same trend. That is, the approach proposed in the article requires fewer computing resources compared to implicit methods. This advantage of our algorithm obviously will only increase when solving singular systems of higher dimensions.
6 Conclusion
Thus, we presented an approach that demonstrates how to construct explicit fourth-order Runge-Kutta methods that do not lose their order in the numerical solution of the singular IVP. It allowed us to develop a numerical algorithm for solving IVPs with a given tolerance. The results of numerical experiments demonstrate that the combination of presented explicit Runge-Kutta methods for finding the solution near the singularity point with standard explicit Runge-Kutta or linear multistep ones is a very effective way for solving singular initial value problems. This approach can be also generalized for a wider class of IVPs.
Availability of supporting data
Not applicable
References
Auzinger, W., Kneisl, G., Koch, O., Weinmüller, E.: A collocation code for singular boundary value problems in ordinary differential equations. Numer. Algorithms 33, 27–39 (2003)
Bender, C., Milton, K., Pinsky, S., Simmons, L.: A new perturbative approach to nonlinear problems. J. Math. Phys. 30, 1447–1455 (1989)
Chandrasekhar, S.: An Introduction to the Study of Stellar Structure. Dover Publications Inc., New York (1967)
Dormand, J.R., Prince, P.J.: A family of embedded Runge-Kutta formulae. J. Comp. Appl. Math. 6, 19–26 (1980)
Gavrilyuk, I.P., Hermann, M., Makarov, V.L., Kutniv, M.V.: Exact and Truncated Difference Schemes for Boundary Value ODEs, International Seris of Numerical Mathematics,159. Springer AG, Basel (2011)
Hairer, E., Nørsett, S.P., Wanner, G.: Solving ordinary differential equations I. Nonstiff Problems. Springer Verlag, Berlin, Heidelberg, New York (1993)
Hairer, E., Wanner, G.: Solving Ordinary Differential Equations II. Stiff and Differential-Algebraic Problems. Springer Verlag, Berlin, New York (2002)
Hindmarsh, A.S.: LSODE and LSODI, two new initial value ODE Solvers. ACM-SIGNUM Newsletter 15, 10–11 (1980)
Hoog, F., Weiss, R.: The application of linear multistep methods to singular initial value problems. Math. Comp. 31, 676–690 (1977)
Hoog, F., Weiss, R.: Collocation methods for singular boundary value problems. SIAM J. Numer. Anal. 15, 198–217 (1978)
Hoog, F., Weiss, R.: The application of Runge-Kutta schemes to singular initial value problems. Math. Comp. 44, 93–103 (1985)
Horedt, G.: Polytropes – Applications in Astrophysics and Related Fields. Kluwer Academic Publishers, Dordrecht (2004)
Karimi Vanani, S., Aminataei, A.: On the numerical solution of differential equations of Lane-Emden type. Comput. Math. Appl. 59, 2815–2820 (2010)
Kitzhofer, G., Koch, O., Pulverer, G., Simon, Ch., Weinmüller, E.: The new MATLAB code BVPSUITE for the solution of singular implicit boundary value problems. JNAIAN J. Numer. Anal. Indust. Appl. Math. 5, 113–134 (2010)
Król, M., Kunynets, A.V., Kutniv, M.V.: Exact three-point difference scheme for singular nonlinear boundary value problems. J. Comput. Appl. Math. 298, 175–189 (2016)
Kutniv, M.V., Datsko, B.Y., Kunynets, A.V., Wloch, A.: A new approach to constructing of explicit one-step methods of high order for singular initial value problems for nonlinear ordinary differential equations. Appl. Numer. Math. 148, 140–151 (2020)
Liao, J.: A new analytic algorithm of Lane-Emden type equations. Appl. Math. Comput. 142, 1–16 (2003)
Ramos, J.: Linearization techniques for singular initial-value problems of ordinary differential equations. Appl. Math. Comput. 161, 525–542 (2005)
Ramos, H., Vigo-Aguiar, J.: A new algorithm appropriate for solving singular and singularly perturbed autonomous initial-value problems. Int. J. Comput. Math. 85, 603–611 (2008)
Ramos, H., Rufai, M.: An adaptive pair of one-step hybrid block Nyström methods for singular initial-value problems of Lane-Emden-Fowler type. Math. Comput. Simul. 193, 497–508 (2022)
Rufai, M., Ramos, H.: Numerical solution of second-order singular problems arising in astrophysics by combining a pair of one-step hybrid block Nyström. Astrophys. Space Sci. 365, 96 (2020)
Rufai, M., Ramos, H.: Numerical integration of third-order singular boundary-value problems of Emden-Fowler type using hybrid block techniques. Commun. Nonlinear Sci. Numer. Simul. 105, 106069 (2022)
Rufai, M., Ramos, H.: Solving third-order Lane-Emden-Fowler equations using a variable stepsize formulation of a pair of block methods. J. Comp. Appl. Math. 420, 114776 (2023)
Skrypnik, I.V.: Nonlinear elliptic equations of higher order. Naukowa Dumka, Kiev (1973). (in Russian)
Wazwaz, A.M.: A new method for solving singular initial value problem in second-order ordinary differential equations. Appl. Math. Comp. 128, 45–57 (2002)
Author information
Authors and Affiliations
Contributions
Both authors wrote the main manuscript text, prepared all numerical results, and reviewed the manuscript.
Corresponding authors
Ethics declarations
Ethics approval
Not applicable
Consent to participate
Not applicable
Consent for publication
Not applicable
Conflict of interest
The authors declare no competing interests.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Datsko, B.Y., Kutniv, M.V. Explicit numerical methods for solving singular initial value problems for systems of second-order nonlinear ODEs. Numer Algor (2024). https://doi.org/10.1007/s11075-024-01820-0
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s11075-024-01820-0