Approximating the matrix exponential, sine and cosine via the spectral method

Document Type : Research Paper


1 Department of Mathematics and Physics, Faculty of Science and Technology, University of Stavanger, Stavanger, Rogaland, Norway

2 Department of Mathematics, Faculty of Science, Babol Noshirvani University of Technology, Babol, Mazandaran, Iran


This article is arranged to introduce three different algorithms for computing the matrix exponential, cosine and sine functions $At$ for $0\leq t \leq b$,  for all $b \in \mathbb{R^+}$. To achieve this purpose, we deal with the spectral method based on Bernstein polynomials. Bernstein polynomials are briefly introduced and utilized to approximate the functions. The operational matrix of integration of Bernstein polynomials is stated and employed to reduce the dynamic systems to the linear algebraic systems. It is required to solve $n$  linear algebraic systems for evaluating the matrix functions. By presenting the CPU time, it is displayed that the methods require a low amount of running time. Also, error analysis is discussed in detail. The outstanding point of this method is that the approximate exponential, cosine and sine matrix  $At_0$,  for all $t_0\in[0, L]$  can be obtained with only one execution of the algorithm. These three different algorithms have common parts that can be used to practically reduce the computational volume. Some examples are provided to show the high performance of the methods.


[1] A.H. Al-Mohy and N.J. Higham, A new scaling and squaring algorithm for the matrix exponential, SIAM J. Matrix Anal. Appl. 31 (2010), 970–989.
[2] A.H. Al-Mohy, N.J. Higham and S.D. Relton, New algorithms for computing the matrix sine and cosine separately or simultaneously, SIAM J. Sci. Comput. 37 (2015), 56–87.
[3] P. Bader, S. Blanes and F. Casas, Computing the matrix exponential with an optimized Taylor polynomial approximation, Math. 7 (2019), 1174.
[4] J.M. Carnicer and J.M. Pe˜na, Shape preserving representations and optimality of the Bernstein basis, Adv. Comput. Math. 1 (1993), no. 2, 173–196.
[5] E. Defez and L. J´odar, Some applications of Hermite matrix polynomials series expansions, J. Comput. Appl. Math. 99 (1998), 105–117.
[6] E. Defez, J. Sastre, J. IbIb´a˜nez and P. Ruiz, Computing matrix functions arising in engineering models with orthogonal matrix polynomials, Math. Comput. Modell. 57 (2013), 1738–1743.
[7] E. Defez, J. Sastre, J. IbIb´a˜nez and P.A. Ruiz, Computing matrix functions solving coupled differential models, Math. Comput. Modell. 50 (2009), 831–839.
[8] M. Dehghan and A. Taleei, Numerical solution of nonlinear Schr¨odinger equation by using time-space pseudospectral method, Numer. Meth. Part. Differ. Equ. 26 (2010), no. 4, 979–992.
[9] R.T. Farouki, The Bernstein polynomial basis: A centennial retrospective, Comput. Aided Geom. Design 29 (2012), 379–419.
[10] N.J. Higham and A.H. Al-Mohy, Computing matrix functions, Acta Numer. 19 (2010), 159–208.
[11] J.H. Hubbard and B.H. West, Differential equations: A dynamical systems approach: Ordinary differential equations, Springer-Verlag, New York, 2013.
[12] E. Kreyszig, Introductory functional analysis with applications,Wiley, New York, 1978.
[13] X. Li and C. Xu, A space-time spectral method for the time fractional diffusion equation, SIAM J. Numer. Anal. 47 (2009), 2108–2131.
[14] E. Liz, Classroom note: A note on the matrix exponential, SIAM Rev. 40 (1998), 700–702.
[15] I.E. Leonard, The matrix exponential, SIAM Rev. 38 (1996), 507–512.
[16] A. Saadatmandi and M. Dehghan, Numerical solution of hyperbolic telegraph equation using the Chebyshev tau method, Numer. Meth. Part. Differ. Equ. 26 (2010), 239–252.
[17] J. Sastre, J. IbIb´a˜nez and E. Defez, Boosting the computation of the matrix exponential, Appl. Math. Comput. 340 (2019), 206–220.
[18] J. Sastre, J. Ib´a˜nez, P. Alonso-Jord´a, J. Peinado and E. Defez, Fast Taylor polynomial evaluation for the computation of the matrix cosine, J. Comput. Appl. Math. 354 (2019), 641–650.
[19] S.M. Serbin and S.A. Blalock, An algorithm for computing the matrix cosine, SIAM J. Sci. Statist. Comput. 1 (1980), no. 2, 198–204.
[20] M. Seydaoˇglu, P. Bader, S. Blanes and F. Casas, Computing the matrix sine and cosine simultaneously with a reduced number of products, Appl. Numer. Math. 163 (2021), 96–107.
[21] R.B. Sidje, Expokit: A software package for computing matrix exponentials, ACM Trans Math Software 24 (1998), 130–156.
[22] C. Moler and C.V. Loan, Nineteen dubious ways to compute the exponential of a matrix, twenty-five years later, SIAM Rev. 45 (2003), 3–49.
[23] J.A. Wood, The chain rule for matrix exponential functions, College Math. J. 35 (2004), 220–222.
[24] H.D. Vo and R.B. Sidje, Approximating the large sparse matrix exponential using incomplete orthogonalization and Krylov subspaces of variable dimension, Numer. Linear Algebra Appl. 24 (2017), 1–13.
[25] S.A. Yousefi and M. Behroozifar, Operational matrices of Bernstein polynomials and their applications, Int. J. Syst. Sci. 41 (2010), 709–716.
[26] S.A. Yousefi, M. Behroozifar and M. Dehghan, The operational matrices of Bernstein polynomials for solving the parabolic equation subject to specification of the mass, J. Comput. Appl. Math. 235 (2011), 5272–5283.
Volume 14, Issue 1
January 2023
Pages 2881-2900
  • Receive Date: 28 January 2022
  • Revise Date: 30 June 2022
  • Accept Date: 17 July 2022