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.
- Factor $x^4+1=(x^2+\sqrt2x+1)(x^2-\sqrt2x+1)$.
- Decompose into partial fractions.
- Integrate each quadratic-denominator piece.
- 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
- Correction: "Solution 1" in the source claimed partial-fraction constants involving $\pi$ (e.g. $B=\pi/\sqrt2$) — this is not possible, since the constants in a partial fraction decomposition of a rational function are themselves rational or algebraic numbers, never transcendental constants like $\pi$; its final answer, a plain log of a linear ratio with no arctangent term at all, also has the wrong functional form for an integral whose denominator factors into two irreducible quadratics. "Solution 2" independently arrived at the correct partial fraction constants and the correct compact closed form (matching the derivation above), and was confirmed correct by direct differentiation.
- The integrand is defined for all real $x$, since $x^4+1>0$ everywhere; the arctangent term has a removable-type jump at $x=\pm1$ (where $1-x^2=0$), typical of the arctangent-addition compact form, but the antiderivative remains valid piecewise on each side.
- The result was verified directly by differentiating $\tfrac1{4\sqrt2}\ln\!\left(\tfrac{x^2+\sqrt2x+1}{x^2-\sqrt2x+1}\right)+\tfrac1{2\sqrt2}\arctan\!\left(\tfrac{\sqrt2x}{1-x^2}\right)$: the log term's derivative simplifies (using $(x^2+\sqrt2x+1)(x^2-\sqrt2x+1)=x^4+1$) to $\tfrac{1-x^2}{2(1+x^4)}$, and the arctangent term's derivative simplifies to $\tfrac{1+x^2}{2(1+x^4)}$; summing gives exactly $\tfrac{1}{1+x^4}$, matching the integrand.
Result
The solution to the integral is: