How do we calculate this limit:
$$ \lim_{x\to 1^-} \prod_{n=0}^{\infty } \left(\frac{1+x^{n+1}}{1+x^n}\right)^{x^n}$$
I tried to take log and convert the resulting sum of logs into an integral but couldn't proceed after that. The answer is given as $\frac{2}{e}$ which probably means that taking log is the first step. Any help is appreciated.
Edit:
This is given as the solution but I couldn't understand where step 3(they express the limit between two inequalities) comes from.

With $t_n=\ln(1+x^n)$, i.e. $x^n=e^{t_n}-1$, we have $$\sum^\infty_{n=0}x^n\,(\ln(1+x^{n+1})-\ln(1+x^n))=-\sum^\infty_{n=0}(e^{t_n}-1)\,(t_n-t_{n+1}).$$ Since $t_0=\ln 2$ and $t_n\to0$ as $n\to\infty$, the sum on the RHS is an integral sum for $$\int^{\ln2}_0(e^t-1)\,dt$$ and since $0<t_n-t_{n+1}\le t_0-t_1=\ln2-\ln(1+x)\to0$ as $x\to1^{-}$, $$\lim_{x\to1^{-}}\sum^\infty_{n=0}x^n\,(\ln(1+x^{n+1})-\ln(1+x^n))=-\int^{\ln2}_0(e^t-1)\,dt=\ln2-1.$$ EDIT: Here, we have an infinite integral sum, but this sum is the integral of a step function with value $e^{t_n}-1$ in $(t_{n+1}, t_n)$, and this function converges to $e^t-1$ monotonically, because of the monotony of $e^t-1$. So convergence is ensured in this case, too.