Problem 239
Hard Roots and Binomials

Evaluate the integral: I = integral dx/(x^4+1)

Evaluate the integral: $$ I = \int \frac{dx}{x^4+1}. $$

Explanation of Method

Factoring $x^4+1$ into two irreducible quadratics and decomposing into partial fractions splits the integral into a logarithm and two arctangent terms, each resolved by completing the square.

  1. Factor $x^4+1=(x^2+\sqrt2x+1)(x^2-\sqrt2x+1)$.
  2. Decompose into partial fractions.
  3. Integrate each quadratic-denominator piece.
  4. Combine into a single closed form.

Step 1 · Factor and set up partial fractions

$$ x^4+1 = \left(x^2+\sqrt2x+1\right)\left(x^2-\sqrt2x+1\right). $$

Assume $\dfrac{1}{x^4+1} = \dfrac{Ax+B}{x^2+\sqrt2x+1}+\dfrac{Cx+D}{x^2-\sqrt2x+1}$. Multiplying out and matching coefficients gives $A=\tfrac{\sqrt2}4$, $B=\tfrac12$, $C=-\tfrac{\sqrt2}4$, $D=\tfrac12$.

Step 2 · Integrate the first quadratic piece

Since $\dfrac{d}{dx}(x^2+\sqrt2x+1)=2x+\sqrt2$, write $\tfrac{\sqrt2}4x+\tfrac12 = \tfrac{\sqrt2}8(2x+\sqrt2)+\tfrac14$:

$$ \int \frac{\frac{\sqrt2}4x+\frac12}{x^2+\sqrt2x+1}\,dx = \frac{\sqrt2}8\ln\left(x^2+\sqrt2x+1\right) + \frac{\sqrt2}4\arctan\left(\sqrt2x+1\right), $$

using $x^2+\sqrt2x+1=(x+\tfrac{\sqrt2}2)^2+\tfrac12$ for the arctangent term.

Step 3 · Integrate the second quadratic piece

By the same method with $x^2-\sqrt2x+1$:

$$ \int \frac{-\frac{\sqrt2}4x+\frac12}{x^2-\sqrt2x+1}\,dx = -\frac{\sqrt2}8\ln\left(x^2-\sqrt2x+1\right) + \frac{\sqrt2}4\arctan\left(\sqrt2x-1\right). $$

Step 4 · Combine

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

Using the arctangent addition identity $\arctan a+\arctan b=\arctan\!\left(\dfrac{a+b}{1-ab}\right)$ (up to an additive multiple of $\pi$, absorbed into $C$), with $a=\sqrt2x+1$, $b=\sqrt2x-1$:

$$ \arctan(\sqrt2x+1)+\arctan(\sqrt2x-1) = \arctan\left(\frac{\sqrt2x}{1-x^2}\right) + C_0, $$

giving the compact equivalent form:

$$ I = \frac{1}{4\sqrt2}\ln\left(\frac{x^2+\sqrt2x+1}{x^2-\sqrt2x+1}\right) + \frac{1}{2\sqrt2}\arctan\left(\frac{\sqrt2x}{1-x^2}\right) + C. $$


Summary Table

Quantity Value
Partial fraction constants$A=\sqrt2/4,\,B=1/2,\,C=-\sqrt2/4,\,D=1/2$
Log coefficient$1/(4\sqrt2)$
Arctangent coefficient$1/(2\sqrt2)$

Additional Notes

Result

The solution to the integral is:

$$ I = \frac{1}{4\sqrt2}\ln\left(\frac{x^2+\sqrt2x+1}{x^2-\sqrt2x+1}\right) + \frac{1}{2\sqrt2}\arctan\left(\frac{\sqrt2x}{1-x^2}\right) + C. $$