Evaluate $\int_{\pi/6}^{\pi/2} (\frac{1}{2} \tan\frac{x}{2}+\frac{1}{4} \tan\frac{x}{4}+ \cdots+\frac{1}{2^n} \tan\frac{x}{2^n}+\cdots) dx$ $$f(x)=\frac{1}{2} \tan\frac{x}{2}+\frac{1}{4} \tan\frac{x}{4}+....+\frac{1}{2^n} \tan\frac{x}{2^n}+...$$
Check the function $f(x)$ is continuous on $[\frac{\pi}{6},\frac{\pi}{2}]$ and evaluate $\displaystyle\int_{\pi/6}^{\pi/2} f(x)$.

I didn't manage to finish this problem, and I would post it as a comment, but it's too long and I figured that it might help someone to help the OP find an answer, so I have posted my solution thus far.

So we begin by noting that $\tan(x)$ is continuous in the region $[-\frac{\pi}{2},\frac{\pi}{2}]$. We further note that:
$$I_{n}=\frac{1}{2^{n}}\int_{\frac{\pi}{6}}^{\frac{\pi}{2}}\tan\left(\frac{x}{2^{n}}\right)\:\mathrm{d}x$$
Can be simplified by using the substitution $u_{n} = \frac{x}{2^{n}}, \implies \mathrm{d}u_{n} = \frac{\mathrm{d}x}{2^{n}}$, we thus can write:
$$I_{n} = \int_{\frac{\pi}{3 \cdot 2^{n+1}}}^{\frac{\pi}{2^{n+1}}}\tan\left(u\right)\:\mathrm{d}u$$
And we have that $\forall n > 1 : [\frac{\pi}{3 \cdot 2^{n+1}},\frac{\pi}{2^{n+1}}]\subset[-\frac{\pi}{2},\frac{\pi}{2}]$, thus the function is a sum of continuous functions over the domain of integration and is thus continuous itself.
We note that:
$$I_{n} = \left[-\ln\left(\cos(u)\right)\right]_{\frac{\pi}{3 \cdot 2^{n+1}}}^{\frac{\pi}{2^{n+1}}} = \ln\left(\cos\left(\frac{\pi}{3 \cdot 2^{n+1}}\right)\right)-\ln\left(\cos\left(\frac{\pi}{2^{n+1}}\right)\right)$$
Using log rules:
$$I_{n} = \ln\left(\frac{\cos\left(\pi/(3\cdot 2^{n+1})\right)}{\cos(\pi/2^{n+1})}\right) = \ln\left(\frac{1}{2\cos\left(\frac{\pi}{3 \cdot 2^{n}}\right)-1}\right) = -\ln\left(2\cos\left(\frac{\pi}{3\cdot 2^{n}}\right)-1\right)$$
It is useful to check that our integral doesn't blow up at large $n$:
$$\lim_{n\to\infty}I_{n} = 0$$
We note that:
$$\int_{-\frac{\pi}{6}}^{\frac{\pi}{3}}f(x)\:\mathrm{d}x = \sum_{n=1}^{N}I_{n} = -\ln\left(\prod_{n=1}^{N}\left(2\cos\left(\frac{\pi}{3\cdot 2^{n}}\right)-1\right)\right)$$
Now, I wish to make use of the fact that:
$$\prod_{n=1}^{N}\cos\left(\theta_{n}\right) = \frac{1}{2^{N}}\sum_{e \in S}\cos\left(e_{1}\theta_{1} + \cdots + e_{N}\theta_{N}\right)$$
And:
$$\sum_{n=1}^{\infty}\frac{\pi}{3 \cdot 2^{n}} = \frac{\pi}{3}$$

It is interesting to note that the dominating term in the product would be $\cos(\pi/3) = \frac{1}{2}$ and that $-\ln\left(2^{-1}\right) = \ln(2)$, which is the answer obtained by following math110's method.
