<s>[INST] How to use Mittag Leffler expansion (if possible) to solve the following integrals? In a physics related context I've been trying to solve the following two integrals:
(i)
$$
 \text{int}_1 = \int_{-\infty}^\infty \csc\left( \frac{\pi+2 i z}{2 \sqrt{2} }  \right) \text{sech}^2(z) \,dz
$$
(ii)
$$
 \text{int}_2 = \int_{-\infty}^\infty \frac{\csc\left( \frac{\pi+2 i z}{2 \sqrt{2} }  \right) \text{sech}^2(z)}{\pi + 2 i z} \,dz
$$
My strategy to solve them was to expand $\csc(a+bz)$ and/or $\text{sech}^2(z)$ using Mittag-Lefflers-theorem and then to swap the order of integration and summation. Unfortunately, I don't see any way to simplify anything in those expressions and the product of the two series is quite nasty as well (does it even converge?).
Maybe one can use the fact that only the real parts are even and therefore non-vanishing for the bounds of integration.
Do you have any other strategy to solve those integrals or an idea how to use the approach that I tried?
 [/INST] To solve $int_2$, I tried the following using Mittag-Lefflers' theorem and the corresponding expansions of $\csc(x)$ and $\text{sech}^2(x)$ given by
$$
\text{csc}(x) = \underbrace{\frac{1}{x}}_{A_1} + \underbrace{2 x \sum_{k=1}^\infty \frac{(-1)^k}{x^2 - (\pi k)^2}}_{A_2}, \forall \frac{x}{\pi} \notin \mathbb{Z} \\
\text{with } \ x = \frac{\pi + 2 i z}{2 \sqrt{2}}
$$
and
$$
\text{sech}^2(z)= \underbrace{\frac{8 (\pi^2 - 4 z^2}{(\pi^2 + 4 z^2)^2}}_{B_1} - \overbrace{\sum_{k=1}^{\infty} \frac{1}{\left( z - (k+\frac{1}{2}) i \pi \right)^2}}^{B_{21}} - \overbrace{\sum_{k=1}^{\infty} \frac{1}{\left( z + (k+\frac{1}{2}) i \pi \right)^2}}^{B_{22}}, \forall \frac{i z}{\pi} \pm \frac{1}{2} \notin \mathbb{Z} \ .
$$
Applying those to the problem, the integrand of $int_2$ now consists of 5 contributions:
$$
int_2 = I_2 = \int_{-\infty}^\infty \frac{A_1 B_1 - A_1 B_2 + B_1 A_2 - A_2 B_{21} - A_2 B_{22}}{\pi+2 iz} \,dz \ .
$$
Using Cauchy's product formula $\left( \sum_{i=1}^{\infty} a_i \right)\left( \sum_{j=1}^{\infty} b_j \right) = \sum_{k \geq 1} \sum_{l=1}^k a_l b_{k+1-l}$, I get for the addends $A_2 B_{2i}$ (summation is now from $k: 1 \to \infty$ (first sum) and $l: 1\to k$ (second sum))
$$
A_2 B_{21} = \frac{(-1)^l}{\left(-\pi ^2 l^2+\frac{1}{8} (\pi +2 i z)^2\right) \left(z-i \pi  \left(k-l+\frac{3}{2}\right)\right)^2}
$$
and
$$
A_2 B_{22} = \frac{(-1)^l}{\left(-\pi ^2 l^2+\frac{1}{8} (\pi +2 i z)^2\right) \left(z+i \pi  \left(k-l+\frac{3}{2}\right)\right)^2} \ .
$$
Swapping the order of summation and integration and performing the integrals, I get the results
$$
\text{int}(A_1 B_1) = \frac{2 \sqrt{2}}{\pi ^2} \ ,\\
\text{int}(A_1 B_2) = -\frac{2 \sqrt{2}}{\pi ^2 (k+1)^3} \ ,\\
\text{int}(B_1 A_2) = -\frac{(-1)^k \left(4 k^2+2 \sqrt{2} k+1\right)}{2 k^3 \left(\pi  \sqrt{2} k+\pi \right)^2} \ ,\\
\text{int}(A_2 B_{21}) = \frac{(-1)^l}{2 \pi ^3 l^2 \left(2 \left(\sqrt{2}-1\right) (k+1) l+(k+1)^2+\left(3-2 \sqrt{2}\right) l^2\right)} \text{and}\\
\text{int}(A_2 B_{22}) = \frac{(-1)^l \left(\frac{2}{(k-l+2)^2}-\frac{1}{\left(k+\left(\sqrt{2}-1\right) l+2\right)^2}\right)}{2 \pi ^3 l^2} \ .
$$
Performing the sums, I get (using Lerch $\Phi$-function and Riemann $\zeta$ function)
$$
\sum_{k=1}^\infty \text{int}(A_1 B_2) = -\frac{2 \sqrt{2} (\zeta (3)-1)}{\pi ^2} \ \text{and} \\
\sum_{k=1}^\infty \text{int}(B_1 A_2) = \frac{-8 \Phi \left(-1,1,1+\frac{1}{\sqrt{2}}\right)+3 \zeta (3)-\sqrt{2} \zeta \left(2,\frac{1}{4} \left(\sqrt{2}+2\right)\right)+\sqrt{2} \zeta \left(2,\frac{1}{4} \left(\sqrt{2}+4\right)\right)+\log (256)}{8 \pi ^2} \ .
$$
For the last two terms in the integral
$$
\sum_{k=1}^{\infty} \sum_{l=1}^k \text{int}(A_2 B_{21}) \quad \text{and} \quad \sum_{k=1}^{\infty} \sum_{l=1}^k \text{int}(A_2 B_{22})
$$
I don't find those nice solutions... Plotting two double series' $\sum_k^{k_{max}}\sum_{l}^k$ for $1 \leq k \leq k_{max} = 200$ however, one could get the intuition, that the expressions converge to something (see figure below) - Does anyone have an idea of how to find the corresponding expressions and do you think that this approach is correct?

</s>