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

$$f(x)=\lim_{n\to\infty}\biggl(n\int_0^{\pi/4}(\tan x)^n\,dx\biggr)$$ I try to this way, $\tan x\ge x$, when $x\in(0,\frac\pi4)$, but this turns out to be $\tan x\ge0$, which is obvious even without calculation. I think it can be solved by using the squeeze rule but I can't find a proper scaler to meet $A=g(x)\le f(x)\le h(x)=A$ when $n\to\infty$

$\color{red}{Edit}$: According to@Khallil's advice, I can solve that $f(n)+f(n+2)=\frac1{n+1}$, and it's trivial that $\frac1{n+1}=f(n)+f(n+2)\le 2f(n)\le f(n-2)+f(n)=\frac1{n-1}$. So $f(x)=\frac12$.

This is easy and quick. Btw, is there any other idea?

$\color{red}{Edit[2]}$: I find that @Byron Schmuland 's method is especially useful in a specific kind of problem. $$f(x)=\lim_{n\to\infty}\int_0^1\frac{x^n}{1+x}dx$$,for example, Let $X_,...,X_n$ be i.i.d. random variables with density$f(x)=1$ on $(0,1)$, CDF(cumulative density function) of $X$ is $F(x)=x$. Now let $M=\max(X_1,\dots,X_n)$, its density function is: $f_M(x)=nx^{n-1}$ for $x\in(0,1)$ Also, it's also not hard to see that $M\to1$ in distribution as $n\to\infty$. So,$$f(x)=\lim_{n\to\infty}\int_0^1\frac{x^n}{1+x}dx=\lim_{n\to\infty}\frac1n\int_0^1{f_M(x)\frac{x}{x+1}dx}=\lim_{n\to\infty}\frac1nE(\frac{M}{M+1})=0$$ Although this simple example can be solved by other ways more easily, but this gives us another perspective.

• Have you tried setting up a reduction formula? – Kari Aug 10 '15 at 11:44
• @Khallil Thank you. It works! I edit my answer by following your idea. – Rowan Aug 10 '15 at 12:02

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.

• This way is straight. And the formula before$(1)$, the numerator is $u^{n+1+1}=u^{n+2}\ne u^{n+1-1}=u^n$. But the$\le$ part is still true. – Rowan Aug 10 '15 at 12:36
• @user229922 Observe that $u^{n+2}\leq u^n$ since $u \in [0,1]$. Thanks! – Olivier Oloa Aug 10 '15 at 12:37
• Sure. And many thanks. You have answered several questions of mine. :) – Rowan Aug 15 '15 at 23:10
• I had accepted just yet and seems no response, I'll do it again ...Any I I always forgot to accept good answers cuz I almost forgot this function, so sorry about this. – Rowan Aug 15 '15 at 23:40

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.

• Please, how do you justify permuting limit and integral here? Thanks. – Olivier Oloa Aug 10 '15 at 12:38
• Wow! Nice method. – Rowan Aug 10 '15 at 12:43
• Dominated convergence or monotonic convergence would both work @OlivierOloa. – Daniel Fischer Aug 10 '15 at 12:43
• @DanielFischer Ok, thanks for him :) It might be better to mention it. – Olivier Oloa Aug 10 '15 at 12:44

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$.

• Thanks you for providing such a wonderful method. For me, it's easy to understand your answer but really hard to think of this method. Is there any general rule to find a problem can be transferred to a statistic one? Or, is it empirical that you can tell there is a pdf $f(x)=1+(tanx)^2$ qualify this question. – Rowan Aug 10 '15 at 13:09
• I first noticed that $F(x)=\tan(x)$ on $(0,\pi/4)$ increases from 0 to 1, so it is a distribution function. Then I just differentiated it to find the density. – user940 Aug 10 '15 at 13:42
• I tried a similar problem using your method.Could you please check it for me to see whether it's correct? I edit my question and wrote the problem in the bottom. – Rowan Aug 10 '15 at 14:23
• @user229922 What you've done is OK, but a bit complicated for the simple problem where you don't multiply by $n$. – user940 Aug 10 '15 at 14:34

After letting $\tan(x)\mapsto x$ and using the elementary limit $\lim_{n\to\infty} n \int_0^1 x^n f(x) \ dx = f(1)$, where $f(x)$ is continuous, we conclude that $$\lim_{n\to\infty}\biggl(n\int_0^{\pi/4}(\tan x)^n\,dx\biggr)=\frac{1}{2}.$$

• It's concise; Byron Schmuland's answer provide a good way to prove this elementary limit. It's so great to learn so many different methods! Thank you. – Rowan Aug 10 '15 at 16:51


\begin{align} \lim_{n \to \infty}\bracks{n\int_{0}^{\pi/4}\tan^{n}\pars{x}\,\dd x} & = \lim_{n \to \infty}\bracks{n\int_{0}^{\pi/4} \tan^{n}\pars{{\pi \over 4} - x}\,\dd x} \\[5mm] & = \lim_{n \to \infty}\bracks{n\int_{0}^{\pi/4} \exp\pars{n\ln\pars{\tan\pars{{\pi \over 4} - x}}}\,\dd x} \\[5mm] & = \lim_{n \to \infty}\bracks{n\int_{0}^{\infty} \exp\pars{-2nx}\,\dd x} = \lim_{n \to \infty}\pars{n\,{1 \over 2n}} = \bbx{\ds{1 \over 2}} \end{align}