# How do you integrate (4x)/(x^4 +1)  using partial fractions?

Factor the denominator as follows

x^4+1=x^4+1+2x^2-2x^2= (x^2+1)^2-2x^2=(x^2+sqrt2*x+1)*(x^2-sqrt2*x+1)

Hence we need to find constants A,B,C,D such as

$\frac{4 x}{{x}^{4} + 1} = \frac{A \cdot x + B}{{x}^{2} + \sqrt{2} \cdot x + 1} + \frac{C \cdot x + D}{{x}^{2} - \sqrt{2} \cdot x + 1}$

Giving four values to the variable $x$ such as $x = \left\{0 , 1 , - 1 , 2\right\}$

we form as a system with four equations and four variables A,B,C,D

solving this system we get the values of A,B,C,D

Finally we have that

$\frac{4 x}{{x}^{4} + 1} = - \frac{\sqrt{2}}{{x}^{2} + \sqrt{2} x + 1} - \frac{\sqrt{2}}{- {x}^{2} + \sqrt{2} x - 1}$

Hence now we have to calculate the integral

$\int \frac{4 x}{{x}^{4} + 1} \mathrm{dx} = \int - \frac{\sqrt{2}}{{x}^{2} + \sqrt{2} x + 1} \mathrm{dx} - \int \frac{\sqrt{2}}{- {x}^{2} + \sqrt{2} x - 1} \mathrm{dx}$

To calclate each of the integrals in the right side we need to bring them in the form of $1 + {\left[f \left(x\right)\right]}^{2}$ that is then integrable as arctangent.

After some calculations we have that

x² +sqrt2*x +1 =(1/2) { {sqrt2 [x + (1/sqrt2)]}² + 1}

and similarly

x² -sqrt2*x +1 =(1/2) { {sqrt2 [x - (1/sqrt2)]}² + 1}

Now remember that

int {d[f(x)]} / {[f(x)]²+ 1} dx= arctan[f(x)] + c

Thus in conclusion

int [(4x )/ (x⁴+1)] dx = - 2arctan[sqrt2*x + sqrt2(1/sqrt2)] + 2arctan[sqrt2x - sqrt2(1/sqrt2)] + c = - 2arctan(sqrt2*x + 1) + 2arctan(sqrt2*x - 1) + c