# About $\prod_{n\in\mathbb Z}\left[{\tanh\Big(\frac{\pi}{2}\sqrt{a^2n^2+ab}\Big)\over\tanh\Big(\frac{\pi}{2}\sqrt{n^2/a^2+b/a}\Big)}\right]^{(-1)^n}=1$

The infinite product in the title is invariant under the transformation $a\to 1/a$, however it is not a modular form because it is not a periodic function of $a$. Before asking the question one needs to explain some facts about this infinite product. Consider these two propositions

If $\cos\frac{\pi j}{n+1}+\cosh\alpha_j= \cos\frac{\pi k}{m+1}+\cosh\beta_k=x$ for all integers $1\le j\le n,\ 1\le k\le m$ then

$$\prod_{j=1}^n\frac{\sinh(m+1)\alpha_j}{\sinh\alpha_j}=\prod_{k=1}^m\frac{\sinh(n+1)\beta_k}{\sinh\beta_k},\tag{1}$$

If $\cos\frac{\pi (j-\frac{1}{2})}{n}+\cosh\alpha_j= \cos\frac{\pi (k-\frac{1}{2})}{m}+\cosh\beta_k=x$ for all integers $1\le j\le n,\ 1\le k\le m$ then

$$\prod_{j=1}^n2\cosh m\alpha_j=\prod_{k=1}^m2\cosh n\beta_k.\tag{2}$$

The formulas defining $\alpha_j$ and $\beta_k$ arise during solution of Helmholtz equation on a finite rectangular lattice with suitable boundary conditions (see e.g. Phillips, B.; Wiener, N. (1923). Nets and the Dirichlet problem. Journal of Math. and Physics, Massachusetts Institute, 105–124). The proofs of these two identities are elementary in the sense that only elementary trigonometry is involved in the proof. There are also corresponding identities on hexagonal lattices as well.

When $m,n\to\infty$ with the ratio $m/n$ fixed they have continous analogues $$\prod_{n=1}^\infty\frac{1-e^{-2\pi\alpha\sqrt{n^2+\beta^2}}}{1-e^{-2\pi\sqrt{n^2/\alpha^2+\beta^2}}}=\sqrt{\frac{1-e^{-2\pi\beta}}{1-e^{-2\pi\alpha\beta}}}\cdot \exp\left\{\int_0^\infty\ln\frac{1-e^{-2\pi\alpha\sqrt{x^2+\beta^2}}}{1-e^{-2\pi\sqrt{x^2/\alpha^2+\beta^2}}}\ dx\right\},\tag{1a}$$ $$\prod_{n=0}^\infty\frac{1+e^{-\pi\alpha\sqrt{(2n+1)^2+\beta^2}}}{1+e^{-\pi\sqrt{(2n+1)^2/\alpha^2+\beta^2}}}=\exp\left\{\frac{1}{2}\int_0^\infty\ln\frac{1+e^{-\pi\alpha\sqrt{x^2+\beta^2}}}{1+e^{-\pi\sqrt{x^2/\alpha^2+\beta^2}}}\ dx\right\}.\tag{2a}$$ It is possible to prove these formulas directly by contour integration. Now it turns out that there are other similar identities and in fact an infinite family of them. Here I give only two examples $$\prod_{n=1}^\infty\left(\frac{1-e^{-\pi\alpha\sqrt{n^2+\beta^2}}}{1+e^{-\pi\alpha\sqrt{n^2+\beta^2}}}\right)^{(-1)^n}=\sqrt{\frac{\tanh\frac{\pi\beta}{2}}{\tanh\frac{\pi\alpha\beta}{2}}}\prod_{n=1}^\infty\left(\frac{1-e^{-\pi\sqrt{n^2/\alpha^2+\beta^2}}}{1+e^{-\pi\sqrt{n^2/\alpha^2+\beta^2}}}\right)^{(-1)^n},\tag{3}$$ $$\prod_{n=1}^\infty\left(1-\tfrac{2\sqrt{5}}{1+\sqrt{5}+4\cosh{\frac{2\pi\alpha\sqrt{n^2+\beta^2}}{5}}}\right)^{\left(\frac{n}{5}\right)}=\prod_{n=1}^\infty\left(1-\tfrac{2\sqrt{5}}{1+\sqrt{5}+4\cosh{\frac{2\pi\sqrt{n^2/\alpha^2+\beta^2}}{5}}}\right)^{\left(\frac{n}{5}\right)}.\tag{4}$$ Identity (3) is in fact the infinite product given in the title. Identity (4) containing the Legendre symbol was motivated by $\beta=0$ case given in the paper of Bryden Cais, "Transformations of infinite series". Note that all these identities can be reformulated in the form which reflects the symmetry $a\to 1/a$.

Q: Is there finite analogue of (3) similar to (1) and (2)?

If $$\cosh\alpha_j+\cos\frac{\pi j}{2n}=\cosh\beta_k+\cos\frac{\pi k}{2m}=x\tag{3}$$ for all $1\le j\le 2n-1,\ 1\le k\le 2m-1$, then $$\prod_{j=1}^{2n-1}\left(\frac{\tanh m\alpha_j}{\sinh\alpha_j}\right)^{(-1)^j}=\prod_{k=1}^{2m-1}\left(\frac{\tanh n\beta_k}{\sinh\beta_k}\right)^{(-1)^k}.$$