Playing with integrals on the form $\int \frac{1}{1-x^n}\,dx$ I noticed that for odd values of n > 5, it doesn't appear to be possible to express the integral as a closed-form expression. Is this true? How can I prove it?
Do closed-form expressions exist for these integrals?
1 Answers
All of those integrals have closed form expressions, for both even and odd $n$.
The polynomial $x^n-1$ can be factored over the complex numbers as $x^n - 1 = (x-1)(x-\zeta)(x-\zeta^2)\cdots(x-\zeta^{n-1}),$ and when $n$ is odd, the only real solution is $x-1$ and the complex factors pair up in conjugate pairs to give irreducible real quadratic polynomials. So the integral can be written as $\int\frac{1}{(1-x)Q_1(x)\cdots Q_{r}(x)}\,dx$ where $r=\frac{n-1}{2}$ and $Q_i(x)$ is an irreducible quadratic polynomial.
Using the method of partial fractions, you can then rewrite the integral as a sum of integrals $\int \frac{1}{1-x^n}\,dx = \int\frac{A}{1-x}\,dx + \int\frac{B_1x+C_1}{Q_1(x)}\,dx + \cdots + \int\frac{B_rx + C_r}{Q_r(x)}\,dx$ with $A$, $B_i$, and $C_i$ all constants. The problem then reduces to solving these integrals.
The first integral is easy to do with a change of variable, as is any integral of the form $\int \frac{x}{Q_i(x)}\,dx$ with $Q_i$ irreducible quadratic (see below for how to them). So you only need to know how to solve integrals of the form $\int\frac{1}{Q_i(x)}\,dx$; these can be done by completing the square and doing a change of variable, which will lead to an integral of the form $\int\frac{du}{u^2+1}$, which has a closed form. Again, see below for the general method.
In short, they all have closed forms.
When $n$ is even, the only difference is that you have a second linear factor in the factorization, $x+1$, and that the number of irreducible quadratics is then $\frac{n-2}{2}$ instead of $\frac{n-1}{2}$.
To see this in action, let's consider the case of $n=7$. The polynomial $1-x^7$ factors as \begin{align*} (1-x^7) &= (1-x)(x-\zeta)(x-\zeta^2)(x-\zeta^3)(x-\zeta^4)(x-\zeta^5)(x-\zeta^6)\\ &= (-x)\Bigl((x-\zeta)(x-\zeta^6)\Bigr)\Bigl((x-\zeta^2)(x-\zeta^5)\Bigr)\Bigl((x-\zeta^3)(x-\zeta^4)\Bigr) \end{align*} Now, $\zeta=\cos(\frac{2\pi}{7}) + i\sin(\frac{2\pi}{7})$. It is now easy to check that \begin{align*} (x-\zeta)(x-\zeta^6) &= x^2 -2x\cos\frac{2\pi}{7} + 1\\ &= x^2 -c_2 x + 1\\ (x-\zeta^2)(x-\zeta^5) &= x^2 - 2x\cos\frac{4\pi}{7} + 1\\ &= x^2 -c_4x + 1\\ (x-\zeta^3)(x-\zeta^4) &= x^2 - 2x\cos\frac{6\pi}{7} + 1\\ &= x^2 - c_6x + 1 \end{align*} where for simplicity we have $c_j = 2\cos\frac{j\pi}{7}$.
The discriminant of each of these quadratic polynomials is $4(\cos^2\frac{2k\pi}{7} -1)$, which is always negative, so they are all irreducible quadratics. Now use the method of partial fractions to obtain a closed form for the integral. It will be in the form of the sum of natural logs and arctangent functions.
In general, the polynomial will have no repeated quadratic factors, which makes it very easy to solve using partial fractions. The irreducible quadratic factors with $n$ odd will be $x^2 -2x\cos\frac{2k\pi}{n} + 1,\qquad k=1,\ldots,\frac{n-1}{2}.$ When $n$ is even, the irreducible quadratic factors will be the same, but $k$ only goes up to $\frac{n-2}{2}$.
Just to give you a guide on solving those integrals in general:
An integral of the form $\int\frac{1}{ax+b}\,dx$ can be solved by doing the change of variable $u=ax+b$.
An integral of the form $\int\frac{1}{x^2+1}\,dx$ is immediate: you get $\arctan(x)+C$.
An integral of the form $\int\frac{1}{(x-a)^2+b^2}\,dx$ can be solved by first factoring out $b^2$ from the denominator, then doing the change of variable $u = \frac{x-a}{b}$, which brings it to the form in 2.
If $Q(x) = x^2+Bx+C$ is irreducible quadratic, it can always be rewritten as $(x-a)^2 + b^2$ for some real numbers $a$ and $b$ (complete the square).
If $x^2+Bx+C$ is irreducible quadratic, then the integral of the form $\int\frac{x}{x^2+Bx+C}\,dx$ can be solved by rewriting as $\frac{1}{2}\int\frac{2x+B}{x^2+Bx+C}\,dx - \frac{B}{2}\int\frac{1}{x^2+Bx+C}\,dx$. The first integral can be solved by the change of variable $u=x^2+Bx+C$, the second using the method in 3.
Since you can rewrite $\int\frac{1}{1-x^n}\,dx$ into a sum of integrals of the forms described above, there is a closed form for it for all $n$.
Added: In principle, any integral of a rational function (polynomial divided by polynomial) has a closed form, which can be obtained by factoring the denominator into irreducible factors and using a partial fractions decomposition. This is a consequence of the Fundamental Theorem of Algebra; in fact, it was this particular application, the integration of rational functions, which provided the early impetus to prove the Fundamental Theorem of Algebra.
The only practical obstacle to finding the closed form is our ability to factor the denominator into irreducible factors; repeated irreducible quadratic factors introduce some minor complications that are resolved by using integration by parts to obtain reduction formulas. In the case of the polynomials you were looking at, though, factoring the denominator is straightforward, so that there is no practical difficulty in finding a closed form.
-
0@Moron: Done: forgot to triple-backslash. Took me a bit because I was adding the general method in lieu of doing the $(1-x)^7$ one explicitly. – 2011-01-26