How to prove the $q$-series identity? How to prove the following identity:
$$\sum_{n\ge0}\frac{2q^{n^{2}+n}}{(q)_{n}^{2}(1+q^{n})}=\sum_{n\ge0}\frac{q^{n^{2}+n}}{(q)_{n}^{2}(1-q^{2n+2})}$$
 A: First,
\begin{align}
\sum_{0\leq n}\frac{q^{n^2+n}}{(q)_n^2(1-q^{2n+2})}&=\sum_{1\leq n}\frac{q^{n^2-n}}{(q)_{n-1}^2(1-q^{2n})}\\
&=\sum_{0\leq n}\frac{q^{n^2-n}(1-q^n)^2}{(q)_n^2(1-q^{2n})}\\
&=\sum_{0\leq n}\frac{q^{n^2-n}(1-q^n)}{(q)_n^2(1+q^n)}\\
&=\sum_{0\leq n}\frac{q^{n^2-n}}{(q)_n^2}-2\sum_{0\leq n}\frac{q^{n^2}}{(q)_n^2(1+q^n)}\\
\end{align}
And
$$
2\sum_{0\leq n}\frac{q^{n^2+n}}{(q)_n^2(1+q^n)}+2\sum_{0\leq n}\frac{q^{n^2}}{(q)_n^2(1+q^n)}=2\sum_{0\leq n}\frac{q^{n^2}}{(q)_n^2}
$$
So it is sufficient to show the following.
$$
2\sum_{0\leq n}\frac{q^{n^2}}{(q)_n^2}=\sum_{0\leq n}\frac{q^{n^2-n}}{(q)_n^2}
$$
Use Heine's summation formula,
$$
\sum_{0\leq n}\frac{(a)_n(b)_n}{(c)_n(q)_n}\left(\frac{c}{ab}\right)^n=\frac{(c/a)_{\infty}(c/b)_{\infty}}{(c)_{\infty}(c/ab)_{\infty}}
$$
Take the limit of $a, b\to\infty$, we get the following.
$$
\sum_{0\leq n}\frac{q^{n^2-n}}{(c)_n(q)_n}c^n=\frac 1{(c)_{\infty}}
$$
Substitue $c=q$
$$
\sum_{0\leq n}\frac{q^{n^2}}{(q)_n^2}=\frac 1{(q)_{\infty}}\tag{1}
$$
Also, multiply $1-c$ and $c\to 1$
\begin{align}
\lim_{c\to 1}\sum_{0\leq n}\frac{q^{n^2-n}}{(cq)_{n-1}(q)_n}c^n&=\lim_{c\to 1}\frac 1{(cq)_{\infty}}\\
\sum_{0\leq n}\frac{q^{n^2-n}(1-q^n)}{(q)_n^2}&=\frac 1{(q)_{\infty}}\\
\end{align}
Hence,
\begin{align}
\sum_{0\leq n}\frac{q^{n^2-n}}{(q)_n^2}&=\frac 1{(q)_{\infty}}+\sum_{0\leq n}\frac{q^{n^2}}{(q)_n^2}\\
&=2\sum_{0\leq n}\frac{q^{n^2}}{(q)_n^2}
\end{align}
