A problem of Ramanujan's interest: closed form of $1 + 2\sum_{n=1}^{\infty} \frac{\cosh(n\theta)}{\cosh(n\pi)} $ I am Brian Diaz, and I am new to the math.stackexchange community.
I have been struggling with attempting to find a closed form of the following series:
$$ \varphi(\theta) = 1 + 2\sum_{n=1}^{\infty} \frac{\cosh(n\theta)}{\cosh(n\pi)} $$
Admittedly, I attempted to convert it to a "workable integral", but to no avail. Heck, in the process of converting it to an integral, I am not even sure interchanging the sum and the integral was valid. Nevertheless, this was my result.
$$\frac{1}{\pi}\int_{-\infty}^{\infty} \frac{\sin(x)}{\cosh(\theta) - \cos(x)} \frac{1}{\cosh(x)}dx $$
This was derived from a problem Ramanujan was working. For those who are interested in the source, you can visit http://mathworld.wolfram.com/RamanujanCosCoshIdentity.html. Note: Even if it does not have a closed form, I am still interested in valuable insight to the problem. In addition, I have been reported by my professor to consider applying residue theory, though he his not so sure what the result would be. 
Thank you so much for your support, and I hope you do have a blessed day!
 A: The closed form involves Jacobi elliptic function $\operatorname{dn}(z,k)$, which has Fourier series
$$\operatorname{dn}(z,k)=\frac{\pi}{2K}\left[1+2\sum_{n=1}^{\infty}\frac{\cos n\pi\frac{z}{K}}{\cosh n \pi \frac{K'}{K}}\right],$$
where $K(k)$ denotes complete elliptic integral and $K'(k)=K(\sqrt{1-k^2})$ the complementary one. 
Now if we denote $k_1=\frac{1}{\sqrt2}$ the first elliptic integral singular value and 
$$K_1:=K(k_1)=K'(k_1)=\frac{\Gamma^2\left(\frac14\right)}{4\sqrt{\pi}},$$ 
the sum can be expressed as
$$\boxed{\displaystyle \quad \varphi\left(\theta\right):=1+2\sum_{n=1}^{\infty}\frac{\cosh n\theta}{\cosh n \pi}=\frac{2K_1}{\pi}\,\operatorname{dn}\left(\frac{iK_1\theta}{\pi},k_1\right)\quad}$$
P.S. To check the answer with Mathematica, note that the latter uses $k^2$ instead of $k$ in the arguments of $\mathrm{EllipticK[}\cdot\mathrm{]}$ and $\mathrm{JacobiDN[}z,\cdot\mathrm{]}$. For example, $K_1$ is evaluated with $\mathrm{EllipticK[}\frac12\mathrm{]}$.
P.P.S This transforms the proof of Ramanujan cos/cosh identity into a one-line calculation involving Jacobi imaginary transformation for $\operatorname{dn}(z,k)$, as explained here.
