Inverse Laplace transform of $\frac{1}{2s}\coth\left(\frac{s}{2a}\right)$ I would like to see how to compute the inverse Laplace transform
$${\mathscr L}^{-1}\left(\frac{\coth (s/(2a))}{2s}\right).$$
I am interested in the proof, not just the answer. I am reading the book "The Laplace Transform" by Joel Schiff, where the inverse Laplace transform
$${\mathscr L}^{-1}\left(\frac{\coth(\sqrt{s})}{\sqrt{s}}\right)=1+2\sum_{n=1}^\infty e^{-n^2\pi^2 t}, t>0$$ is computed using a parabolic contour of integration, so I wonder if something similar would work. Thanks for any suggestions.
 A: There are several posts on this website that dealt with similar problems. Your function has poles at $s=0$ and at $s=2\mathrm{i}\,a\pi n$, with $n=-2,-1,0,1,2$, for which $\sinh(s/(2a))=0$.
Calculate the residues like here, or here.
The answer can be easily found with this identity (see here and here)
\begin{align}
\coth (X)=\frac{1}{X}+2\sum_{n=1}^{\infty}\frac{X}{n^2\pi^2+X^2}
\end{align}
hence
\begin{align}
\frac{1}{2s}\coth \frac{s}{2a}=\frac{a}{s^2}+\sum_{n=1}^{\infty}\frac{2a}{(2a n\pi)^2+s^2}\,.
\end{align}
Applying inverse Laplace transformations on each term, and using $\mathcal{L}^{-1}\left\{\frac{1}{k^2+s^2}\right\}=\frac{1}{k}\sin(kt)$ gives
\begin{align}
\mathcal{L}^{-1}\left\{\frac{1}{2s}\coth \frac{s}{2a}\right\}=at+\sum_{n=1}^{\infty}\frac{\sin(2a n \pi t)}{\pi n}
\end{align}
The code and figure below confirm this result for the case $a=2$.

import numpy as np
import matplotlib.pyplot as plt
from mpmath import *

def f(t,a):
    f=0
    for n in range(1,100):
        f+=np.sin(2*a*np.pi*n*t)/n
    return a*t+f/np.pi

def F(s,a):
    return mp.coth(s/(2*a))/(2*s)

mp.dps = 30
def fnum(t,a):
    ft = lambda s: F(s,a)
    return invertlaplace(ft,t,method='dehoog')

t  = np.linspace(0,3,100)
t2 = np.linspace(0.1,3,30)

fig, ax = plt.subplots()
ax.plot(t,[f(i,2) for i in t],  'g',lw=2,label='analytical')
ax.plot(t2,[fnum(i,2) for i in t2],'g',lw=0,marker='o',label='numerical')
ax.set(xlabel=r'$t$', ylabel=r'$f(t)$') 
ax.legend()

