<s>[INST] Integral Of $\frac{x^4+2x+4}{x^4-1}$ Any ideas how to solve it? 
$$\int\frac{x^4+2x+4}{x^4-1}dx$$
Thanks!
 [/INST] Using 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{C}{x^2 + 1}\right)\,dx$$
And then the integration is pretty straightforward.
</s>