Discrete and Continuous Models and Applied Computational ScienceDiscrete and Continuous Models and Applied Computational Science2658-46702658-7149Peoples' Friendship University of Russia named after Patrice Lumumba (RUDN University)3511110.22363/2658-4670-2023-31-2-150-163Research ArticleChebyshev collocation method for solving second order ODEs using integration matricesLovetskiyKonstantin P.<p>Candidate of Sciences in Physics and Mathematics, Associate Professor of Department of Applied Probability and Informatics</p>lovetskiy-kp@rudn.ruhttps://orcid.org/0000-0002-3645-1060KulyabovDmitry S.<p>Professor, Doctor of Sciences in Physics and Mathematics, Professor at the Department of Applied Probability and Informatics of Peoples’ Friendship University of Russia named after Patrice Lumumba (RUDN University); Senior Researcher of Laboratory of Information Technologies, Joint Institute for Nuclear Research</p>kulyabov-ds@rudn.ruhttps://orcid.org/0000-0002-0877-7063SevastianovLeonid A.<p>Professor, Doctor of Sciences in Physics and Mathematics, Professor at the Department of Applied Probability and Informatics of Peoples’ Friendship University of Russia named after Patrice Lumumba (RUDN University); Leading Researcher of Bogoliubov Laboratory of Theoretical Physics, Joint Institute for Nuclear Research</p>sevastianov-la@rudn.ruhttps://orcid.org/0000-0002-1856-4643SergeevStepan V.<p>PhD student of Department of Applied Probability and Informatics</p>1142220124@rudn.ruhttps://orcid.org/0009-0004-1159-4745RUDN UniversityJoint Institute for Nuclear Research3006202331215016329062023Copyright © 2023, Lovetskiy K.P., Kulyabov D.S., Sevastianov L.A., Sergeev S.V.2023<p style="text-align: justify;">The spectral collocation method for solving two-point boundary value problems for second order differential equations is implemented, based on representing the solution as an expansion in Chebyshev polynomials. The approach allows a stable calculation of both the spectral representation of the solution and its pointwise representation on any required grid in the definition domain of the equation and additional conditions of the multipoint problem. For the effective construction of SLAE, the solution of which gives the desired coefficients, the Chebyshev matrices of spectral integration are actively used. The proposed algorithms have a high accuracy for moderate-dimension systems of linear algebraic equations. The matrix of the system remains well-conditioned and, with an increase in the number of collocation points, allows finding solutions with ever-increasing accuracy.</p>ordinary differential equationspectral methodstwo-point boundary value problemsобыкновенное дифференциальное уравнениеспектральные методыдвухточечные краевые задачи1. Introduction Ordinary differential equations (ODEs) and systems of ODEs of the second order describe most problems in classical mechanics. Most oscillatory processes are described by second order ODEs or systems of ODEs. Second order ODE systems describe a number of optical diffraction problems (see, for example, [1]). The model of adiabatic guided wave propagation of polarized light in integrated optical waveguides is also described by a system of two coupled oscillators [2-4]. There are many different methods for exact and approximate solution of initial/boundary value problems for different classes of second order ordinary differential equations. Among them, the spectral methods of expansion in Chebyshev polynomials consistently occupy a well-deserved place. In 1991, L. Greengard [5] formulated a method for solving a two-point boundary value problem for second order ODEs with constant coefficients, based on expanding the solution into a series of Chebyshev polynomials of the first kind. The method became stably referred to as the pseudospectral collocation method. In the same paper, mathematical constructions were introduced, which later received the names “differentiation matrix” and “integration matrix” (or “antidifferentiation matrix”). A detailed description of the properties of matrices that determine the relationship between the expansion coefficients in a series of approximated functions and the expansion coefficients of their derivatives and antiderivatives in the same set of basis functions is given in [6]. Greengard obtained estimates for the norms of these matrices and their condition numbers - large values for differentiation matrices and small values for integration (antidifferentiation) matrices. Despite the poor conditionality of differentiation matrices, many authors used them to solve initial and boundary problems for ODEs of various orders. This is explained by the more familiar and therefore ‘convenient’ representation of physical models using the language of mathematical formulas. The instability of widely used [7, 8] algorithms has been overcome by applying methods of preconditioning to the corresponding systems of linear algebraic equations. As a result of numerous studies, methods based on integration matrices in the physical space and in the spectral representation turned out to be the most preferable [9]. It is important to note that none of the applied methods for solving ODEs based on Chebyshev integration matrices [9, 10] allows obtaining systems of linear equations with sparse matrices [5]. The dense filling of matrices is a consequence of attempts to introduce boundary conditions into the system of linear algebraic equations along with differential relations [11]. The high sparseness of the matrices can be maintained by improving the algorithm by switching to the two-stage method. In this case, at the first stage, differential conditions are considered, which allow fixing the leading coefficients in the expansion of the solution into a series, thus defining the ‘general solution’. The next step uses boundary/initial conditions to determine a pair (for second order equations) of missing coefficients. This makes it possible to obtain a complete set of expansion coefficients for the desired ‘particular’ solution. The results of studies [5] demonstrate that the method of Chebyshev collocation that ensures the best accuracy in solving initial and boundary value problems is the method using Chebyshev integration matrices in the spectral space. This approach effectively relies on the use of operations with sparse matrices and its computational costs are quite comparable with the Fourier spectral discretization. 2. Setting of the problem We consider an approximate solution to the two-point boundary value problem for the second-order differential equation having the form [12][V. A. Soifer, Diffraction computer optics [Difraktsionnaya komp’yuternaya optika]. M.: FIZMATLIT, 2007, in Russian.][A. A. Egorov and L. A. Sevastianov, “Structure of modes of a smoothly irregular integrated-optical four-layer three-dimensional waveguide,” Quantum Electronics, vol. 39, no. 6, pp. 566-574, Jun. 2009. DOI: 10. 1070/QE2009v039n06ABEH013966.][A. L. Sevastianov, “Asymptotic method for constructing a model of adiabatic guided modes of smoothly irregular integrated optical waveguides,” Discrete and Continuous Models and Applied Computational Science, vol. 28, no. 3, pp. 252-273, 2020. DOI: 10.22363/2658-4670-2020-28-3-252-273.][A. L. Sevastianov, “Single-mode propagation of adiabatic guided modes in smoothly irregular integral optical waveguides,” Discrete and Continuous Models and Applied Computational Science, vol. 28, no. 4, pp. 361-377, 2020. DOI: 10.22363/2658-4670-2020-28-4-361-377.][L. Greengard, “Spectral integration and two-point boundary value problems,” SIAM Journal on Numerical Analysis, vol. 28, no. 4, pp. 1071-1080, 1991. DOI: 10.1137/0728057.][A. Amiraslani, R. M. Corless, and M. Gunasingam, “Differentiation matrices for univariate polynomials,” Numerical Algorithms, vol. 83, no. 1, pp. 1-31, 2020. DOI: 10.1007/s11075-019-00668-z.][J. P. Boyd, Chebyshev and Fourier spectral methods, second. Dover Books on Mathematics, 2013.][J. C. Mason and D. C. Handscomb, Chebyshev polynomials. New York: Chapman and Hall/CRC Press, 2002. DOI: 10.1201/9781420036114.][S. E. El-gendi, “Chebyshev solution of differential, integral and integrodifferential equations,” The Computer Journal, vol. 12, no. 3, pp. 282-287, Aug. 1969. DOI: 10.1093/comjnl/12.3.282.][L. N. Trefethen, “Is Gauss quadrature better than Clenshaw-Curtis?” SIAM Review, vol. 50, no. 1, pp. 67-87, 2008. DOI: 10.1137/060659831.][L. A. Sevastianov, K. P. Lovetskiy, and D. S. Kulyabov, “A new approach to the formation of systems of linear algebraic equations for solving ordinary differential equations by the collocation method [Novyy podkhod k formirovaniyu sistem lineynykh algebraicheskikh uravneniy dlya resheniya obyknovennykh differentsial’nykh uravneniy metodom kollokatsiy],” Izvestiya of Saratov University. Mathematics. Mechanics. Informatics, vol. 23, no. 1, pp. 36-47, 2023, in Russian. DOI: 10.18500/1816-9791-2023-23-1-36-47.][N. Egidi and P. Maponi, “A spectral method for the solution of boundary value problems,” Applied Mathematics and Computation, vol. 409, p. 125 812, 2021. DOI: 10.1016/j.amc.2020.125812.][H. B. Keller, Numerical methods for two-point boundary value problems. Boston: Ginn-Blaisdell, 1968.][D. Gottlieb and S. A. Orszag, Numerical analysis of spectral methods. Philadelphia, PA: Society for Industrial and Applied Mathematics, 1977.][J. F. Epperson, An introduction to numerical methods and analysis, second. John Wiley & Sons, Inc, 2013.][X. Zhang and J. P. Boyd, Asymptotic coefficients and errors for Chebyshev polynomial approximations with weak endpoint singularities: effects of different bases, 2022. DOI: 10.48550/arXiv.2103.11841.][J. P. Boyd and D. H. Gally, “Numerical experiments on the accuracy of the Chebyshev-Frobenius companion matrix method for finding the zeros of a truncated series of Chebyshev polynomials,” Journal of Computational and Applied Mathematics, vol. 205, no. 1, pp. 281-295, 2007. DOI: 10.1016/j.cam.2006.05.006.][B. Fornberg, A practical guide to pseudospectral methods. New York: Cambridge University Press, 1996.][F. Rezaei, M. Hadizadeh, R. Corless, and A. Amiraslani, “Structural analysis of matrix integration operators in polynomial bases,” Banach Journal of Mathematical Analysis, vol. 16, no. 1, p. 5, 2022. DOI: 10. 1007/s43037-021-00156-4.][L. C. Young, “Orthogonal collocation revisited,” Computer methods in Applied Mechanics and Engineering, vol. 345, pp. 1033-1076, 2019. DOI: 10.1016/j.cma.2018.10.019.][S. Olver and A. Townsend, “A fast and well-conditioned spectral method,” SIAM Review, vol. 55, no. 3, pp. 462-489, 2013. DOI: 10.1137/120865458.][M. Planitz et al., Numerical recipes: the art of scientific computing, 3rd Edition. New York: Cambridge University Press, 2007.][L. A. Sevastianov, K. P. Lovetskiy, and D. S. Kulyabov, “Multistage collocation pseudo-spectral method for the solution of the first order linear ODE,” in 2022 VIII International Conference on Information Technology and Nanotechnology (ITNT), 2022, pp. 1-6. DOI: 10.1109/ITNT55410.2022.9848731.]