# Compute $\int\frac {x^2}{x^4+1}dx$ via partial fractions

I am trying to solve it with "partial fractions"

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

and I get the following system of equations:

$$A+C=0$$

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

$$A-\sqrt{2}B+C+\sqrt{2}D=0$$

$$B+D=0$$

How can I find $$A,B,C,D$$?

• It's a pretty standard system of linear equations, you could use, for example en.wikipedia.org/wiki/Gaussian_elimination Apr 8, 2020 at 10:05
• @MattiP. Is it possible to solve every system of equations with Gaussian elimination method? I am not familiar with solving system of equations Apr 8, 2020 at 10:08
• How did you get $A+C=1$? Multiplying both sides by $x$ and then taking $x\to \infty$, you obtain $A+C=0$. Apr 8, 2020 at 10:10
• @Soheil Every linear system of equations, yes. Apr 8, 2020 at 10:10
• @WETutorialSchool thanks it is typo i fixed Apr 8, 2020 at 10:11

Observe that the integrand is an even fraction, so it is invariant when we change $$x$$ to $$-x$$: $$\frac{Ax+B}{(x^2+x\sqrt{2}+1)}+\frac{Cx+D}{(x^2-x\sqrt{2}+1)}=\frac{-Ax+B}{(x^2-x\sqrt{2}+1)}+\frac{-Cx+D}{(x^2+x\sqrt{2}+1)}.$$ This implies that $$\;C=-A,\; D=B$$, and you have only a linear system in two unknowns.

• Nice trick :) ${}$ Apr 8, 2020 at 10:30

From $$A+C=0$$ and $$A-B\sqrt2+C+D\sqrt2=0$$ we have $$-B\sqrt2+D\sqrt2=0$$ which with $$B+D=0$$, gives $$B=D=0$$.

Now from $$A+C=0$$ and $$-A\sqrt2+B+C\sqrt2+D=1$$, noting that $$B=D=0$$, we have $$A=-C\implies C\sqrt2+C\sqrt{2}=1\implies C=\frac{1}{2\sqrt2}$$ and $$A=-\frac{1}{2\sqrt2}$$

You can solve the (easy) $$4\times4$$ system of linear equations, but notice that

$$(x^2+\sqrt2 x+1)-(x^2-\sqrt2 x+1)=2\sqrt2x$$ so that

$$\frac x{2\sqrt2}\frac{(x^2+\sqrt2 x+1)-(x^2-\sqrt2 x+1)}{(x^2+\sqrt2 x+1)(x^2-\sqrt2 x+1)}$$ does the trick.

Notice that this will work for any positive power of $$x$$ at the numerator, hence any polynomial. Anyway, the constant term requires an extra twist:

$$(x^2+\sqrt2 x+1)+(x^2-\sqrt2 x+1)=2x^2+2,$$ from which you can cancel out $$2x^2$$.