Integral of $\int \frac{x^4+2x+4}{x^4-1}dx$ I am trying to solve this integral and I need your suggestions.
$$\int \frac{x^4+2x+4}{x^4-1}dx$$
Thanks
 A: welcome to math.stackexchange this question were answered already.
Here is the link
use polynomial division, we get $$\int \frac{x^4+2x+4}{x^4-1} dx = \int 1 + \frac{2x+5}{(x^2 - 1)(x^2 + 1)}dx
 = \int 1 + \frac{2x+5}{(x+1)(x-1)(x^2+1)} dx  $$ 
Expressing this as partial fractions, we need only find $A, B, C$
$$=  \int \left(1 + \frac{A}{x+1} + \frac B{x-1} +\frac{CX+D}{x^2 + 1}\right)\,dx$$
A: Note that this problems cries out for partial fraction decomposition, for which you'll want to factor you denominator: it factors nicely as the difference of squares:
$$(x^4 - 1) = (x^2 + 1)(x^2 - 1) = (x^2 + 1)(x +1)(x-1)$$
See also Paul's Online Notes: Partial Fractions for more insight into using this technique for integration, and some nicely worked out examples.
A: HINT:
Using Partial Fraction Decomposition  formula, 
$$\frac{x^4+2x+4}{x^4-1}=1+\frac{ax+b}{x^2+1}+\frac c{x+1}+\frac d{x-1}$$ where $a,b,c,d$ are arbitrary constants to determined by equating the coefficients of the different powers of $x$ in
$$x^4+2x+4=x^4-1+(x^2-1)(ax+b)+c(x-1)(x^2+1)+d(x+1)(x^2+1)$$
A: Welcome to Math Stack Exchange!
With lab bhattacharjee's helpful hint for the integral, we can rewrite the expression as:
$$\int \left(1 + \frac{(-2x - 5)}{2(x^2 + 1)} + \frac{7}{4(x - 1)} - \frac{3}{4(x + 1)}\right)dx$$
$$= \int 1 dx + \int \frac{(-2x - 5)}{2(x^2 + 1)} dx + \int \frac{7}{4(x - 1)} dx - \int \frac{3}{4(x + 1)} dx$$
$$= \int 1 dx - \int \frac{2x}{2(x^2 + 1)} dx - \int \frac{5}{2(x^2 + 1)} + \int \frac{7}{4(x - 1)} dx - \int \frac{3}{4(x + 1)} dx$$
$$= \int 1 dx - \int \frac{x}{x^2 + 1} dx - \frac{5}{2} \int \frac{1}{x^2 + 1} dx + \frac{7}{4} \int \frac{1}{x - 1} dx - \frac{3}{4} \int \frac{1}{x + 1} dx$$
Next steps should be "direct-cut", meaning that it's really possible to work out the computation one way! :D


*

*For the first integrand, use power rule to obtain $x$.

*For the second integrand, let $u = x^2 + 1 \rightarrow du = 2x dx$.

*For the third integrand, you get $\arctan(x)$.  You can find the special integral here.

*For the fourth integrand, let $v = x - 1 \rightarrow dv = dx$.

*For the fifth integrand, let $w = x + 1 \rightarrow dw = dx$.


So we are left off with:
$$x - \frac{5}{2}arctan(x) - \frac{1}{2} \int \frac{du}{u} + \frac{7}{4} \int \frac{dv}{v} - \frac{3}{4}  \int \frac{dw}{w}$$
Finally, the expression becomes...
$$x - \frac{5}{2}arctan(x) - \frac{ln(u)}{2} + \frac{7ln(v)}{4} - \frac{3ln(w)}{4} + K \text{ where } K \text{ is an arbitrary constant}$$
$$= x - \frac{5}{2}arctan(x) - \frac{ln(x^2 + 1)}{2} + \frac{7ln(x - 1)}{4} - \frac{3ln(x + 1)}{4} + K$$
The solution for the integral is equivalent to the one in Wolfram Alpha.
