Home » Blog » Evaluate the integral of 1 / (x4 + 1)

Evaluate the integral of 1 / (x4 + 1)

Compute the following integral.

    \[ \frac{dx}{x^4+1}. \]


First, we need to rewrite the denominator as a product of linear and quadratic terms so that we can use partial fraction decomposition. To that end, we have

    \[ x^4 + 1 = (x^2 - \sqrt{2} \, x + 1)(x^2 + \sqrt{2} \, x + 1). \]

Then we write,

    \[ \frac{1}{x^4+1} = \frac{Ax+B}{x^2-\sqrt{2} \, x +1} + \frac{Cx+D}{x^2 + \sqrt{2}\, x + 1}. \]

This gives us the equation

    \[ (Ax+B)(x^2+\sqrt{2} \, x + 1) + (Cx+D)(x^2 - \sqrt{2} \, x + 1) = 1. \]

Here we multiply everything out and equate like powers of x. Multiplying out, and grouping like powers of x give us,

    \[ (A+C) x^3 + (A\sqrt{2}+B-C\sqrt{2}+D) x^2 + (A+B\sqrt{2}+C-D\sqrt{2}) x + (B+D) = 1. \]

From this we have the system of equations

    \begin{align*}  A+C &= 0 \\ A\sqrt{2} + B - C \sqrt{2} + D &= 0 \\ A+B \sqrt{2} + C - D \sqrt{2} &= 0 \\ B+D &= 1. \end{align*}

Solving this system (sorry, I’m omitting the details of solving the system… there’s nothing tricky in it, but it’s tedious to TeX up into the blog) we obtain

    \[ A = -\frac{1}{2\sqrt{2}}, \quad B = \frac{1}{2}, \quad C = \frac{1}{2\sqrt{2}}, \quad D = \frac{1}{2}. \]

Therefore, we have

    \begin{align*}  \int \frac{dx}{x^4+1} &= \int \left( \frac{Ax+B}{x^2-\sqrt{2} \, x +1} + \frac{Cx+D}{x^2+\sqrt{2}\,x+1} \right) \, dx \\[10pt]  &= \frac{1}{4\sqrt{2}} \left(- \int \frac{2x-\sqrt{2} \, dx}{x^2-\sqrt{2} \, x +1} + \int \frac{\sqrt{2} \, dx}{x^2-\sqrt{2}\, x+1} \right. \\ &\qquad \qquad \left.+ \int \frac{2x+\sqrt{2} \, dx}{x^2+\sqrt{2} \, x + 1} + \int \frac{\sqrt{2} \, dx}{x^2+\sqrt{2} \, x + 1}\right)\\[10pt]  &= \frac{1}{4\sqrt{2}} \left( \log \left| x^2 + \sqrt{2} \, x + 1\right| - \log \left| x^2 - \sqrt{2} \, x + 1 \right| \right) \\  & \qquad \qquad  + \frac{1}{4} \int \frac{dx}{x^2+\sqrt{2} \, x + 1} + \frac{1}{4} \int \frac{dx}{x^2 -\sqrt{2} \, x + 1} \\[10pt]  &= \frac{1}{4\sqrt{2}} \log \left| \frac{x^2+\sqrt{2} \, x+1}{x^2-\sqrt{2} \, x +1} \right| + \frac{1}{4} \int \frac{dx}{\left(x+\frac{\sqrt{2}}{2}\right)^2 + \frac{1}{2}} + \frac{1}{4} \int \frac{dx}{\left(x-\frac{\sqrt{2}}{2}\right)^2+\frac{1}{2}} \\[10pt]  &= \frac{1}{4\sqrt{2}} \log \left| \frac{x^2+\sqrt{2} \, x+1}{x^2-\sqrt{2} \, x +1} \right| + \frac{1}{2} \int \frac{dx}{(\sqrt{2}\, x+1)^2 +1} + \frac{1}{2} \int \frac{dx}{(\sqrt{2}\, x -1)^2 +1} \\[10pt]  &= \frac{1}{4\sqrt{2}} \log \left| \frac{x^2+\sqrt{2} \, x+1}{x^2-\sqrt{2} \, x +1} \right| + \frac{1}{2\sqrt{2}} \int \frac{\sqrt{2} \, dx}{(\sqrt{2} \, x + 1)^2 + 1} + \frac{1}{2 \sqrt{2}} \int \frac{\sqrt{2} \, dx}{(\sqrt{2} \, x - 1)^2 + 1} \\[10pt]  &= \frac{1}{4\sqrt{2}} \log \left| \frac{x^2+\sqrt{2} \, x+1}{x^2-\sqrt{2} \, x +1} \right| + \frac{1}{2 \sqrt{2}} \left( \arctan (\sqrt{2} \, x + 1) + \arctan (\sqrt{2} \, x - 1) \right) + C. \end{align*}

Now, we want to simplify the \arctan expressions (to get our answer to match the answer Apostol provided in the back of the book). So, we use the identity

    \[ \arctan (x) + \arctan (y) = \arctan \left( \frac{x + y}{1 - xy} \right). \]

Therefore,

    \begin{align*} \arctan (\sqrt{2} \, x + 1) + \arctan (\sqrt{2} \, x - 1) &= \arctan \left( \frac{\sqrt{2} \, x + 1 + \sqrt{2} \, x - 1}{1 - (\sqrt{2}\ , x +1)(\sqrt{2} \, x - 1)} \right)\\  &= \arctan \left( \frac{2\sqrt{2} \, x}{2-2x^2} \right) \\  &= \arctan \left( \frac{\sqrt{2} \, x}{1-x^2} \right). \end{align*}

Finally, putting this back into the formula we obtained above, we have

    \[ \int \frac{dx}{x^4 + 1} = \frac{1}{4\sqrt{2}} \log \left| \frac{x^2+\sqrt{2} \, x+1}{x^2-\sqrt{2} \, x +1} \right| + \frac{1}{2\sqrt{2}} \arctan \left( \frac{\sqrt{2} \, x}{1-x^2} \right) + C. \]

One comment

  1. Victor Kamat says:

    Here is shorter evaluation of the integral
    I = integral 1/(1+x^4) dx
    = 1/2 * 2/(1+x^4) dx
    = 1/2 *( x^2 + 1 – (x^2-1))/(1+x^4) dx
    = 1/2 ( (x^2+1)/(x^4+1) – (x^2-1)/(1+x^4) dx

    Let I1 and I2 be the two integrals on the right

    I1 = int (x^2+1)/( x^4+1) dx
    = ( 1+1/x^2)/( x^2 + 1/x^2 ) dx
    = ( 1 + 1/x^2)/( (x-1/x)^2 + 2) dx

    let u = x – 1/x
    du = (1 + 1/x^2)dx

    I1 = du/( u^2 + 2)
    = arctan(u/sqrt(2)) / sqrt(2)
    = arctan( (x-1/x)/sqrt(2))/sqrt(2)

    I2 = int (x^2-1)/( x^4+1) dx
    = ( 1-1/x^2)/( x^2 + 1/x^2 ) dx
    = ( 1 + 1/x^2)/( (x+1/x)^2 – 2) dx

    let u = x + 1/x
    du = (1 – 1/x^2)dx

    I2 = du/( u^2 – 2)
    = arctanh(u/sqrt(2)) / sqrt(2)
    = -arctanh( (x+1/x)/sqrt(2))/sqrt(2)

    I = 1/2*( arctan( (x-1/x)/sqrt(2))/sqrt(2) + arctanh( (x+1/x)/sqrt(2))/sqrt(2))

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):