1
$\begingroup$

With my limited knowledge of Mathematica, I tried but could not figure out the issues in the following few-line code:

   mat1 = 1/2 ( {
     {1, -I},
     {I, 1}
    } );
mat2[x_, t_] = {{1/2 - 1/2 Sqrt[1 - 4 x^2] - Sqrt[
     1 - 4 x^2]/(-1 + E^(t Sqrt[1 - 4 x^2])), I x}, {-I x, 
    1/2 (1 + Sqrt[1 - 4 x^2] + (
       2 Sqrt[1 - 4 x^2])/(-1 + E^(t Sqrt[1 - 4 x^2])))}};

intx = Integrate[mat2[x, t], {t, 0, 50}];
int0 = Integrate[mat2[0, t], {t, 0, 50}];
quantity[x_] := (Tr[ mat1.intx] - Tr[mat1.int0] )^2;

Plot[quantity[x], {x, 0, 1}]

Any help would be greatly appreciated. Thanks.

$\endgroup$
2
  • 1
    $\begingroup$ Integral does not converge ? $\endgroup$ Commented Jun 2, 2021 at 16:52
  • 2
    $\begingroup$ To add to @Mariusz: Order-1 pole at t=0: Series[mat2[x, t], {t, 0, 0}, Assumptions -> 0 < x < 1]. $\endgroup$
    – Michael E2
    Commented Jun 2, 2021 at 17:02

1 Answer 1

1
$\begingroup$

You need to change the lower bound of the integrals. Starting from zero would set the denominators equal to zero and consequently the integrals would not converge. Try to set the lower bound to 0 + ϵ.

intx = Integrate[mat2[x, t], {t, 0.01, 50}];
int0 = Integrate[mat2[0, t], {t, 0.01, 50}];
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.