Let $f\colon[0, 1] \to \mathbb{R}$, $f(x)=\frac{\arctan(x)}{x}, x \in (0, 1], f(0)=1$. Prove that $$\lim_{n \to \infty} n \left(\frac{\pi}{4}-n\int_0^1\frac{x^n}{1+x^{2n}}dx \right)=\int_0^1f(x)dx$$
My approach was to make the change of variables $u=x^n, \text{ which is bijective on [0, 1]. Therefore } x=u^{\frac{1}{n}} \implies dx=\frac{1}{n}u^{\frac{1}{n}-1}; \frac{\pi}{4}=\int_0^1\frac{1}{1+x^2}dx$. Now we rewrite the requested limit: $$n \left(\frac{\pi}{4}-n\int_0^1\frac{x^n}{1+x^{2n}}dx \right)=n \left(\int_0^1\frac{1}{1+u^2}du-\int_0^1\frac{u^{\frac{1}{n}}}{1+u^{2}}dx \right)=\int_0^1\frac{-\frac{u^{\frac{1}{n}}-1}{\frac{1}{n}}}{1+u^2}du$$.
My question is now can we interchange the limit with the integral? $\frac{u^h-1}{h}$ approaches $\ln(u)$ when $h$ approaches $0$, so it would make sense that $$\lim_{n \to \infty}\int_0^1\frac{-\frac{u^{\frac{1}{n}}-1}{\frac{1}{n}}}{1+u^2}du=\int_0^1\frac{-\ln(u)}{1+u^2}du$$.
Now if we do integration by parts on $\int_0^1f(x)dx$ we obtain$$\int_0^1f(x)dx=\arctan(x)\ln(x)\mid_0^1-\int_0^1\frac{\ln(x)}{1+x^2}dx=\int_0^1\frac{-\ln(u)}{1+u^2}du$$
I have not yet learned in school about uniform convergence, but I read by myself that if a sequence of functions is uniformly convergent to some function, then we can interchange the limit. Is it true that $\frac{u^h-1}{h}$ converges uniformly to $\ln(u)$? It seems obvious, but I can't seem to prove it, since $u=0$ makes the function behave badly. But again $u=0$ is the only problem, it is only one point of discontinuity so it should not influence the value that much.
I do not know if this is relevant, but I looked up and found that $\int_0^1f(x)dx$ is the catalan constant.
Any help in solving this problem regarding the interchange of limits would be gladly appreciated.
The convergence $n \left(1 - u^{1/n} \right)\to -\ln(u)$ as $n \to \infty$ is not uniform for $u \in (0,1]$ since
$$\sup_{u \in (0,1]} \left|n \left(1 - u^{1/n} \right) -\ln(u) \right| = +\infty \underset{n \to \infty}\longrightarrow +\infty \neq 0$$
Nevertheless, you can interchange the limit and integral by the monotone convergence theorem since for each fixed $u \in [0,1]$ we have that $f(h,u) = \frac{1 - u^h}{h}$ is nondecreasing as $h \to 0+$.
Alternative Approach
Note that
$$\tag{1}D_n= \left|\int_0^1\frac{n(1-u^{1/n})}{1+u^2}\,du-\int_0^1\frac{-\ln(u)}{1+u^2}\,du\right| \\= \left|\int_0^\epsilon\frac{n(1-u^{1/n})}{1+u^2}\,du+\int_\epsilon^1\frac{n(1-u^{1/n})}{1+u^2}\,du-\int_\epsilon^1\frac{-\ln(u)}{1+u^2}\,du- \int_0^\epsilon\frac{-\ln(u)}{1+u^2}\,du\right|\\ \leqslant \underbrace{\left|\int_\epsilon^1\frac{n(1-u^{1/n})}{1+u^2}\,du-\int_\epsilon^1\frac{-\ln(u)}{1+u^2}\,du \right|}_{A(n,\epsilon)}+ \underbrace{\left|\int_0^\epsilon\frac{n(1-u^{1/n})}{1+u^2}\,du\right|}_{B(n,\epsilon)} + \underbrace{\left|\int_0^\epsilon\frac{-\ln(u)}{1+u^2}\,du\right|}_{C(\epsilon)}$$
Since $n(1- u^{1/n}) \to -\ln(u)$ monotonically as $n \to \infty$ for each $u \in (0,1]$ we can bound the second and third terms on the RHS of (1) (uniformly for all $n$) as
$$0 \leqslant B(n, \epsilon) \leqslant C(\epsilon)= \int_0^\epsilon\frac{-\ln(u)}{1+u^2}\,du\leqslant \int_0^\epsilon-\ln(u) \, du = \epsilon - \epsilon \ln(\epsilon)$$
It follows from (Arzela's) bounded convergence theorem for Riemann integrals that $$\lim_{n \to \infty} A(n,\epsilon) = 0$$
Hence, for all $\epsilon > 0$ we have
$$\tag{2}0 \leqslant \liminf_{n \to \infty} D_n \leqslant \limsup_{n \to \infty}D_n \leqslant \lim_{n \to \infty} A(n,\epsilon) + 2(\epsilon - \epsilon \ln (\epsilon))= 2(\epsilon - \epsilon \ln (\epsilon))$$
Since, the RHS of (2) can be arbitrarily small it follows that
$$\liminf_{n \to \infty} D_n = \limsup_{n \to \infty}D_n = \lim_{n \to \infty}D_n = 0,$$
and
$$\lim_{n \to \infty}\int_0^1\frac{n(1-u^{1/n})}{1+u^2}\,du=\int_0^1\frac{-\ln(u)}{1+u^2}\,du$$