A functional equation relating two harmonic sums.

Let $q = e^{-x}$ so that $$T(x) = \sum_{n = 1}^{\infty}\frac{1}{n\sinh nx} = 2\sum_{n = 1}^{\infty}\frac{q^{n}}{n(1 - q^{2n})} = f(q)\text{ (say)}\tag{1}$$ and then we have \begin{align} T(x) &= f(q)\notag\\ &= 2\sum_{n = 1}^{\infty}\frac{q^{n}}{n(1 - q^{2n})}\notag\\ &= 2\sum_{n = 1}^{\infty}\frac{q^{n}}{n}\sum_{m = 0}^{\infty}q^{2mn}\notag\\ &= 2\sum_{m = 0}^{\infty}\sum_{n = 1}^{\infty}\frac{q^{(2m + 1)n}}{n}\notag\\ &= -2\sum_{m = 0}^{\infty}\log(1 - q^{2m + 1})\notag\\ &= -2\log\prod_{m = 1}^{\infty}(1 - q^{2m - 1})\notag\\ &= -2\log\left(2^{1/4}q^{1/24}\left(\frac{2k}{k'^{2}}\right)^{-1/12}\right)\tag{2}\\ &= -\frac{\log 2}{2} - \frac{\log q}{12} + \frac{1}{6}\log\frac{2k}{k'^{2}}\tag{3} \end{align} where $k$ is the elliptic modulus corresponding to nome $q$ and $k' = \sqrt{1 - k^{2}}$.

The product $\prod(1 - q^{2m - 1})$ is essentially Ramanujan's class invariant $g_{n}, g(q)$ and we have accordingly given its representation $(2)$ in terms of nome $q$ and modulus $k$. Also note that $\log q = -\pi K'/K$ where $K, K'$ are complete elliptic integrals of first kind with modulus $k$ and $k' = \sqrt{1 - k^{2}}$.

By the theory of modular equations (given in the link on Ramanujan's class invariant mentioned earlier) it is known that if $K'/K = \sqrt{r}$ where $r$ is a positive rational number then the value of modulus $k$ is an algebraic number and such value of $k$ is called a singular modulus and denoted by $k_{r}$. Here in the current notation we have $\log q = -x$ and hence if $x = \pi\sqrt{r}$ then the value of $k$ is an algebraic number and it is possible to have a closed form for $T(x)$ in terms of logarithm of an algebraic number plus $x/12$.

If we set $x = \pi\sqrt{2}$ then the corresponding value of singular modulus $k$ is $k = k_{2} = \sqrt{2} - 1$. And hence $2k/(1 - k^{2}) = 1$ and it follows from $(3)$ that $$T(\sqrt{2}\pi) = \frac{\sqrt{2}\pi}{12} - \frac{1}{2}\log 2\tag{4}$$ Next we discuss the sum $S(x)$ given by $$S(x) = \sum_{n\text{ odd}}\frac{1}{n\sinh nx} = \sum_{n = 1}^{\infty}\frac{1}{n\sinh nx} - \sum_{n\text{ even}}\frac{1}{n\sinh nx} = T(x) - \frac{T(2x)}{2}\tag{5}$$ Note that when $x$ is replaced by $2x$ then $q = e^{-x}$ is replaced by $q^{2}$ and hence $T(2x) = f(q^{2})$. By Landen's transformation replacing $q$ with $q^{2}$ leads to replacing $k$ with $(1 - k')/(1 + k')$ and hence \begin{align} T(2x) &= f(q^{2})\notag\\ &= -\frac{\log 2}{2} - \frac{\log q^{2}}{12} + \frac{1}{6}\log\dfrac{2\cdot\dfrac{1 - k'}{1 + k'}}{1 - \left(\dfrac{1 - k'}{1 + k'}\right)^{2}}\notag\\ &= -\frac{\log 2}{2} - \frac{\log q}{6} + \frac{1}{6}\log\frac{1 - k'^{2}}{2k'}\notag\\ &= -\frac{\log 2}{2} - \frac{\log q}{6} + \frac{1}{6}\log\frac{k^{2}}{2k'}\tag{6} \end{align} and hence it follows from $(3), (5)$ and $(6)$ that $$S(x) = -\frac{\log 2}{4} + \frac{1}{12}\log\frac{8}{k'^{3}}\tag{7}$$ Note that the above equation shows that for $x = \pi\sqrt{r}, r\in\mathbb{Q}^{+}$ the value of $S(x)$ is the logarithm of an algebraic number.

Next we deal with the transformation from $x$ to $\pi^{2}/x$. This changes $q = e^{-x}$ to $q' = e^{-\pi^{2}/x}$ and the effect of this is to swap $k$ and $k'$ so that $$S(\pi^{2}/x) = -\frac{\log 2}{4} + \frac{1}{12}\log\frac{8}{k^{3}}\tag{8}$$ and from $(7)$ and $(8)$ we get $$S(x) - (1/2)S(\pi^{2}/x) = -\frac{\log 2}{8} + \frac{1}{8}\log \frac{2k}{k'^{2}}\tag{9}$$ and looking at equations $(3)$ and $(9)$ we get $$S(x) = \frac{1}{2}S\left(\frac{\pi^{2}}{x}\right) - \frac{1}{16}x + \frac{1}{4}\log 2 + \frac{3}{4}T(x)\tag{10}$$ which is the desired functional equation connecting $S(x), S(\pi^{2}/x)$ and $T(x)$.


Like most of my answers dealing with sums involving hyperbolic functions this answer also requires a good understanding of the theory of elliptic integrals and their link with theta functions and other related topics.

Incidentally Ramanujan delved very deep into these topics and he had a very good understanding of both Mellin transform (favorite tool used by OP, see his answers) and elliptic/theta functions and moreover he somehow had the real-analysis equivalent of Mellin transform methods (Ramanujan's Master Theorem) so he could achieve his results without any use of complex analysis.


Suppose we seek a functional equation for

$$S(x) = \sum_{k\ge 1} \frac{1}{(2k-1)} \frac{1}{\exp(x(2k-1))-\exp(-x(2k-1))}.$$

(The factor of two that is missing is due to the sum that appeared in the post that I linked to in the introduction.)

The sum $S(x)$ is harmonic and may be evaluated by inverting its Mellin transform.

Recall the harmonic sum identity $$\mathfrak{M}\left(\sum_{k\ge 1} \lambda_k g(\mu_k x);s\right) = \left(\sum_{k\ge 1} \frac{\lambda_k}{\mu_k^s} \right) g^*(s)$$ where $g^*(s)$ is the Mellin transform of $g(x).$

In the present case we have $$\lambda_k = \frac{1}{(2k-1)}, \quad \mu_k = 2k-1 \quad \text{and} \quad g(x) = \frac{1}{\exp(x)-\exp(-x)}.$$

We need the Mellin transform $g^*(s)$ of $g(x)$ which is computed as follows: $$g^*(s) = \int_0^\infty \frac{1}{\exp(x)-\exp(-x)} x^{s-1} dx = \int_0^\infty \frac{\exp(-x)}{1-\exp(-2x)} x^{s-1} dx \\ = \int_0^\infty \sum_{q\ge 0} \exp(-(2q+1)x) x^{s-1} dx = \sum_{q\ge 0} \frac{1}{(2q+1)^s} \Gamma(s) = \left(1-\frac{1}{2^s}\right) \Gamma(s) \zeta(s).$$

Hence the Mellin transform $Q(s)$ of $S(x)$ is given by $$ Q(s) = \left(1-\frac{1}{2^{s+1}}\right) \left(1-\frac{1}{2^s}\right) \Gamma(s) \zeta(s) \zeta(s+1) \\ \quad\text{because}\quad \sum_{k\ge 1} \frac{\lambda_k}{\mu_k^s} = \left(1-\frac{1}{2^{s+1}}\right) \zeta(s+1)$$ where $\Re(s) > 1$.

Intersecting the fundamental strip and the half-plane from the zeta function term we find that the Mellin inversion integral for an expansion about zero is $$\frac{1}{2\pi i} \int_{3/2-i\infty}^{3/2+i\infty} Q(s)/x^s ds$$ which we evaluate in the left half-plane $\Re(s)<3/2.$

The two zeta function terms cancel the poles of the gamma function term and we are left with just

$$\begin{align} \mathrm{Res}(Q(s)/x^s; s=1) & = \frac{\pi^2}{16x} \quad\text{and}\\ \mathrm{Res}(Q(s)/x^s; s=0) & = -\frac{1}{4} \log 2. \end{align}$$

This shows that $$S(x) = \frac{\pi^2}{16x} -\frac{1}{4} \log 2 + \frac{1}{2\pi i} \int_{-1/2-i\infty}^{-1/2+i\infty} Q(s)/x^s ds.$$

To treat the integral recall the duplication formula of the gamma function: $$\Gamma(s) = \frac{1}{\sqrt\pi} 2^{s-1} \Gamma\left(\frac{s}{2}\right) \Gamma\left(\frac{s+1}{2}\right).$$

which yields for $Q(s)$

$$\left(1-\frac{1}{2^{s+1}}\right) \left(1-\frac{1}{2^s}\right) \frac{1}{\sqrt\pi} 2^{s-1} \Gamma\left(\frac{s}{2}\right) \Gamma\left(\frac{s+1}{2}\right) \zeta(s) \zeta(s+1)$$

Furthermore observe the following variant of the functional equation of the Riemann zeta function: $$\Gamma\left(\frac{s}{2}\right)\zeta(s) = \pi^{s-1/2} \Gamma\left(\frac{1-s}{2}\right) \zeta(1-s)$$

which gives for $Q(s)$ $$\left(1-\frac{1}{2^{s+1}}\right) \left(1-\frac{1}{2^s}\right) \frac{1}{\sqrt\pi} 2^{s-1} \pi^{s-1/2} \Gamma\left(\frac{s+1}{2}\right) \Gamma\left(\frac{1-s}{2}\right) \zeta(1-s)\zeta(s+1) \\ = \left(1-\frac{1}{2^{s+1}}\right) \left(1-\frac{1}{2^s}\right) \frac{1}{\sqrt\pi} 2^{s-1} \pi^{s-1/2} \frac{\pi}{\sin(\pi(s+1)/2)} \zeta(1-s)\zeta(s+1) \\ = \left(1-\frac{1}{2^{s+1}}\right) \left(1-\frac{1}{2^s}\right) 2^{s-1} \frac{\pi^s}{\sin(\pi(s+1)/2)} \zeta(1-s)\zeta(s+1).$$

Now put $s=-u$ in the remainder integral to get

$$\frac{1}{2\pi i} \int_{1/2-i\infty}^{1/2+i\infty} \left(1-\frac{2^u}{2}\right) \left(1-2^u\right) 2^{-u-1} \frac{\pi^{-u}}{\sin(\pi(-u+1)/2)} \zeta(1+u)\zeta(1-u) x^u du \\ = \frac{1}{2\pi i} \int_{1/2-i\infty}^{1/2+i\infty} \left(1-\frac{2^u}{2}\right) \left(1-2^u\right) 2^{-u-1} \\ \times \frac{\pi^{u}}{\sin(\pi(-u+1)/2)} \zeta(1+u)\zeta(1-u) (x/\pi^2)^u du.$$

We may shift this to $3/2$ as there is no pole at $u=1.$

Now $$\sin(\pi(-u+1)/2) = \sin(\pi(-u-1)/2+\pi) \\ = - \sin(\pi(-u-1)/2) = \sin(\pi(u+1)/2)$$

and furthermore $$\left(1-\frac{2^u}{2}\right) \left(1-2^u\right) 2^{-u-1} = \frac{1}{2} \left(1-\frac{2^u}{2}\right) \left(\frac{1}{2^u}-1\right) = 2^{u-2} \left(\frac{1}{2^{u-1}}-1\right) \left(\frac{1}{2^u}-1\right) \\ = 2^{u-2} \left(1-\frac{1}{2^{u-1}}\right) \left(1-\frac{1}{2^u}\right) \\ = 2^{u-2} \left(1-\frac{1}{2^{u+1}}\right) \left(1-\frac{1}{2^u}\right) - 3\times 2^{u-2} \frac{1}{2^{u+1}} \left(1-\frac{1}{2^u}\right) \\ = \frac{1}{2} 2^{u-1} \left(1-\frac{1}{2^{u+1}}\right) \left(1-\frac{1}{2^u}\right) - \frac{3}{4} 2^{u-1} \left(1-\frac{1}{2^u}\right) \frac{1}{2^{u}}.$$

We have shown that $$S(x) = \frac{\pi^2}{16x} -\frac{1}{4} \log 2 + \frac{1}{2} S(\pi^2/x) \\ - \frac{3}{4} \frac{1}{2\pi i} \int_{3/2-i\infty}^{3/2+i\infty} \left(1-\frac{1}{2^u}\right) \Gamma(u) \zeta(u) \zeta(u+1) (x/\pi^2/2)^u du$$

or alternatively

$$S(x) = \frac{\pi^2}{16x} -\frac{1}{4} \log 2 + \frac{1}{2} S(\pi^2/x) - \frac{3}{4} T(2\pi^2/x)$$

where $$T(x) = \sum_{k\ge 1} \frac{1}{k} \frac{1}{\exp(kx)-\exp(-kx)}$$

with functional equation $$T(x) = \frac{1}{24} x - \frac{1}{2}\log 2 + \frac{\pi^2}{12x} - T(2\pi^2/x).$$

which finally yields $$S(x) = \frac{1}{2} S(\pi^2/x) - \frac{1}{32} x + \frac{1}{8} \log 2 + \frac{3}{4} T(x).$$

Using $\sinh$ with $$S(x) = \sum_{k\ge 1} \frac{1}{(2k-1)} \frac{1}{\sinh((2k-1)x)} \quad\text{and}\quad T(x) = \sum_{k\ge 1} \frac{1}{k} \frac{1}{\sinh(kx)}$$

we obtain the functional equation $$S(x) = \frac{1}{2} S(\pi^2/x) - \frac{1}{16} x + \frac{1}{4} \log 2 + \frac{3}{4} T(x).$$

We also have $$T(\sqrt{2}\pi) = \frac{\sqrt{2}\pi}{24} - \frac{1}{2}\log 2 + \frac{\pi\sqrt{2}}{24} = \frac{\sqrt{2}\pi}{12} - \frac{1}{2}\log 2.$$