Limit of the integral of $\frac{x^n+1}{x^n+2}$ Consider the following integral:
\begin{align}
F(x) = \lim_{n\rightarrow\infty}\int f_n(x)dx = \lim_{n\rightarrow\infty}\int\frac{x^n+1}{x^n+2}dx
\end{align}
How does one evaluate this integral explicitly? I have considered the uniform convergence criterion for the exchange of limit and integration. If we do this, the convergence of $f_n$ depends on the domain in an interesting way:
\begin{align}
\lim_{n\rightarrow\infty} f_n(x) = \left\{\begin{array}{l}1\qquad &x\lt-1\\ \text{Does not exist }\qquad &x=-1\\ 1/2\qquad &x\in(-1,1)\\ 2/3\qquad &x=1\\ 1\qquad &x\gt 1\end{array}\right\} 
\end{align} 
My question is then, How can we interpret the indefinite integral? Do we simply define a piecwise continuous function for this while ignoring the two points $\pm$1? or am I way off base here?? A naive capitulation to Wolfram suggests a Hypergeometric function is involved?? I would like to define the following:
\begin{align}
F(x) = \left\{\begin{array}xx\qquad &x\in(-\infty,-1)\bigcup(1,\infty)\\
x/2\qquad &x\in (-1,1)\end{array}\right\}
\end{align}
What is wrong with this idea? Thx
 A: A different manner to answer to the question is to show a graphical representation to the function $f(x)$ for various values of $n$ and a graphical representation of the respective integrals $F(X)$. ( The old saw that “One little picture says more than a long speech”)
This makes more understandable the behavior of the function and integral  for $n$ tending to infinity. Of course the aim of this approach is not to give a formal and due proof. Nevertheless, well understanding the behavior is a valuable help for further attemp to built a formal proof.


A: Another approach with the Heaviside function :

Note : Concerning the integral (not at limit), i.e.: $F(X,n)$, in case of $X<0$ and $n$ odd it is understood as the Cauchy principal value.
A: The indefinite integral is given by 
$$
\int\frac{x^n+1}{x^n+2}dx = x-\frac{x}{2}{}_2F_1\left(1,\frac{1}{n}, 
1+\frac{1}{n}, -\frac{x^n}{2} \right).
$$
In the limit, we have 
$$
\lim_{n\rightarrow\infty}{}_2F_1\left(1,\frac{1}{n}, 
1+\frac{1}{n}, -\frac{x^n}{2} \right)=1,
$$
independent of the value of $x$ (the fourth argument can limit to $0$, $\pm 1$, or $\pm\infty$ and the limit of the hypergeometric function is the same in all cases), so the solution is 
$$
\lim_{n\rightarrow\infty}\int\frac{x^n+1}{x^n+2}dx = \frac{x}{2}.
$$
