# expAtv: Compute Matrix Exponential exp(A t) * v directly In expm: Matrix Exponential, Log, 'etc'

## Description

Compute \exp(A t) * v directly, without evaluating \exp(A).

## Usage

 ```1 2 3 4 5``` ```expAtv(A, v, t = 1, method = "Sidje98", rescaleBelow = 1e-6, tol = 1e-07, btol = 1e-07, m.max = 30, mxrej = 10, verbose = getOption("verbose")) ```

## Arguments

 `A` n x n matrix `v` n - vector `t` number (scalar);
 `method` a string indicating the method to be used; there's only one currently; we would like to add newer ones. `rescaleBelow` if `norm(A,"I")` is smaller than `rescaleBelow`, rescale `A` to norm 1 and `t` such that A t remains unchanged. This step is in addition to Sidje's original algorithm and easily seen to be necessary even in simple cases (e.g., n = 3). `tol, btol` tolerances; these are tuning constants of the "Sidje1998" method which the user should typically not change. `m.max, mxrej` integer constants you should only change if you know what you're doing `verbose` flag indicating if the algorithm should be verbose..

## Value

a list with components

 `eAtv` .....fixme...

## Author(s)

Ravi Varadhan, Johns Hopkins University; Martin Maechler (cosmetic, generalization to sparse matrices; rescaling (see `rescaleBelow`).

## References

Roger B. Sidje (1998) EXPOKIT: Software Package for Computing Matrix Exponentials. ACM - Transactions On Mathematical Software 24(1), 130–156.

((NOT yet available!))
Al-Mohy, A. and Higham, N. (2011). Computing the Action of the Matrix Exponential, with an Application to Exponential Integrators. SIAM Journal on Scientific Computing, 33(2), 488–511.

`expm`

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14``` ```source(system.file("demo", "exact-fn.R", package = "expm")) ##-> rnilMat() ; xct10 set.seed(1) (s5 <- Matrix(m5 <- rnilMat(5))); v <- c(1,6:9) (em5 <- expm(m5)) r5 <- expAtv(m5, v) r5. <- expAtv(s5, v) stopifnot(all.equal(r5, r5., tolerance = 1e-14), all.equal(c(em5 %*% v), r5\$eAtv)) v <- 10:1 with(xct10, all.equal(expm(m), expm)) all.equal(c(xct10\$expm %*% v), expAtv(xct10\$m, v)\$eAtv) ```

### Example output

```Loading required package: Matrix

Attaching package: 'expm'

The following object is masked from 'package:Matrix':

expm

5 x 5 sparse Matrix of class "dtCMatrix"

[1,] . 4 4 8 9
[2,] . . 5 3 6
[3,] . . . 8 6
[4,] . . . . 2
[5,] . . . . .
[,1] [,2] [,3]     [,4]     [,5]
[1,]    1    4   14 56.66667 89.00000
[2,]    0    1    5 23.00000 37.33333
[3,]    0    0    1  8.00000 14.00000
[4,]    0    0    0  1.00000  2.00000
[5,]    0    0    0  0.00000  1.00000
[1] TRUE
[1] TRUE
```

expm documentation built on May 2, 2019, 5:25 p.m.