Solving $\lim_{n\to\infty}(n\int_0^{\pi/4}(\tan x)^ndx)$?

You may perform the change of variable $u=\tan x$ to get easily $$ I_n:=\int_0^{\pi/4}(\tan x)^ndx=\int_0^1\frac{u^n}{1+u^2}du. $$ Then you may just integrate by parts, $$ \begin{align} I_n=\int_0^1\frac{u^n}{1+u^2}du&=\left. \frac{u^{n+1}}{(n+1)}\frac{1}{1+u^2}\right|_0^1+\frac{2}{(n+1)}\int_0^1\frac{u^{n+2}}{(1+u^2)^2}\:du\\\\ &=\color{blue}{\frac12}\frac1{(n+1)}+\frac{2}{(n+1)}\int_0^1\frac{u^{n+2}}{(1+u^2)^2}\:du. \tag1 \end{align} $$ Observing that $$ 0\leq \int_0^1\frac{u^{n+2}}{(1+u^2)^2}\:du\leq \int_0^1 u^n\:du=\frac1{n+1} $$ gives $$ 0\leq \frac{2}{(n+1)}\int_0^1\frac{u^n}{(1+u^2)^2}\:du\leq \frac{2}{(n+1)^2}. \tag2 $$ Then combining $(1)$ and $(2)$ leads to

$$ \lim_{n \to +\infty}n\int_0^{\pi/4}\!(\tan x)^n\:dx=\lim_{n \to +\infty}n\:I_n=\color{blue}{{\frac12}}$$

as suggested.


Here's another idea, like you asked:

$$ \lim_{n \to \infty} n\int_0^{\pi/4} (\tan x)^n dx = \lim_{n \to \infty} \int_0^1 \frac{n u^n}{u^2+1} du $$ using $ u= tanx $ and then

$$ \lim_{n \to \infty} \int_0^1 \frac{n u^n}{u^2+1} du = \lim_{n \to \infty } \int_0^1 \frac{y^{\frac{1}{n}}}{1+y^{\frac{2}{n}}} dy $$ using $ y= u^n$

Note that, in this form, we have "absorbed" the $n$ that tends to infinity in a way that we can easily see what happens in the limit. Namely, the exponents tend to zero, so $y$ to the exponent tends to $1$ and hence

$$ \lim_{n \to \infty } \int_0^1 \frac{y^{\frac{1}{n}}}{1+y^{\frac{2}{n}}} dy = \int_0^1 \frac{dy}{1+1} = \frac{1}{2} \int_0^1 dy = \frac{1}{2} $$ and you obtain your result after an easy integral.


Here's a solution based on order statistics, similar to my answer here.

Let $X_1,\dots, X_n$ be i.i.d. random variables with density $f(x)=1+\tan(x)^2$ on $(0,\pi/4)$. The distribution function of $X$ is $F(x)=\tan(x)$ for $0\leq x\leq \pi/4$. Now let $M=\max(X_1,\dots, X_n)$; its density function is $$f_M(x)=n F(x)^{n-1}f_X(x)=n\,(\tan(x))^{n-1}\,(1+\tan(x)^2)\text{ for }0\leq x\leq \pi/4.$$ Also, it is not hard to see that $M\to \pi/4$ in distribution as $n\to\infty$. Now $$\int_0^{\pi/4} n \tan(x)^n \,dx =\int_0^{\pi/4} {\tan(x)\over 1+\tan(x)^2}\, f_M(x) \,dx =\mathbb{E}\left({\tan(M)\over 1+\tan(M)^2}\right).$$

Since $\tan(\pi/4)=1$, this converges to ${1\over 1+1}={1\over 2}$ as $n\to\infty$.