`f'(x) = (x^2 - 1)/x, f(1) = 1/2, f(-1) = 0` Find `f`.

Expert Answers
sciencesolve eNotes educator| Certified Educator

You need to evaluate the antiderivative of the function f'(x), such that:

`int f'(x)dx = f(x) + c`

`int (x^2-1)/x dx = int x^2/x dx - int 1/x dx`

`int (x^2-1)/x dx = int x dx - int 1/x dx`

`int (x^2-1)/x dx = x^2/2 - ln|x| + c`

`Hence, f(x) = x^2/2 - ln|x| + c.`

The function is indeterminate, because of the constant c, but the problem provides the information that `f(1) = 1/2` and f(-1) = 0, hence, you may evaluate the constant c, such that:

`f(1) = 1/2 - ln 1 + c => 1/2 = 1/2 - 0 + c => c = 0`

`f(-1) = 1/2 - ln 1 + c => 0 = 1/2 - 0 + c => c = 1/2`

Hence, evaluating the function yields `f(x) = x^2/2 - ln|x|` for `x >= 1` and  `f(x) = x^2/2 - ln|x| + 1/2` , for `x <= -1.`