Evaluating $\lim_{n\to\infty} n\int_{0}^{\pi/4} \tan^n(x) \,{\rm d}x$ I came up across this question several weeks ago, and I've finally got a solution, however, I feel like there is a much more 'neat' solution out there. The solution that I came up with is as following.
$$\lim_{n\to\infty} n\int_{0}^{\pi/4} \tan^n(x) \,{\rm d}x$$
Using the substitution $u=\tan^n(x)$, we obtain the following
$$\lim_{n\to\infty} \int_{0}^{1}\frac{u^{1/n}}{1+u^{2/n}} {\rm d}x$$
I am not exactly sure about the conditions where I can swap the limit and the integral, but I assume that works in this case because the answer is correct. Doing that we obtain
$$\int_{0}^{1}\frac{1}{2} {\rm d}x=\frac{1}{2}$$
Which is the correct answer. Would appreciate any alternative solutions (not necessarily just the neat ones)
 A: $0\leq \frac t {1+t^{2}}\leq \frac 1  2$ for $t>0$. Taking $t=u^{1/n}$ we see that Dominated Convergence Theorem can be used to justify the interchange of limit and the integral.
A: If you are aware of the Gaussian hypergeometric function
$$I_n=\int \tan^n(x)\,dx$$ $$I_n==\frac{\tan ^{n+1}(x) }{n+1}\,
   _2F_1\left(1,\frac{n+1}{2};\frac{n+3}{2};-\tan
   ^2(x)\right)$$ and
$$J_n=\int_0^{\frac \pi 4} \tan^n(x)\,dx$$ reduces to
$$J_n=\frac{1}{4} \left(\psi
   ^{(0)}\left(\frac{n+3}{4}\right)-\psi
   ^{(0)}\left(\frac{n+1}{4}\right)\right)$$ Using the expansion of the digamma function for large $n$ gives
$$J_n=\frac{1}{2 n}-\frac{1}{2 n^3}+\frac{5}{2
   n^5}+O\left(\frac{1}{n^7}\right)$$
$$n\, J_n=\frac{1}{2}-\frac{1}{2 n^2}+\frac{5}{2
   n^4}+O\left(\frac{1}{n^6}\right)$$ which shows an absolute relative error smaller than $0.01$% as soon as $n >6$.
A: The limit can be solved with Laplace's method. Setting $y=1-x$ gives
$$ I = \int_0^{\pi/4} \tan^n(x)dx = \int_{1-\pi/4}^1 \exp\left(-np(y) \right)dy$$
where $p(y) = -\ln\left( \tan(1-y)\right)$. The minimum occurs at $y=1-\pi/4$ and hence Taylor expanding $p(y)$ around this point gives
$$p(y) = 2(y+\pi/4-1)+\frac{4}{3}(y+\pi/4-1)^3+ \frac{4}{3}(y+\pi/4-1)^5+... $$
Using Laplace method then gives that to leading order,
$$I \sim \frac{1}{2n}, \quad n\rightarrow \infty$$
which then gives that
$$\lim_{n\rightarrow\infty} n\int_0^{\pi/4} \tan^n(x)dx \rightarrow \frac{1}{2}$$
Including additional terms, one has that the integral asymptotically is given by
$$ I \sim \sum_{s=0}^\infty \frac{\Gamma(s+1)b_s}{n^{s+1}}
$$
where $$b_s = \text{Res}\left[\frac{1}{(-\ln(\tan(1-y)))^{s+1}}, y=1-\pi/4 \right] $$
I don't know if there is a closed expression for $b_s$ but the first coefficients are $\frac{1}{2},0,-\frac{1}{4},0,\frac{5}{48},...$ which gives
$$ I \sim \frac{1}{2n} - \frac{1}{2n^3} + \frac{5}{2n^5} + ...
$$
A: By reduction formula
\begin{aligned}
I_n & :=\int_0^{\frac{\pi}{4}} \tan ^n x d x \\
& =\int_0^{\frac{\pi}{4}} \tan ^{n-2} x\left(\sec ^2 x-1\right) d x \\
& =\int_0^{\frac{\pi}{4}} \tan ^{n-2} x d(\tan x)-I_{n-2} \\
& =\left[\frac{\tan ^{n-1} x}{n-1}\right]_0^{\frac{\pi}{4}}-I_{n-2} \\
& =\frac{1}{n-1}-I_{n-2}\\ \Rightarrow  n I_n&=\frac{n}{n-1}-n I_{n-2}
\end{aligned}
Then take limit $n \rightarrow \infty$ on both sides yields
$$
L=\lim _{n \rightarrow \infty} n I_n =1-\lim _{n \rightarrow \infty}  \frac{n}{n-2} \cdot \lim _{n \rightarrow \infty} \left[(n-2) I_{n-2}\right]=1-L
$$
Therefore we can conclude that $ \displaystyle  L=\frac{1}{2} .$
