Convergence to $\pi$

The limit of the function $$f(x) = \dfrac{1}{2}\dfrac{1-\tan(\pi/4-\pi 2^{-x})}{2^{-x}}$$

as $x\to\infty$ has "indeterminate form" of $0/0$, and so L'Hopital's works fine. Replace $2^{-x}$ with $a(x)$ for convenience, and note $a(x)\to 0$.

$$\,\, \dfrac{1}{2}\lim_{x\to\infty} \dfrac{1-\tan(\pi/4-\pi a(x))}{a(x)} =\,\, \dfrac{1}{2}\lim_{x\to\infty} \dfrac{-\sec^2(\pi/4-\pi a(x))\cdot (-\pi a'(x))}{a'(x)}$$

$$=\dfrac{1}{2}\lim_{x\to\infty} -\sec^2(\pi/4-\pi a(x))\cdot (-\pi) = \dfrac{\pi}{2}\sec^2(\dfrac{\pi}{4}) = \dfrac{\pi}{2}\cdot 2$$

and of course... if $f(x)\to L, f(n)\to L$.


Use the formula of tangent of angle difference, and that $\tan(\pi/4)=1$: $$1-\tan(\pi/4-\pi/2^n)=1-\frac{\tan(\pi/4)-\tan(\pi/2^n)}{1+\tan(\pi/4)\tan(\pi/2^n)}=1-\frac{1-\tan(\pi/2^n)}{1+\tan(\pi/2^n)}=\frac{2\tan(\pi/2^n)}{1+\tan(\pi/2^n)}$$

Then use the fact that $\lim_{x\rightarrow 0}\frac{\tan(x)}{x}=\lim_{x\rightarrow 0}\frac{\sin(x)}{x}\cdot\frac{1}{\cos(x)}=1$

$$\lim_{n\rightarrow\infty}2^{n-1}[1-\tan(\pi/4-\pi/2^n)]=\lim_{n\rightarrow\infty}\frac{2^n\tan(\pi/2^n)}{1+\tan(\pi/2^n)}=\lim_{n\rightarrow\infty}\frac{\tan(\pi/2^n)}{\pi/2^n}\frac{\pi}{1+\tan(\pi/2^n)}=1\cdot\frac{\pi}{1+0}=\pi$$