I am trying to solve numerically this integral $$F(s)=\int_{t1}^{s}e^{-B|s-t|}\rho_{12}(t)dt$$ where $t1\leq s\leq t2$ and $\rho_{12}(t)$ is the element of density matrix $\rho(t)$ which can be obtained numerically by solving the von Neuman equation $$\dot{\rho}(t)=-i[H(t),\rho(t)]$$ for
$$H_{0}(t)=\begin{pmatrix}h1+v t & -{\it i}g \\{\it i}g & -h1-v t \\\end{pmatrix}.$$
and $t1$ and $t2$ is initial and final times.
It is easy to obtain the density matrix $\rho_{12}$ element by using the code below
g = 1;
h1 = -50;
h2 = 50;
v = 1;
B = 1;
t1 = 0;
t2 = (h2-h1)/v;
H0[t_] = {{h1+v*t , -I*g},{I*g, -h1-v*t }};
Sol=NDSolveValue[{D[rho[t], t] == -I*(H0[t].rho[t] - rho[t].H0[t]),
rho[t1] == {{1, 0}, {0, 0}}}, rho, {t, t1, t2}];
(*rho12[t]=Sol[t][[1,2]]*)
F[s_]=Integrate[Exp[B*Abs[s-t]]*Sol[t][[1,2]],{t,t1,s}]
But my code doesn't work to calculate the F(s). I was wondering if you would be able to help me. Thank you
B
usage. In Latex equation you use $e^{-B|t2-t|} $, while in the codeExp[B*Abs[t2-t]]
. WithExp[-B*Abs[t2-t]]
the answer is0.00034735 + 0.00734009 I
. $\endgroup$