Problem 278 · General formula
Medium Partial Fractions

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

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

Explanation of Method

The method depends on how $n$ compares to $2k$. The cleanest case is $n=2k-1$, where the numerator is exactly (a multiple of) the derivative of the denominator, giving a single logarithm. Other odd $n$ reduce via $u=x^2$; even $n$ generally require full partial fractions; and $n\geq2k$ requires polynomial division first.

  1. Handle the special case $n=2k-1$.
  2. Reduce other odd $n$ via $u=x^2$.
  3. Divide first when $n\geq2k$.
  4. Verify against worked examples.

Step 1 · The clean case $n=2k-1$

Since $\dfrac{d}{dx}\left(1+x^{2k}\right)=2kx^{2k-1}$:

$$ \int\frac{x^{2k-1}}{1+x^{2k}}\,dx = \frac1{2k}\ln\left(1+x^{2k}\right) + C. $$

Step 2 · Odd $n=2m+1<2k-1$

Substituting $u=x^2$, $du=2x\,dx$:

$$ \int\frac{x^{2m+1}}{1+x^{2k}}\,dx = \frac12\int\frac{u^m}{1+u^k}\,du, $$

which reduces the exponents but generally still needs partial fractions unless $m=k-1$ (the case from Step 1 in disguise).

Step 3 · Even $n$, and $n\geq2k$

For even $n<2k$, no derivative-matching shortcut exists in general, and the integral is evaluated via the full partial fraction decomposition of $1/(1+x^{2k})$ from Problem 276, multiplied by $x^n$. For $n\geq2k$, polynomial long division first writes $x^n=(1+x^{2k})Q(x)+R(x)$ with $\deg R<2k$, reducing to $\int Q(x)\,dx$ (a polynomial) plus a proper-fraction integral handled by the same cases.

Step 4 · Worked examples (all verified by differentiation)

$$ \int\frac{x\,dx}{1+x^2}=\frac12\ln(1+x^2)+C, \qquad \int\frac{dx}{1+x^2}=\arctan x+C, $$

$$ \int\frac{x^2\,dx}{1+x^2}=x-\arctan x+C, \qquad \int\frac{x^3\,dx}{1+x^4}=\frac14\ln(1+x^4)+C, $$

$$ \int\frac{x^3\,dx}{1+x^2}=\int\left(x-\frac{x}{1+x^2}\right)dx=\frac{x^2}2-\frac12\ln(1+x^2)+C. $$


Summary Table

Case Method
$n=2k-1$Direct log via derivative match
$n$ odd, $n<2k-1$Substitute $u=x^2$, then reduce
$n$ even, $n<2k$Full partial fractions of $1/(1+x^{2k})$
$n\geq2k$Polynomial division first

Additional Notes

Result

The solution depends on the case:

$$ \int\frac{x^n}{1+x^{2k}}\,dx = \begin{cases} \dfrac1{2k}\ln\left(1+x^{2k}\right)+C & n=2k-1 \\[2mm] \text{polynomial} + \text{(reduced-case integral)} & n\geq2k \\[2mm] \text{log/arctan combination from partial fractions} & n<2k-1 \end{cases} $$