# Two Taylor Algorithms for Computing the Action of the Matrix Exponential on a Vector
## 1 Introduction  
The study of different matrix functions \(f(A)\), where \(A\in\mathbb{C}^{n\times n}\), such as the exponential, the trigonometric and hyperbolic functions, the logarithm or the sign, and several families of orthogonal matrix polynomials, among which are those of [PERSON], [PERSON], [PERSON], or [PERSON], form an attractive, wide, and active field of research due to their numerous applications in different areas of science and technology. In the last years, the matrix exponential \(e^{A}\) has become a constant focus of attention due to its extensive applications--from the classical theory of differential equations for computing the solution of the matrix system \(Y^{\prime}(t)=AY(t)\), given by \(Y(t)=e^{At}\), to the graph theory [1, 2, 3], even including some recent progress about the numerical solutions of fractional partial differential equations [4, 5]--as well as the multiple difficulties involved in its effective computation. They have motivated the development of distinct numerical methods, some of them classic and very well-known, as described in [6], and other more recent and novel using, for example, Bernoulli matrix polynomials [7]. Nevertheless, sometimes it is not the computation of the function \(f(A)\) on a square matrix \(A\) which is required by applications, but its action on a given vector \(v\in\mathbb{C}^{n}\), i.e., \(f(A)v\). Once again, the motivation for this particular problem may come from its applicability in different and varied branches of science and engineering. As an example, the action of the matrix sign on a vector is used in quantum chromodynamics (QCD), see [8] for details. Furthermore, in particular, the action of the matrix exponential operator on a vectorappears in multiple problems arising in areas of mathematics, as in the case of the following first-order matrix differential equation with initial conditions and constant coefficients  
\[ \begin{array}{rcl}Y^{\prime}(t)&=&AY(t)\\ Y(0)&=&v\end{array} \Bigg{\}},\]  
being \(A\in\mathbb{C}^{n\times n}\) and \(v\in\mathbb{C}^{n}\), and whose solution is in the form \(Y(t)=e^{At}v\in\mathbb{C}^{n}\)--this kind of problem occurs frequently, for example, in control theory--or in applications involving the numerical solutions of fractional partial differential equations [9]. Moreover, the action of the matrix exponential on a vector is also used in physics and engineering fields such as electromagnetics [10], circuit theory [11], acoustic/elastic wave equations [12], seismic wave propagation [13], chemical engineering [14], robotics [15], and so on. There exist different methods in the literature to calculate the action of the exponential matrix on a vector (see for example those described in references [16; 17; 18; 19; 20; 21]). Additionally, a comparison of recent software can be found in [22]. Among these methods, those based on Krylov subspaces [23]--they reduce the \(e^{A}v\) problem to a corresponding one for a small matrix using a projection technique--and those based on polynomial or Pade approximations, see [16; 17; 24] and references therein, can be highlighted. When computing \(e^{A}v\), the approach using Taylor method, in combination with the scaling and squaring technique, consists of determining the order \(m\) of the Taylor polynomial \(T_{m}(A)\) and a positive integer \(s\), called the scaling factor, so that \(e^{A}v\approx\left(T_{m}(2^{-s}A)\right)^{2^{s}}v\). Indeed, in this paper, two algorithms that calculate \(e^{A}v\) without explicitly computing \(e^{A}\) have been designed and implemented in MATLAB language. Both of them are based on truncating and computing the Taylor series of the matrix exponential, after having obtained the values of \(m\) and \(s\) by means of a backward or forward error analysis. Throughout this work, we will denote the matrix identity of order \(n\) as \(I_{n}\) or \(I\). With \(\lceil x\rceil\), we will represent the result of rounding \(x\) to the nearest integer greater than or equal to \(x\).