0

I am using computer language (Matlab and mathematica) to compute the exponent of a matrix of the form

$$B_n = \exp(n\hat{A}), \qquad n\in \{1, 2,3, \cdots, N\}$$

where $n$ is positive integer and N is some big positive number.$A$ is square matrix of big dimension. In the simulation code, I iterative $n$ from 1 to 40000 and each result $B_n$ will be used as parameter for other computations. The pseudo code is like

A = ... \\ initialize A here
for n=1 to 40000
  Bn = exp(n*A);
  f(Bn); // doing some computations here with Bn as input
end

Since A is so big, it takes some times to compute $\exp(n\hat{A})$ each time in the loop. I wonder if it is possible to separate $n$ and $\hat{A}$ in some way like $Bn \simeq \exp(A)*g(n)$ where $g(n)$ is any function of $n$ only, i.e. separate $\exp(\hat{A})$ from $B_n$ so it will be computed only once. Well, I don't know much on math so it may be wrong to write it as $\exp(A)*g(n)$, but is it any approximation will do so?

1 Answers1

1

As $e^Ae^B = e^{A+B}$, thus $e^{(n+1)A} = e^{nA+A} = e^{nA}e^A$

You can change your calculations to the iterative procedure

A = ... \\ initialize A here
Bn = exp(A)
expA = exp(A)
for n=1 to 40000
  Bn = Bn*expA;
  f(Bn); // doing some computations here with Bn as input
end
lejlot
  • 576