This isn't really an answer but it is too long for a comment.
I didn't look at your first integral, but the second is fairly easy to investigate because it only depends on one parameter. I used two Mathematica tools that often help in kind of situation you find yourself in.
Manipulate[
Plot[Tanh[π Sqrt[λ]] Log[1 - Exp[-2 π q Sqrt[λ + 1/4]]], {λ, 0, 100}],
{q, 0., 5., 1., Appearance -> "Labeled"}]
Looking a the plot for various values of q
suggest the integral converges and goes to zero as q
gets large, which in turn suggests that NIntegrate
might be fruitful.
Table[NIntegrate[Tanh[π Sqrt[λ]] Log[1 - Exp[-2 π q Sqrt[λ + 1/4]]], {λ, 0, ∞}], {q, 1, 8}]
NIntegrate::slwcon: Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration is 0, highly oscillatory integrand, or WorkingPrecision too small. >>
NIntegrate::ncvb: NIntegrate failed to converge to prescribed accuracy after 9 recursive bisections in λ near {λ} = {0.193495}. NIntegrate obtained -9.3063210^-14 and 9.31004105035578`^-19 for the integral and error estimates. >>
{-0.00710267, -0.000110031, -2.62324*10^-6, -7.42753*10^-8,
-2.31044*10^-9, -7.62815*10^-11, -2.62445*10^-12, -9.30632*10^-14}
The results from NIntegrate
also suggest the integral goes to zero as q
goes to ∞, but that Mathematica runs out of computing steam at q = 8
when confined to machine precision reals.
You should make yourself familiar with the use these tools {(and others found in Mathematica) to investigate your integration problems.