6

I am trying to evaluate the integral

$$\int \frac{1}{1+x^4} \mathrm dx.$$

The integrand $\frac{1}{1+x^4}$ is a rational function (quotient of two polynomials), so I could solve the integral if I can find the partial fraction of $\frac{1}{1+x^4}$. But I failed to factorize $1+x^4$.

Any other methods are also wellcome.

Harry Peter
  • 7,819
kalpeshmpopat
  • 3,270
  • 4
  • 28
  • 42

4 Answers4

25

Without using fractional decomposition: $$\begin{align}\int\dfrac{1}{x^4+1}~dx&=\dfrac{1}{2}\int\dfrac{2}{x^4+1}~dx \\&=\dfrac{1}{2}\int\dfrac{(x^2+1)-(x^2-1)}{x^4+1}~dx \\&=\dfrac{1}{2}\int\dfrac{x^2+1}{x^4+1}~dx-\dfrac{1}{2}\int\dfrac{x^2-1}{x^4+1}~dx \\&=\dfrac{1}{2}\int\dfrac{1+\dfrac{1}{x^2}}{x^2+\dfrac{1}{x^2}}~dx-\dfrac{1}{2}\int\dfrac{1-\dfrac{1}{x^2}}{x^2+\dfrac{1}{x^2}}~dx \\&=\dfrac{1}{2}\left(\int\dfrac{1+\dfrac{1}{x^2}}{\left(x-\dfrac{1}{x}\right)^2+2}~dx-\int\dfrac{1-\dfrac{1}{x^2}}{\left(x+\dfrac{1}{x}\right)^2-2}~dx\right) \\&=\dfrac{1}{2}\left(\int\dfrac{d\left(x-\dfrac{1}{x}\right)}{\left(x-\dfrac{1}{x}\right)^2+2}-\int\dfrac{d\left(x+\dfrac{1}{x}\right)}{\left(x+\dfrac{1}{x}\right)^2-2}\right)\end{align}$$

So, finally solution is $$\int\dfrac{1}{x^4+1}~dx=\dfrac{1}{4\sqrt2}\left(2\arctan\left(\dfrac{x^2-1}{\sqrt2x}\right)+\log\left(\dfrac{x^2+\sqrt2x+1}{x^2-\sqrt2x+1}\right)\right)+C$$

Harry Peter
  • 7,819
Cortizol
  • 3,669
11

Hint:
$$x^4+1=(x^2-\sqrt{2}x+1)(x^2+\sqrt{2}x+1) \tag{1}$$ You can integrate using partial fraction decomposition. Since $$x^4+1=(x^2-\sqrt{2}x+1)(x^2+\sqrt{2}x+1),$$ then $$\frac{1}{x^4+1}=\frac{Ax+B}{x^2-\sqrt{2}x+1}+\frac{Cx+D}{x^2+\sqrt{2}x+1}=\frac{(Ax+B)(x^2+\sqrt{2}x+1)+(Cx+D)(x^2-\sqrt{2}x+1)}{(x^2-\sqrt{2}x+1)(x^2+\sqrt{2}x+1)} = \\ = \frac{x^3(A+C)+x^2(A\sqrt{2}+B+D-C\sqrt{2})+x(B\sqrt{2}-D\sqrt{2})+B+D}{(x^2-\sqrt{2}x+1)(x^2+\sqrt{2}x+1)}$$ $$\begin{cases} A+C=0;\\ B+D+\sqrt{2}(A-C)=0; \\ B-D=0; \\ B+D=1. \end{cases}$$

$$ A=-C=-\frac{1}{2\sqrt{2}}; \\ B=D=\frac{1}{2}$$

$$ \frac{1}{x^4+1}=\frac{1}{2\sqrt{2}}\left(\dfrac{-x+\sqrt{2}}{x^2-\sqrt{2}x+1}+ \dfrac{x+\sqrt{2}}{x^2+\sqrt{2}x+1} \right). $$

Added
Decomposition (1) can be done using one of the following ways:

  1. Completion to the full square $$x^4+1=x^4 +2x^2+1 -2x^2=(x^2+1)^2-\left(\sqrt{2}x\right)^2 = \\ =\big(x^2-\sqrt{2}x +1 \big)\big( x^2+\sqrt{2}x +1 \big).$$

  2. Let $\omega_i, \ i\in\{1,\, 2,\,3,\,4\} $ are roots of the equation $x^4+1=0$ over $\mathbb{C}:$ $\omega_1=\frac{\sqrt{2}}{2}(1-i), \ \omega_2=\frac{\sqrt{2}}{2}(1+i) \ \omega_3=\frac{\sqrt{2}}{2}(-1+i), \ \omega_4=\frac{\sqrt{2}}{2}(-1-i). $ Then use the decomposition into prime factors and multiply pairwise complex conjugate: $x^4+1= \left( x-\frac{\sqrt{2}}{2}(1-i) \right)\left( x-\frac{\sqrt{2}}{2}(1+i) \right)\left( x-\frac{\sqrt{2}}{2}(-1+i) \right)\left( x-\frac{\sqrt{2}}{2}(-1-i) \right) = \\ =\big(x^2-\sqrt{2}x +1 \big)\big( x^2+\sqrt{2}x +1 \big).$

