f''(x) = (3x^3 - 5x^2 + 1) / x^2; and f(1) = 0, f(-1) = 1.

So i turn f''(x) into (3x^3 - 5x^2 + 1)(x^-2) and multiply to get f''(x) = 3x - 5 + x^-2

So f'(x) = (3/2)x^2 - 5x - (1/x) + c

And f(x) = (1/2)x^3 - (5/2)x^2 - ln(x) + cx + d

Not really sure what to do from here, and when plugging in -1 to ln(x) I encounter a problem. Thanks for any help

The math looks odd, but the answer is correct as far as you go.

Now go back to your boundary conditions, f(1) and f(-1)

I think you better change ln(x) to ln|x| while you're at it, or ln(-1) is not defined.

0 = 1/2 - 5/2 - 0 + c + d
1 = (-1/2) - 5/2 - 0 - c + d

c = -1, d=3, so

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