# Symbolic Matrix Exponential of Large (500x500) Matrix

I am trying to build a sort of time propagator matrix. I have a matrix $$H$$ that is 500x500 and i am trying to evaluate $$\exp(-H t)$$. I need to find this in a symbolic way because i will need to do $$\frac{d}{dt}\langle i|\exp(-H t)|i_o \rangle$$ for given vectors $$|i \rangle$$ and $$|i_0 \rangle$$. I have done it using the Schur and Jordan decomposition, but i can't do it. My pc either freezes, abort the evaluation or it says it can't perform the evaluation.

I know that the problem is this symbolic $$t$$ variable since if a give a numerical value to it, Mathematica solves it in a few seconds. But how can i do it for any $$t$$? Am I asking to much of it? My pc is has **Intel® Core™ i7-8550U CPU @ 1.80GHz × 8 ** and i am using Mathematica 11.0.1 under Ubuntu. Can you guys help me?

• Do you really need it symbolically for any t? Can you not just evaluate it for many close-together t and take the derivative numerically? – evanb Aug 21 '20 at 19:52
• Are the matrix $H$ and the vector $i_0$ numerical? If so, why not use NDSolveValue? – Carl Woll Aug 21 '20 at 20:17
• You should consider the limitations that play into these sorts of large symbolic computations. Depending upon how many free parameters you have, you might consider a purely numerical procedure using the suggestions that others have offered. That said, I suggest you investigate if there are any symmetries in your matrix that you can exploit. Why are you trying to evaluate this married exponential? Is H a function of t? If it is indeed a time propagator problem, perhaps you can use the Magnus Expansion? – CA Trevillian Aug 21 '20 at 23:52
• My matrix $H$ is independent of t. All it's components are real number in the range [0,1] . I need it for every t because i have to evaluate $\int_0^{\infty} dt t \frac{d}{dt} <i| \exp(-Ht)|i_o>$. Due to the form of those vectors, $|i> = {0,0,...1,...0}$ with the $1$ on the $i-th$ component, $<i| \exp(-Ht)|j>$ is the component $ij$-th component of the $\exp(-Ht)$. Is there a way to evaluate just that component and not the hole matrix? – Hugo Andrade Aug 22 '20 at 2:35

Erm. Isn't $$\frac{\mathrm{d}}{\mathrm{d} t} \exp(- t H) = -H \exp(- t H) = - \exp(- t H)H$$? The latter two can be evaluated numerically....
This is more and more becoming clear that this is an XY-question. From the comments it appears that you seek to compute $$\int_0^\infty t \, \frac{\mathrm{d}}{\mathrm{d} t} \langle u | \exp(- t H) | v\rangle \, \mathrm{d} t$$ Provided that $$H$$ is invertible, integration by parts leads to \begin{aligned} & \int_0^T t \, \frac{\mathrm{d}}{\mathrm{d} t} \langle u | \exp(- t H) | v\rangle \, \mathrm{d} t \\ &= \Big[ t \, \langle u | \exp(- t H) | v\rangle \Big]_{t=0}^{t=T} - \int_0^T \langle u | \exp(- t H) | v\rangle \, \mathrm{d} t \\ &= \Big[ t \, \langle u | \exp(- t H) | v\rangle \Big]_{t=0}^{t=T} + \Big[ \langle u | H^{-1} \exp(- t H) | v\rangle \Big]_{t=0}^{t=T} \\ &= T \, \langle u | \exp(- T H) | v\rangle - 0 + \langle u | H^{-1} \exp(- T H) | v\rangle - \langle u | H^{-1} | v\rangle. \end{aligned} Provided that the real parts of the eigenvalues of $$H$$ are contained in $$[\varepsilon,\infty)$$ for some $$\varepsilon > 0$$, $$\langle u | H^{-1} \exp(- T H) | v\rangle$$ converges rapidly to $$0$$ for $$T \to \infty$$, so we can apply the limit to obtain $$\int_0^\infty t \, \frac{\mathrm{d}}{\mathrm{d} t} \langle u | \exp(- t H) | v\rangle \, \mathrm{d} t = - \langle u | H^{-1} | v\rangle .$$
• My matrix $H$ is independent of t. All it's components are real number in the range [0,1] . I need it for every t because i have to evaluate $\int_0^{\infty} dt t \frac{d}{dt} <i| \exp(-Ht)|i_o>$. Due to the form of those vectors, $|i> = {0,0,...1,...0}$ with the $1$ on the $i-th$ component, $<i| \exp(-Ht)|j>$ is the component $ij$-th component of the $\exp(-Ht)$. Is there a way to evaluate just that component and not the hole matrix? – Hugo Andrade Aug 22 '20 at 2:39
• I am sorry. i write it in a cumbersome way. Let me rewrite it, $\int_0^{\infty}t*\frac{d}{dt}<u|exp(-t*H)|v> dt$ – Hugo Andrade Aug 22 '20 at 11:26
• I see. I edited the post. ($dtt$ really looked like a typo.) – Henrik Schumacher Aug 22 '20 at 13:47
• It is probably worth mentioning that the formula you derive is the partial case of the Laplace transform of matrix exponential $\int_0^\infty e^{-ts}e^{tH}\,dt=(sI-H)^{-1}$. Good connection to Green's functions and resolvents. – yarchik Aug 22 '20 at 14:08