M. Strochyk
  • 8,397
  • Its too difficult to calculate yet – kalpeshmpopat Mar 18 '13 at 08:51
  • 4
    He said "FULL ANSWER"! – Amihai Zivan Mar 18 '13 at 09:06
  • Why is that too difficult? Well, you could do $$\int\frac1{x^4+4},dx$$ first using the factorization coming from $$x^4+4=(x^4+4x^2+4)-4x^2=\cdots$$ and then do a linear substitution to get back to your integral. – Jyrki Lahtonen Mar 18 '13 at 09:06
  • 15
    We won't do your homework - we try to teach you to do it yourself. – Jyrki Lahtonen Mar 18 '13 at 09:07
  • @M.Strochyk How did you compute $x^4+1$ to be equal to $(x^2-\sqrt{2}x +1)(x^2+\sqrt{2}x+1)$? Is there a general method for doing that? – HeWhoMustBeNamed Nov 05 '17 at 05:02
  • @Mr Reality: I added decomposition of $x^4+1$ into factors to my answer. – M. Strochyk Nov 05 '17 at 18:08
  • @M.Strochyk thanks for doing that but I think I should have stated myself more clearly - why did you decide to add and subtract $2x^2$ specifically? Why not something else? I mean did you know that you'll be able to factorize the polynomial thus? – HeWhoMustBeNamed Nov 06 '17 at 14:13
  • @MrReality No, there is no general method to factorise a polynomial of > degree 4. The equations for $3,4$ are just impractical. So in summary there is no general way to factorise any polynomial above degree 2. –  Nov 07 '17 at 13:01
  • @A---B, why are the equations for $3,4$ impractical? Do you mean it is Always easier to find some term to add/subtract to the given polynomial for factorizing it (like in the above example)? – HeWhoMustBeNamed Nov 08 '17 at 13:27
  • @MrReality Just take a look at cubic and quartic formula, you'll know what I am talking about. It is not easier to factorise either, try to factorise $x^4 + x + 1 = 0$. –  Nov 08 '17 at 15:04
  • @A---B, wow, that really is cumbersome. But then what about the second part of my question - is it always possible to solve, say, a cubic or a quartic equation by adding & subtracting some term/s to the given polynomial? – HeWhoMustBeNamed Nov 08 '17 at 15:12
  • @MrReality Yes it is always possible but not feasible to factorise any polynomial. Try $x^4 + x + 1= 0$ for instance. –  Nov 08 '17 at 15:16
  • @A---B, I couldn't figure out how to do that. But I think that's because I don't know how we select the term that'd help us to factorize the polynomial- do we try to recall some identitiy or rule or something else? – HeWhoMustBeNamed Nov 08 '17 at 15:29
  • @MrReality No surprise you couldn't figure it out. Wolfram Alpha shows that it is impossible for anyone. I gave that example to show you that it is not feasible to factorise every polynomial but it is certainly possible. –  Nov 08 '17 at 18:08
5

$$I =\int \frac{1}{{x^4+1}} dx$$

If we add and subtract $2x^2$ to $x^4 + 1$, we get: $$\int \frac{1}{{x^4 + 2x^2 + 1 - 2x^2}}$$

We know $x^4 + 2x^2 + 1 = (x^2 + 1)^2$

$$\int \frac{1}{{(x^2 + 1)^2 - 2x^2}}$$

We know $a^2 - b^2 = (a - b)(a + b)$

Hence, $(x^2 + 1)^2 - 2x^2 = (x^2 + 1 - \sqrt{2}x)(x^2 + 1 + \sqrt{2}x)$

$$\int \frac{1}{{(x^2-\sqrt{2}x+1)(x^2+\sqrt{2}x+1)}}$$

Now using partial fraction decomposition:

$$\frac{1}{(x^2-\sqrt{2}x+1)(x^2+\sqrt{2}x+1)} = \frac{Ax + B}{x^2-\sqrt{2}x+1} + \frac{Cx + D}{x^2+\sqrt{2}x+1}$$

After you have found A, B, C and D, its just a basic $\frac{linear}{quadratic}$ type integral.

abiessu
  • 8,115
1

The indefinite integral is a rational fraction and is typically solved using partial fractions decomposition.

You first factor the denominator $x^4+1$, which has four complex roots, the fourth roots of minus one, let $\omega_0$, $\omega_1$, $\omega_2$, and $\omega_3$. Then you decompose

$$\frac1{x^4+1}=\frac a{x-\omega_0}+\frac b{x-\omega_1}+\frac c{x-\omega_2}+\frac d{x-\omega_3}$$

The unknown coefficients are found by multiplying by one of the denominators and taking the limit to the root:

$$a=\lim_{x\to\omega_0}\frac{x-\omega_0}{x^4+1}=\frac1{4\omega_0^3},$$ and similarly for the other terms.

Then, a single term is integrated with a complex logarithm $$\int\frac{dx}{x-\omega}=\ln(x-\omega)=\ln|x-\omega|+i\angle(x-\omega).$$

Here we have $\omega_0=\dfrac{1+i}{\sqrt2}$, hence

$$\ln\sqrt{(x-\frac1{\sqrt2})^2+(\frac1{\sqrt2})^2}-i\arctan\frac{\frac1{\sqrt2}}{x-\frac1{\sqrt2}}\\ =\frac12\ln(x^2-\sqrt2x+1)-i\frac\pi2+i\arctan(\sqrt2x-1).$$

Repeat for the four terms (there is a lot of symmetry) and form the linear combination.