# Integral of 1/x

How to solve the given integral by using the integral of 1/x: formula, 1 example, and its solution.

## Formula

Recall that

the derivative of ln |x| is

1/x.

And integral and derivative

are the opposite operations.

So the integral of 1/x is

ln |x| + C.

For an indefinite integral,

there should be +C.

## Example∫ (x^{2} - x + 1)/x dx

Solution

Solution (Detail)

Divide each term of the numerator

by the denominator x.

x^{2}/x = x

-x/x = -1

+1/x = +1/x

The integral of x is [1/2]x^{2}.

Integral of a Polynomial

The integral of -1 is -x.

The integral of +1/x is +ln |x|.

The given integral is an indefinite integral.

So write +C.

So

[1/2]x^{2} - x + ln |x| + C

is the answer.