can someone help me find the antiderivative of:

f'(x) = (x^2-1)/x where f(1)=1/2, and f(-1) = 0

Thanks!

f'(x) = x - 1/x

Integrate one term at a time.
f(x) = x^2/2 - ln x + C

If f(1) = 1/2, then C = 0
(for x>0 only)

I'm not sure how to handle the f(-1) = 0 case. You can't take a log of a negative number.