<s>[INST] What is the method for finding $\int\frac {x^3 + 5x^2 +2x -4}{(x^4-1)}\mathrm{d}x$? $$
\int\frac {x^3 + 5x^2 +2x -4}{(x^4-1)}dx
$$
A bit confused with how to integrate this question. I though it was partial fractions but was unsure about the what to do after that.
 [/INST] The integral can be written as
$$I=\frac{1}{4}\int\frac{4x^3}{x^4-1}+5\int\frac{x^2}{(x^2-1)(x^2+1)}+\int\frac{2x}{(x^2-1)(x^2+1)}-4\int\frac{dx}{(x^2-1)(x^2+1)}=I_1+I_2+I_3+I_4$$
$$I_1=\frac{1}{4}ln|x^4-1|+C$$
$$I_2=\frac{5}{2}\int\frac{1}{x^2-1}+\int\frac{1}{x^2+1}$$
$$I_3=\int\frac{dt}{(t-1)(t+1)}$$ where $t=x^2$
$$I_4=-2\int\frac{1}{x^2-1}-2\int\frac{1}{x^2+1}$$
</s>