PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_matop_real_gen_matrix_actexp (f01ga)
Purpose
nag_matop_real_gen_matrix_actexp (f01ga) computes the action of the matrix exponential , on the matrix , where is a real by matrix, is a real by matrix and is a real scalar.
Syntax
[
a,
b,
ifail] = nag_matop_real_gen_matrix_actexp(
m,
a,
b,
t, 'n',
n)
Note: the interface to this routine has changed since earlier releases of the toolbox:
At Mark 25: |
m was made optional |
Description
is computed using the algorithm described in
Al–Mohy and Higham (2011) which uses a truncated Taylor series to compute the product
without explicitly forming
.
References
Al–Mohy A H and Higham N J (2011) Computing the action of the matrix exponential, with an application to exponential integrators SIAM J. Sci. Statist. Comput. 33(2) 488-511
Higham N J (2008) Functions of Matrices: Theory and Computation SIAM, Philadelphia, PA, USA
Parameters
Compulsory Input Parameters
- 1:
– int64int32nag_int scalar
-
, the number of columns of the matrix .
Constraint:
.
- 2:
– double array
-
The first dimension of the array
a must be at least
.
The second dimension of the array
a must be at least
.
The by matrix .
- 3:
– double array
-
The first dimension of the array
b must be at least
.
The second dimension of the array
b must be at least
.
The by matrix .
- 4:
– double scalar
-
The scalar .
Optional Input Parameters
- 1:
– int64int32nag_int scalar
-
Default:
the first dimension of the arrays
a,
b. (An error is raised if these dimensions are not equal.)
, the order of the matrix .
Constraint:
.
Output Parameters
- 1:
– double array
-
The first dimension of the array
a will be
.
The second dimension of the array
a will be
.
is overwritten during the computation.
- 2:
– double array
-
The first dimension of the array
b will be
.
The second dimension of the array
b will be
.
The by matrix .
- 3:
– int64int32nag_int scalar
unless the function detects an error (see
Error Indicators and Warnings).
Error Indicators and Warnings
Errors or warnings detected by the function:
Cases prefixed with W are classified as warnings and
do not generate an error of type NAG:error_n. See nag_issue_warnings.
- W
-
has been computed using an IEEE double precision Taylor series, although the arithmetic precision is higher than IEEE double precision.
-
-
Constraint: .
-
-
Constraint: .
-
-
Constraint: .
-
-
Constraint: .
-
An unexpected error has been triggered by this routine. Please
contact
NAG.
-
Your licence key may have expired or may not have been installed correctly.
-
Dynamic memory allocation failed.
Accuracy
For a symmetric matrix
(for which
) the computed matrix
is guaranteed to be close to the exact matrix, that is, the method is forward stable. No such guarantee can be given for non-symmetric matrices. See Section 4 of
Al–Mohy and Higham (2011) for details and further discussion.
Further Comments
The matrix
could be computed by explicitly forming
using
nag_matop_real_gen_matrix_exp (f01ec) and multiplying
by the result. However, experiments show that it is usually both more accurate and quicker to use
nag_matop_real_gen_matrix_actexp (f01ga).
The cost of the algorithm is . The precise cost depends on since a combination of balancing, shifting and scaling is used prior to the Taylor series evaluation.
Approximately of real allocatable memory is required by nag_matop_real_gen_matrix_actexp (f01ga).
nag_matop_complex_gen_matrix_actexp (f01ha) can be used to compute
for complex
,
, and
.
nag_matop_real_gen_matrix_actexp_rcomm (f01gb) provides an implementation of the algorithm with a reverse communication interface, which returns control to the user when matrix multiplications are required. This should be used if
is large and sparse.
Example
This example computes
, where
and
Open in the MATLAB editor:
f01ga_example
function f01ga_example
fprintf('f01ga example results\n\n');
a = [0.7,-0.2, 1.0, 0.3;
0.3, 0.7, 1.2, 1.0;
0.9, 0.0, 0.2, 0.7;
2.4, 0.1, 0.0, 0.2];
b = [0.1, 1.2;
1.3, 0.2;
0.0, 1.0;
0.4,-0.9];
t = 1.2;
[a, exptab, ifail] = f01ga(a, b, t);
disp('exp(tA)B');
disp(exptab);
f01ga example results
exp(tA)B
0.2138 7.6756
4.9980 11.6051
0.8307 7.5468
1.2406 9.7261
PDF version (NAG web site
, 64-bit version, 64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015