# Definite integral of infinite product

I have been struggling for a while on evaluating this definite infinite product integral:

$$\int_{-\frac{\pi}{4}}^0(1+\tan{x})(1+\tan^2x)(1+\tan^4x)(1+\tan^8x)(1+\tan^{16}x)...dx$$

This is a question given by my maths teacher a while back and I have been struggling with it ever since. I have tried so many different substitutions and I have even tried integrating by parts (do NOT do this), but nothing has led me even close to an answer. I'm guessing there is trig identity I must be missing in order to simplify the inside of the integral? or some wonder substitution?

Any help would be greatly appreciated.

• I'm not sure why someone voted to close. The question is clear, the OP explained what they tried (although not in great detail), and the question is useful (it involves techniques that can be applied to other integrals). What am I missing?
– Dan
Jun 20 at 1:18

Here's a short method that uses a trigonometric substitution. Substituting $$u = \tan \theta$$, so that $$d\theta = \frac{du}{1 + u^2}$$, transforms the integral to $$\int_{-1}^0 \frac{(1 + u) (1 + u^2) (1 + u^4) \cdots}{1 + u^2} \,du .$$ Verify that (for $$u \in (-1, 0]$$), $$(1 + u) (1 + u^2) (1 + u^4) \cdots = 1 + u + u^2 + u^3 + \cdots = \frac{1}{1 - u} ,$$ and substituting realizes the integrand explicitly as a rational function.

The integral becomes $$\int_{-1}^0 \frac{du}{(1 - u) (1 + u^2)} = \boxed{\frac{1}{4} \log 2 + \frac{\pi}{8}}.$$

Hint: Try to prove that for $$x\in (-\pi/4,0)$$, $$\prod_{n=0}^\infty (1+\tan^{2^n}x)=\frac{1}{1-\tan x}.$$ EDIT: Take $$\prod_{n=0}^N (1+\tan^{2^n}x)=(1+\tan x)(1+\tan^2x)\cdots (1+\tan^{2^N}x)=\frac{(1-\tan x)(1+\tan x)(1+\tan^2x)\cdots (1+\tan^{2^N}x)}{1-\tan x}=\frac{(1-\tan^2x)(1+\tan^2x)(1+\tan^4x)\cdots (1+\tan^{2^N}x)}{1-\tan x}=\frac{(1-\tan^4x)(1+\tan^4x)\cdots (1+\tan^{2^N}x)}{1-\tan x}=\cdots=\frac{1-\tan^{2^{N+1}}x}{1-\tan x}\to \frac{1}{1-\tan x},$$ as $$N\to \infty$$, since $$x\in (-\pi/4,0)$$. From here is straightforward to compute the integral. The answer is $$\frac{\ln 2}{4}+\frac{\pi}{8}.$$

• Another way to see the identity at the top of your answer is to note that the expansion of $(1+\tan x)(1+\tan^2x) (1+\tan^4x) \cdots$ will contain a term of the form $\tan^m x$ exactly once for all values of $m \geq 0$. Specifically, if we expand $m$ in binary, then the product will contain the term $\tan^m x$ when we multiply the factors of $\tan^n x$ for the 1s in the binary expansion with the factors of $1$ for the 0s in the binary expansion. Thus, $$(1+\tan x)(1+\tan^2x) (1+\tan^4x) \cdots = \sum_{m = 0}^\infty \tan^m x = \frac{1}{1 - \tan x}.$$ Jun 20 at 14:35

HINT

Multiply and divide the integrand by $$1 - \tan(x)$$.

$$\int_{-\frac{\pi}{4}}^0(1+\tan{x})(1+\tan^2x)(1+\tan^4x)(1+\tan^8x)(1+\tan^{16}x)...dx$$

$$=\int_{-\frac{\pi}{4}}^0\color{red}{\frac{1}{1-\tan{x}}(1-\tan{x})}(1+\tan{x})(1+\tan^2x)(1+\tan^4x)(1+\tan^8x)(1+\tan^{16}x)...dx$$

(then collapse the product)

$$=\int_{-\frac{\pi}{4}}^0\frac{1}{1-\tan{x}}(1-(\tan{x})^\infty)dx$$ (probably shouldn't write this step, but it might be helpful)

$$=\int_{-\frac{\pi}{4}}^0\frac{1}{1-\tan{x}}dx$$

$$=\int_{-\frac{\pi}{4}}^0\frac12 \left(1+\tan{\left(x+\frac{\pi}{4}\right)}\right)dx$$

$$=\dots$$

$$=\frac18(\pi+\log 4)$$

• Why is it helpful to put in $1-\tan(x)^\infty$?
– Jojo
Jun 20 at 10:55
• @Joe To show why the product collapses to $1$.
– Dan
Jun 20 at 11:03
• It's an intuitive way to see that the product converges by saying that $\tan^\infty(x)=0$ on the interval $(-\pi/4,0]$?
– Jojo
Jun 21 at 16:05
• @Joe Yes, that's the idea.
– Dan
Jun 23 at 22:07