When I use MatrixExp[m,v] to compute, the error given by mathematica is

MatrixExp: Unable to satisfy Tolerance -> 1.4901161193847656`*^-8 for parameter value 0.6180060729365491`.

Here the matrix m is a large SparseArray with dimension 98*98, so I can not attach it.

Could anyone tell me how to solve this problem? Thank you!

  • $\begingroup$ To be clear, you still get an output, correct? If this is correct, why not just raise the tolerance? $\endgroup$ – CA Trevillian Mar 25 at 8:11
  • $\begingroup$ @ CA Trevillian Actually, there is no results outputted, and how to raise the tolerance? I have tried this MatrixExp[m,v, ,Tolerance -> 10^(-12)], but it does not work. $\endgroup$ – Tishuo Wang Mar 25 at 8:25
  • $\begingroup$ A matrix of size $98 \times 98$ is not large. You can try to convert the sparse matrix to a dense one with Normal and try again. If you have to compute many exponentials for the same matrix, you may also consider using an eigendecomposition or a Jordan decomposition. $\endgroup$ – Henrik Schumacher Mar 25 at 8:30
  • $\begingroup$ But on the other hand, the numerical error of 1.4901161193847656*^-8` (whatever that means) might be acceptable. So you may also consider to simply ignore the message with Quiet. $\endgroup$ – Henrik Schumacher Mar 25 at 8:35
  • $\begingroup$ Are you using machine precision? Have you tried using arbitrary-precision, e.g., SetPrecision[m, prec] $\endgroup$ – Bob Hanlon Mar 25 at 14:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.