How to calculate $\lim_{n\rightarrow \infty}n\int_0^{\pi/4}\tan^n(x)\ \text{d}x$ I've stuck in an expression
$$
\lim_{n\rightarrow \infty}n\int_0^{\pi/4}\tan^n(x)\ \text{d}x
$$
I use Mathematica and it gives me $\frac 12$, but I don't know how to calculate it. May someone give me a hand?
BTW: Why
$$
\frac{\partial}{\partial y}\int_a^b (f(x))^y\text{d}x= \int_a^b(f(x))^y\ln f(x)\ \text{d}x
$$
but not
$$
\int_a^b yf'(x)(f(x))^{y-1}\ \text{d}x
$$
 A: Let $u=\tan^{n}x$. Then: $$du=n\tan^{n-1}\left(x\right)\sec^{2}\left(x\right)dx$$ Since $\sin^{2}x+\cos^{2}x=1$, dividing by $\cos^{2}x$ gets us $$\tan^{2}x+1=\sec^{2}x$$, and so $$du=n\tan^{n-1}\left(x\right)\left(1+\tan^{2}x\right)dx$$ 
Next, since $u^{1/n}=\tan x$, this becomes:
$$du=nu^{\frac{n-1}{n}}\left(1+u^{2/n}\right)dx$$
and so: $$dx=\frac{du}{nu^{\frac{n-1}{n}}\left(1+u^{2/n}\right)}$$
As for the limits of integration, when $x=\frac{\pi}{4}$, $u=\tan^{n}\left(\frac{\pi}{4}\right)=1^{n}=1$, and when $x=0$, $u=\tan^{n}\left(0\right)=0^{n}=0$. Thus, the integral becomes:$$n\int_{0}^{\frac{\pi}{4}}\tan^{n}\left(x\right)dx=n\int_{0}^{1}u\frac{du}{nu^{\frac{n-1}{n}}\left(1+u^{2/n}\right)}$$which simplifies to: $$\int_{0}^{1}\frac{u^{1/n}}{1+u^{2/n}}du$$
Finally, note that as $n\rightarrow\infty$, $\frac{u^{1/n}}{1+u^{2/n}}$ tends monotonically to $\frac{1}{2}$ for all $u>0$. Thus, by the monotone convergence theorem: $$\lim_{n\rightarrow\infty}\int_{0}^{1}\frac{u^{1/n}}{1+u^{2/n}}du=\int_{0}^{1}\lim_{n\rightarrow\infty}\frac{u^{1/n}}{1+u^{2/n}}du=\int_{0}^{1}\frac{1}{2}du=\frac{1}{2}$$
As to your other question, when you apply $\frac{\partial}{\partial y}$ to an expression of the form $C^{y}$ (where $C$ is any expression that has nothing to do with $y$), the derivative is given by: $$\frac{\partial}{\partial y}\left\{ C^{y}\right\} =\frac{\partial}{\partial y}\left\{ e^{y\ln C}\right\} =\left(\ln C\right)e^{y\ln C}=\left(\ln C\right)C^{y}$$
