Sum the series $\sum_{n = 1}^{\infty}\{\coth (n\pi x) + x^{2}\coth(n\pi/x)\}/n^{3}$ This sum is from Ramanujan's letters to G. H. Hardy and Ramanujan gives the summation formula as
\begin{align} &\frac{1}{1^{3}}\left(\coth \pi x + x^{2}\coth\frac{\pi}{x}\right) + \frac{1}{2^{3}}\left(\coth 2\pi x + x^{2}\coth\frac{2\pi}{x}\right) \notag\\
&\, \, \, \, \, \, \, \, + \frac{1}{3^{3}}\left(\coth 3\pi x + x^{2}\coth\frac{3\pi}{x}\right) + \cdots\notag\\
&\, \, \, \, \, \, \, \, = \frac{\pi^{3}}{90x}(x^{4} + 5x^{2} + 1)\notag
\end{align}
Since $$\coth x = \frac{e^{x} + e^{-x}}{e^{x} - e^{-x}} = \frac{1 + e^{-2x}}{1 - e^{-2x}} = 1 + 2\frac{e^{-2x}}{1 - e^{-2x}}$$the above sum is transformed into $$(1 + x^{2})\sum_{n = 1}^{\infty}\frac{1}{n^{3}} + 2\sum_{n = 1}^{\infty}\frac{e^{-2n\pi x}}{n^{3}(1 - e^{-2n\pi x})} + 2x^{2}\sum_{n = 1}^{\infty}\frac{e^{-2n\pi/x}}{n^{3}(1 - e^{-2n\pi/x})}$$ If we put $q = e^{-\pi x}$ we get sums like $\sum q^{2n}/\{n^{3}(1 - q^{2n})\}$ which I don't know how to sum.
It seems I am going on a wrong track. Please provide some alternative approach.
Update: All the answers given below so far use complex analyis (transforms and residues) to evaluate the sum. I am almost certain that Ramanujan did not evaluate the sum using complex analysis. Perhaps the method by Ramanujan is more like the one explained in this question. Do we have any approach based on real-analysis only?

Following in the same manner as this answer...
We are going to use the contour integral
$$
\oint\pi\cot\left(\frac{\pi z}{\pi x}\right)\left(\frac{\coth(z)}{z^3}-\frac1{z^4}-\frac1{3z^2}\right)\mathrm{d}z=0\tag{1}
$$
where the contours of interest are, for real $R\to\infty$ and integer $n\to\infty$,
$$
\small\textstyle\color{#00A000}{[R,-R]+(n+\frac12)\pi i}\cup\color{#C00000}{-R+(n+\frac12)\pi i[1,-1]}\cup\color{#00A000}{[-R,R]-(n+\frac12)\pi i}\cup\color{#C00000}{R+(n+\frac12)\pi i[-1,1]}
$$
The integral along the red paths becomes negligible as $R\to\infty$. Along the upper green path, where $\mathrm{Im}(z)\approx+\infty$, $\cot(z)\approx-i$. Along the lower green path, where $\mathrm{Im}(z)\approx-\infty$, $\cot(z)\approx+i$. Since $\coth(z+\frac\pi2i)=\tanh(z)$, the integral along each of the green paths tends to $0$. Therefore, the full integral is $0$.
Since
$$
\pi\cot\left(\frac{\pi z}{\pi x}\right)\text{ has residue }\pi x\text{ at }z=\pi nx\tag{2}
$$
and
$$
\frac{\coth(z)}{z^3}-\frac1{z^4}-\frac1{3z^2}=-\frac1{45}+O(z^2)\text{ at }z=0\tag{3}
$$
the contribution from the singularities on the real axis is
$$
2\pi i\cdot\pi x\left[2\sum_{n=1}^\infty\left(\frac{\coth(\pi nx)}{(\pi nx)^3}-\frac1{(\pi nx)^4}-\frac1{3(\pi nx)^2}\right)-\frac1{45}\right]\tag{4}
$$
Since
$$
\frac{\coth(z)}{z^3}\text{ has residue }\frac1{(\pi in)^3}\text{ at }z=\pi i n\text{ for }n\ne0\tag{5}
$$
and
$$
\pi\cot\left(\frac{\pi z}{\pi x}\right)=-\pi i\coth\left(\frac{\pi n}{x}\right)\text{ at }z=\pi in\tag{6}
$$
the contribution from the singularities on the imaginary axis is
$$
2\pi i\left[2\sum_{n=1}^\infty\frac\pi{x^3}\frac{\coth\left(\frac{\pi n}{x}\right)}{\left(\frac{\pi n}{x}\right)^3}\right]\tag{7}
$$
Combining $(1)$, $(4)$, and $(7)$, yields
$$
x^2\sum_{n=1}^\infty\frac{\coth(\pi nx)}{(\pi nx)^3}+\frac1{x^2}\sum_{n=1}^\infty\frac{\coth\left(\frac{\pi n}{x}\right)}{\left(\frac{\pi n}{x}\right)^3}
=\frac{\zeta(4)}{\pi^4x^2}+\frac{\zeta(2)}{3\pi^2}+\frac{x^2}{90}\tag{8}
$$
Multiplying by $\pi^3x$ to match the question, we get
$$
\sum_{n=1}^\infty\frac{\coth(\pi nx)+x^2\coth(\pi n/x)}{n^3}=\frac{\pi^3}{90x}\left(1+5x^2+x^4\right)\tag{9}
$$
