The Hermitian matrix mat
is used to construct a function fun[x, y, z]
as follows:
mat = {{1/2 + (Sqrt[1 - 4 x^2] Sinh[1/2 Sqrt[1 - 4 x^2] z])/(
8 x^2 - 2 Cosh[1/2 Sqrt[1 - 4 x^2] z]), (
2 I x Sinh[1/4 Sqrt[1 - 4 x^2] z]^2)/(
4 x^2 - Cosh[1/2 Sqrt[1 - 4 x^2] z])}, {(
2 I x Sinh[1/4 Sqrt[1 - 4 x^2] z]^2)/(-4 x^2 +
Cosh[1/2 Sqrt[1 - 4 x^2] z]),
1/2 (1 + (
Sqrt[1 - 4 x^2] Sinh[1/2 Sqrt[1 - 4 x^2] z])/(-4 x^2 +
Cosh[1/2 Sqrt[1 - 4 x^2] z]))}};
t1 = D[mat, x]; t2 = mat.t1;
fun[x_, z_] = Tr[t1.t1] + (1/Det[mat]) Tr[t2.t2];
Here, $0<x<0.5$, $z\ge0$. The problem is that fun[x,z]
starts getting weird after some value of z, however it is expected to show smooth behavior.