How can we show that $R=S?$ Let
$$R=\prod_{n=1}^{\infty}\left({q^{2n-1}-1\over q^{2n-1}+1}\right)^2
\left({q^{2n}-1\over q^{2n}+1}\right)^2\tag1$$
and 
$$S=2\prod_{n=1}^{\infty}\left({q^{2n}+1\over q^{2n}-1}\right)^{2(-1)^{n+1}}
-\prod_{n=1}^{\infty}\left({q^{n}+1\over q^{n}-1}\right)^{2(-1)^{n+1}}
\tag2$$
How can we show that $R=S?$
$(2)$ we can use $a^2-b^2=(a-b)(a+b)$ to factorise but it would turn to be too messy and bulky.
 A: The equality of $R=S$ is an example of an eta product identity of level $8$. In my collection of Dedekind Eta Product Identities I label it as $t_{8,18,60b}$ which can itself be derived from $t_{8,18,60a}$ and $t_{8,12,48}$. In terms of
Ramanujan theta functions it can be written as $\phi(-q)^2 = 2\phi(q^2)^2 - \phi(q)^2$ and this can be derived from $\phi(q)^2=\phi(q^2)^2+4q\psi(q^4)^2$ and $\phi(-q)^2=\phi(q^2)^2-4q\psi(q^4)^2$. In terms of Jacobi theta functions $R=S$ is   as follows: $\theta_4(0,q)^2 = 2\theta_3(0,q^2)^2 - \theta_3(0,q)^2$. They form the basis for parameterization of the Arithmetic-Geometric Mean by squares of theta functions. More precisely, $\;a(q)^2 = b(q)^2 + c(q)^2\;$  where $a(q):=\theta_3(0,q)^2,\;b(q):=\theta_4(0,q)^2,\;c(q):=\theta_2(0,q)^2$ and $\;a(q^2)=(a(q)+b(q))/2,\;b(q^2)=\sqrt{a(q)b(q)},\;c(q^2)=(a(q)-b(q))/2.$
Let us define:
$$Q_0:=\prod_{n>0}1-q^{2n},\;Q_1:=\prod_{n>0}1+q^{2n},
\;Q_2:=\prod_{n>0}1+q^{2n-1},\;Q_3:=\prod_{n>0}1-q^{2n-1}.$$
There are many standard identities between theta functions and infinite products such as $Q_0,Q_1,Q_2,Q_3.$ For example, $1=Q_1Q_2Q_3$ and DLMF equations 20.4.4 and 20.4.5.
Thus, in $R$, $\;Q_0Q_3/(Q_1Q_2)=Q_0Q_3^2=\theta_4(0,q),\;$ and in $S$,
$\;Q_0Q_2/(Q_1Q_3)=Q_0Q_2^2=\theta_3(0,q).$
The $q$-series $R$ is the generating function of OEIS sequence A104794 and the infinite products in equation (2) come from sequence A004018 where much information is available.
In all these infinite sums and products, we have to require $|q|<1$ for convergence.
A: These products belong to the theory of theta functions. The expression $R$ is simply $$R=\prod\left(\frac{1-q^{n}}{1+q^{n}}\right) ^{2}=\vartheta_{4}^{2}(q)=\frac{2k'K}{\pi}\tag{1}$$ in terms of Jacobi theta functions and elliptic integral $K$ and complementary modulus $k'$. The first term of $S$ is $$2\prod\left(\frac{1+(q^{2})^{2n-1}}{1-(q^{2})^{2n-1}}\right) ^{2}\left(\frac{1-q^{4n}}{1+q^{4n}} \right)^{2}=2\vartheta_{3}^{2}(q^{2})=\frac{4L}{\pi}\tag{2}$$ where $L$ is Elliptic integral corresponding to modulus $l=(1-k')/(1+k')$ based on nome $q^{2}$. Similarly the second term in $S$ is $$\prod\left(\frac{1+q^{2n-1}}{1-q^{2n-1}}\right) ^{2}\left(\frac{1-q^{2n}}{1+q^{2n}}\right)^{2}=\vartheta_{3}^{2}(q)=\frac{2K}{\pi}\tag{3}$$ The equality $R=S$ is equivalent to $$\vartheta_{3}^{2}(q)+\vartheta_{4}^{2}(q)=2\vartheta_{3}^{2}(q^{2})\tag{4}$$ and this identity is famous. If we observe the series representation of $\vartheta_{3}(q)$ as $$\vartheta_{3}(q)=\sum_{n=-\infty}^{\infty}q^{n^{2}}$$ then it is easy to see that $$\vartheta_{3}^{2}(q)=\sum_{n=0}^{\infty}r_{2}(n)q^{n}\tag{5}$$ where $r_{2}(n)$ is the number of ways in which $n$ can be expressed as sum of two squares (sign as well as order of summands being counted). And we have $$\vartheta_{4}^{2}(q)=\sum_{n=0}^{\infty}(-1)^{n}r_{2}(n)q^{n}$$ and hence $$\vartheta_{3}^{2}(q)+\vartheta_{4}^{2}(q)=2\sum_{n=0}^{\infty}r_{2}(2n)q^{2n}$$ Next we note a simple fact from elementary number theory that if $n$ can be expressed as a sum of two squares then $2n$ can also be represented in that manner and vice versa (use the equation $2(a^{2}+b^{2})=(a-b)^{2}+(a+b)^{2}$). This gives us $r_{2}(2n)=r_{2}(n)$ and hence the last equation can be written as $$\vartheta_{3}^{2}(q)+\vartheta_{4}^{2}(q)=2\sum_{n=0}^{\infty}r_{2}(n)q^{2n}=2\vartheta_{3}^{2}(q^{2})$$ which proves $(4)$. The part which we have not shown here is the equivalence of series and product representations of various theta functions and this is based on Jacobi's Triple Product Identity $$\sum_{n=-\infty} ^{\infty} z^{n} q^{n^{2}}=\prod_{n=1}^{\infty}(1-q^{2n})(1+q^{2n-1}z)(1+q^{2n-1}z^{-1})\tag{6}$$ There is something which must be said for the elliptic integrals involved in these identities. The identity $(4)$ in terms of elliptic integrals is $$(1+k')K=2L$$ which follows from Landen transformation of elliptic integrals. The above proof as well as the link between elliptic integrals and theta functions is explored here and here. 
