Let $f_n(x):=\frac{x^n}{n+x^n}$ for $x \in [0,+\infty)$. Let $f$ indicate its pointwise limit, i.e. $$f:\begin{cases}0 &\quad~ 0\le x< 1 \\ 1 & \quad \quad x\ge 1\end{cases}$$
I observed that the sequence of functions $f_n$ converges uniformly on every interval $[0, \alpha]$, $[\beta,+\infty)$ for any $\alpha<1$, $\beta>1$. If one supposes by contradiction that the sequence converges uniformly on $[0,+\infty)$, this contradicts the completeness of $B([0,+\infty))$: $f_n$ is bounded and continuous for every $n\in \mathbb{N}$. I would like to understand if the claim
$$\lim_{n\to \infty}\int_0^{+\infty}|f_n(t)-f(t)|dt=0$$
holds even without uniform convergence.
Supposing that the limit exists and is finite, one could manipulate the integral to show that $$\int_0^{+\infty}|f_n(t)-f(t)|dt=\int_0^{\alpha}|f_n(t)-f(t)|dt+\int_{\alpha}^{1}|f_n(t)-f(t)|dt+\int_{1}^{\beta}|f_n(t)-f(t)|dt+\int_{\beta}^{+\infty}|f_n(t)-f(t)|dt$$ for any $\alpha<1,~\beta>1$. The first and the last integral converge to zero as $n\to \infty$ because the sequence $f_n$ converges uniformly on the domain of integration. Now, $$0\le \int_{\alpha}^{1}|f_n(t)-f(t)|dt=\int_{\alpha}^{1}\frac{t^n}{n+t^n}dt\leq\int_{\alpha}^{1}t^ndt=\frac{1}{n+1}-\frac{\alpha^n}{n+1}\stackrel{n\to \infty}{\longrightarrow} 0$$ Since the limit of the expression on the right is zero, the integral converges to $0$. Instead,
$$\int_{1}^{\beta}|f_n(t)-f(t)|=\int_{1}^{\beta}\left (1-\frac{t^n}{n+t^n} \right )dt=\int_{1}^{\beta}\frac{n}{n+t^n}dt$$
I cannot seem to find a good bound on the integral that tends to $0$ as $n$ goes to infinity. I am also unable to show that if this integral diverges or is greater than a constant term independent from $n$. Does this integral actually converge? How could I show if the equality holds or not?
The pointwise limit is $$f(x):=\begin{cases}0 &\quad~ 0\le x\le 1 \\ 1 & \quad \quad x> 1\end{cases}$$ To evaluate $\int_0^\infty |f_n-f|dx$, we separate the integral into three parts, with fixed $\epsilon>0$, $$\int_0^\infty |f_n-f|dx=\int_0^1 |f_n-f|dx+\int_1^{1+\epsilon} |f_n-f|dx+\int_{1+\epsilon}^\infty |f_n-f|dx$$
$\int_0^1 |f_n-f|dx=\int_0^1 \frac{x^n}{n+x^n}\to 0$ since $\frac{x^n}{n+x^n}\to 0$ pointwise, and $\frac{x^n}{n+x^n}\le 1$ then by dominant convergence theorem.
$\int_{1+\epsilon}^\infty |f_n-f|dx=\int_{1+\epsilon}^\infty \frac{n}{n+x^n}dx\le \int_{1+\epsilon}^\infty \frac{n}{x^n}dx=-\frac{n}{n-1}\frac{1}{x^{n-1}}|_{1+\epsilon}^\infty=\frac{n}{n-1}\frac{1}{{(1+\epsilon)}^{n-1}}\to 0$
$\int_1^{1+\epsilon} |f_n-f|dx=\int_1^{1+\epsilon} \frac{n}{n+x^n}dx\to 0$ since $\frac{n}{n+x^n}\le 1$, $\frac{n}{n+x^n}\to 0$ for $x\in (1,1+\epsilon)$ then by dominant convergence theorem.
So the whole integral converges.