We notice that the degree of the numerator is higher than the degree of the denominator, so we'll perform the long division.

x^5+2 = (x^2 - 1)(x^3 + x) + x + 2

We'll divide by x^2 - 1:

(x^5+2)/(x^2 - 1) = x^3 + x + ( x + 2)/(x^2 - 1)

We'll integrate both sides:

Int (x^5+2)dx/(x^2 - 1) = Int x^3dx + Int xdx + Int( x + 2)dx/(x^2 - 1)

We'll calculate Int( x + 2)dx/(x^2 - 1).

We'll decompose the fraction ( x + 2)/(x^2 - 1) into elementary fractions:

( x + 2)/(x^2 - 1) = ( x + 2)/( x- 1)(x+1)

( x + 2)/( x- 1)(x+1) = A/(x-1) + B/(x+1)

x + 2 = Ax + A + Bx - B

x + 2 = x(A + B) + A - B

A+B = 1 (1)

A-B=2 (2)

We'll add (1) and (2):

2A =3

A = 3/2

B = -1/2

Int( x + 2)dx/(x^2 - 1) = (3/2)Int dx/(x-1) - (1/2)Int dx/(x+1)

Int( x + 2)dx/(x^2 - 1) = (3/2)ln|x-1| - (1/2)ln|x+1|

**Int (x^5+2)dx/(x^2 - 1) = x^4/4 + x^2/2 + (3/2)ln|x-1| - (1/2)ln|x+1| + C**