Inverse Laplace transform of $\frac{\sqrt{2s}}{\sinh\sqrt{2s}}$ and $\frac{1}{\cosh\sqrt{2s}}$ (related to Brownian motion) I was reading "2018The computation of the probability density and distribution functions for some families of random variables by means of the Wynn-p accelerated Post-Widder formula" and run into the following question.
The paper gives two Laplace transforms:
$$L_{X_S}(s)=\frac{\sqrt{2s}}{\sinh\sqrt{2s}}\ \text{and} \ L_{X_C}(s)=\frac{1}{\cosh\sqrt{2s}},$$
where $X_S$ and $X_C$ can be interpreted as the hitting time of a Brownian motion in $\mathbb{R}$ and $\mathbb{R}^3$. The paper also says that the densities are:
$$f_{X_S}(x)=\pi^2\sum_{k=1}^\infty(-1)^{k+1}k^2e^{-\frac{1}{2}k^2\pi^2x}\ \text{and} \ f_{X_C}(s)=\pi \sum_{k=0}^{\infty}(-1)^k\left(k+\frac{1}{2}\right)e^{-\frac{1}{2}(k+\frac{1}{2})^2\pi^2x}.$$
I am interested in the density functions, i.e., the inverse of Laplace transforms. There is one way in "2001Probability laws related to the Jacobi theta and Riemann zeta functions, and Brownian excursions", through $L_{X_C}$. However, that paper mentions reciprocal property between $X_C$ and $X_C$ and between $X_S$ and $X_C$, which I do not understand.
In particular, since $\int_0^\infty e^{-sx}e^{-ax}dx=\frac{1}{s+a}$ for $a>0$, directly applying Laplace transform to densities may lead to divergent series, e.g., $\sum_{k=1}^\infty(-1)^{k+1}\frac{k^2 \pi^2 }{s+\frac{1}{2}k^2\pi^2}$. A similar expression $\sum_{n=-\infty}^{\infty}\frac{1}{n^2+b^2}=\frac{\pi}{b}\coth\pi b$ is also noticed, but I cannot see how to apply it so far.
Any help would be appreciated.
 A: The inverse Laplace Transform, $f(t)=\mathcal{L}^{-1}\left\{F(s)\right\}$ with $F(s)=1/\cosh(\sqrt{2s})$, is given by the Bromwich integral
\begin{align}
f(t)&=\frac1{2\pi i }\int_{c-i\infty}^{c+i\infty}\frac{1}{\cosh(\sqrt{2 s})}e^{st}\,ds
\end{align}
$F(s)$ has simple poles at $s_n=-\frac{1}{2}(n+\frac{1}{2})^2\pi^2$.
With the residue theorem we can write
\begin{align}
f(t)&=\sum_{n=0}^\infty \text{Res}\left(\frac{1}{\cosh(\sqrt{2 s})}e^{st}, s=s_n\right)\\
&=\sum_{n=0}^\infty\lim_{s\to s_n}\left((s- s_n)\frac{1}{\cosh(\sqrt{2 s})}e^{st}\right)\\
&=\sum_{n=0}^\infty\frac{\sqrt{2 s_n}}{\sinh(\sqrt{2 s_n})}e^{s_n t}
\end{align}
where I used l'Hôpital's rule. With $\sinh(\sqrt{2 s_n})=i\sin((n+\frac{1}{2})\pi)=i(-1)^n$ we now find
\begin{align}
f(t)&=\pi \sum_{n=0}^\infty(-1)^n \left(n+\frac{1}{2}\right) e^{s_n t}\\
&=\pi \sum_{n=0}^\infty (-1)^n \left(n+\frac{1}{2}\right) \exp{\left[-\frac{1}{2}\left(n+\frac{1}{2}\right)^2\pi^2 t\right]}
\end{align}
which is equal to the stated result.
Likewise,
\begin{align}
f(t)&=\mathcal{L}^{-1}\left\{\frac{\sqrt{2s}}{\sinh(\sqrt{2s})}\right\}\\
&=\sum_{n=1}^\infty \text{Res}\left(\frac{\sqrt{2s}}{\sinh(\sqrt{2s})}e^{st}, s=-\frac{1}{2}n^2\pi^2\right)\\
&=\sum_{n=1}^\infty\lim_{s\to -n^2\pi^2/2}\left((s+n^2\pi^2/2)\frac{\sqrt{2s}}{\sinh(\sqrt{2s})}e^{st}\right)\\
&=-\sum_{n=1}^\infty \frac{n^2 \pi^2}{\cosh(\sqrt{-n^2\pi^2})} \exp{\left(-\frac{1}{2}n^2\pi^2 t\right)}\\
&=\pi^2\sum_{n=1}^\infty (-1)^{n+1}n^2 \exp{\left(-\frac{1}{2}n^2\pi^2 t\right)}\\
&=\pi^2\sum_{n=1}^\infty (-1)^{n+1}n^2 \exp{\left(-\frac{1}{2}n^2\pi^2 t\right)}.
\end{align}
