If the matrix function
posses the properties of
, then the recurrence formula
, can be established. Here,
. This provides an algorithm for computing the matrix function
. By specifying the calculation accuracy
p, a method is presented to determine
m and
N in a way that minimizes the time of the above algorithm, thus providing a fast algorithm for
. It is important to note that
m only depends on the calculation accuracy
p and is independent of the matrix
A and
t. Therefore,
has a fixed calculation format that is easily computed. On the other hand,
N depends not only on
A, but also on
t. This provides a means to select
t such that
N is equal to 0, a property of significance. In summary, the algorithm proposed in this article enables users to establish a desired level of accuracy and then utilize it to select the appropriate values for m and N to minimize computation time. This approach ensures that both accuracy and efficiency are addressed concurrently. We develop a general algorithm, then apply it to the exponential, trigonometric, and logarithmic matrix functions, and compare the performance with that of the internal system functions of Mathematica and Pade approximation. In the last section, an example is provided to illustrate the rapid computation of numerical solutions for linear differential equations.
Full article