# Evaluating the integral $\int_{0}^{1}\frac{x^n}{1 + x^n}\,\mathrm dx$.

For each positive integer $n$, let $f_{n}$ be the function defined on the interval [0,1] by $$f_{n}(x) = \frac{x^n}{1 + x^n},$$ I want to find $$\int_{0}^{1}f_{n}(x)\,\mathrm dx,$$ I thought that I could add and subtract $1$ to the numerator, but then how can I integrate $\frac{1}{1 + x^n}$?, any help would be appreciated.

• Function is only defined exactly at $1$ Aug 26, 2017 at 13:53
• Why this ? For positive $n$, $f_n(x)$ is defined without problems in [0,1]. We do not have the $0^0$-problem Aug 26, 2017 at 13:57
• why you said this? @ArchisWelankar Aug 26, 2017 at 13:58
• I said this because 1 is first positive integer. Aug 26, 2017 at 18:13
• @ArchisWelankar so could u please right a solution taking into account your note mentioned above? Aug 26, 2017 at 22:28

Probably too long for a comment.

Welcome to the world of hypergeometric functions !

Sooner or later, you will learn that $$\int \frac {dx} {1+x^n} =x \, _2F_1\left(1,\frac{1}{n};1+\frac{1}{n};-x^n\right)$$ where appears the Gaussian or ordinary hypergeometric function (see here).

The beauty of the interval you are using makes (after simplifications) $$I_n=\int_0 ^1 \frac {x^n} {1+x^n}\,dx=\frac{H_{\frac{1}{2 n}}-H_{\frac{1}{2} \left(\frac{1}{n}-1\right)}}{2 n}$$ where appear generalized harmonic numbers.

When $n$ becomes large, the asymptotics is then given by

$$I_n=\frac{\log (2)}{n}-\frac{\pi ^2}{12 n^2}+O\left(\frac{1}{n^3}\right)$$

Method 1.

Hint. One may recall the standard integral representation of the digamma function $$\psi(s+1)=-\gamma+\int_0^1 \frac{1-x^s}{1-x}dx,\qquad s>0. \tag{3}$$

One may write \begin{align} \int_0^1\frac{x^n}{1 + x^n}\:dx=&\frac{1}{n}\int_0^1\frac{u^{1/n}}{1 + u}\:dx \qquad (u=x^n) \\\\=&\frac{1}{n}\int_0^1\frac{u^{1/n}(1-u)}{1 - u^2}\:dx \\\\=&\frac{1}{2n}\int_0^1\frac{v^{1/(2n)}-v^{1/(2n)+1/2}}{1 - v}\:v^{1/2-1}dv \qquad (v=u^2) \\\\=&-\frac{1}{2n}\left(-\gamma+\int_0^1\frac{1-v^{1/(2n)-1/2}}{1-v}\:dx\right)+\frac{1}{2n}\left(-\gamma+\int_0^1\frac{1-v^{1/(2n)}}{1-v}\:dx\right) \\\\=&-\frac{1}{2n}\psi\left(\frac{1}{2 n}+\frac{1}{2}\right)+\frac{1}{2n}\psi\left(\frac{1}{2 n}+1\right). \end{align} Then by using special values of the digamma function one can obtain nice closed forms.

Method 2.

As noted, it suffices to evaluate the definite integral $$I_n=\int_0^1 \frac1{x^n+1}dx$$ Note that $$x^n+1= \prod_{k=1}^n(x-x_k)$$ with $$x_k= e^{i\frac{(2k-1)\pi}n}$$ and $$\frac1{x^n+1}=-\frac1n \sum_{k=1}^n\frac{x_k}{x-x_k}$$ Then \begin{align} I_n & = -\frac1n \sum_{k=1}^n\int_0^1 \frac{x_k}{x-x_k} dx = -\frac1n \sum_{k=1}^nx_k\ln(1-x_k^{-1})\\ &= -\frac1n \sum_{k=1}^n x_k \left[i \frac{n-2k+1}{2n}+ \ln \left(2 \sin\frac{(2k-1)\pi}{2n}\right) \right] \end{align} Apply $$\sum_{k=1}^nx^k=0$$ along with the symmetry of $$x^k$$ to obtain $$\int_0^1 \frac1{x^n+1}dx = \frac2n \sum_{k=1}^{[\frac n2]} ( \theta_k \sin2\theta_k + \cos2\theta_k \ln \cos\theta_k)$$ where $$\theta_k= \frac{n-2k+1}{2n}$$. The close-form holds for any $$n\ge2$$ and produces \begin{align} & \int_0^1 \frac1{x^2+1} dx= \frac\pi4\\ & \int_0^1 \frac1{x^3+1} dx= \frac\pi{3\sqrt3}+\frac13\ln2\\ & \int_0^1 \frac1{x^4+1} dx= \frac\pi{4\sqrt2}+\frac1{2\sqrt2}\ln(1+\sqrt2)\\ & \int_0^1 \frac1{x^5+1} dx= \frac\pi{5\sqrt2}\sqrt{1+\frac1{\sqrt5}}+\frac1{\sqrt5}\ln\frac{1+\sqrt5}2 +\frac15\ln2\\ & \int_0^1 \frac1{x^6+1} dx= \frac\pi6 +\frac1{2\sqrt3}\ln(2+\sqrt3) \\ & \hspace{1cm}... \end{align}