Problem 276 · General formula
Easy Partial Fractions

Evaluate the integral, for n in N: I = integral

Evaluate the integral, for $n\in\mathbb N$: $$ I = \int \frac{dx}{1+x^{2n}}. $$

Explanation of Method

The roots of $x^{2n}=-1$ come in $n$ complex-conjugate pairs, each pair giving a real irreducible quadratic factor of $1+x^{2n}$. Partial fractions over these $n$ quadratics, followed by completing the square in each, produces a sum of $n$ logarithm-plus-arctangent terms.

  1. Verify the pattern on the elementary cases $n=1$ and $n=2$.
  2. Factor $1+x^{2n}$ into $n$ real quadratics.
  3. Decompose into partial fractions over those quadratics.
  4. Integrate each quadratic's term.

Step 1 · Base cases

For $n=1$: $\displaystyle\int\frac{dx}{1+x^2}=\arctan x+C$.

For $n=2$: factoring $1+x^4=(x^2-\sqrt2x+1)(x^2+\sqrt2x+1)$ and decomposing gives the classical result:

$$ \int\frac{dx}{1+x^4} = \frac1{4\sqrt2}\ln\left|\frac{x^2+\sqrt2x+1}{x^2-\sqrt2x+1}\right| + \frac1{2\sqrt2}\left[\arctan(\sqrt2x+1)+\arctan(\sqrt2x-1)\right] + C. $$

Step 2 · General factorization

The roots of $x^{2n}=-1$ are $x_k=e^{i\pi(2k+1)/(2n)}$ for $k=0,\ldots,2n-1$, forming $n$ conjugate pairs. Each pair contributes a real quadratic factor:

$$ 1+x^{2n} = \prod_{k=0}^{n-1}\left[x^2-2x\cos\theta_k+1\right], \qquad \theta_k=\frac{(2k+1)\pi}{2n}. $$

Step 3 · Partial fractions and integration

Writing $\dfrac1{1+x^{2n}}=\displaystyle\sum_{k=0}^{n-1}\dfrac{A_kx+B_k}{x^2-2x\cos\theta_k+1}$, each term is integrated by completing the square, $x^2-2x\cos\theta_k+1=(x-\cos\theta_k)^2+\sin^2\theta_k$:

$$ \int\frac{A_kx+B_k}{(x-\cos\theta_k)^2+\sin^2\theta_k}\,dx = \frac{A_k}2\ln\left|x^2-2x\cos\theta_k+1\right| + \frac{B_k+A_k\cos\theta_k}{\sin\theta_k}\arctan\left(\frac{x-\cos\theta_k}{\sin\theta_k}\right). $$


Summary Table

$n$ Result
$1$$\arctan x$
$2$Sum of one log and two arctangent terms (shown above)
generalSum of $n$ log/arctan pairs, one per quadratic factor

Additional Notes

Result

The general solution is:

$$ I = \sum_{k=0}^{n-1}\left[\frac{A_k}2\ln\left|x^2-2x\cos\theta_k+1\right| + \frac{B_k+A_k\cos\theta_k}{\sin\theta_k}\arctan\left(\frac{x-\cos\theta_k}{\sin\theta_k}\right)\right] + C, $$

where $\theta_k=\dfrac{(2k+1)\pi}{2n}$ and $A_k,B_k$ come from the partial-fraction decomposition for the specific $n$.