Integral of log|x| or log(absolute value of x)

The indefinite integral of $\log|x|$ is given by:

$$\int \log|x| dx = x\log|x| - \int x\frac{1}{x} dx$$

Using the rule $\int u dv = uv - \int vdu$, we can rewrite the integral as:

$$\int \log|x| dx = x\log|x| - \int \frac{x}{x} \log|x| dx$$

Therefore:

$$\int \log|x| dx = x\log|x| - \int \log|x| dx + C$$

Solving for the integral:

$$\int \log|x| dx = \frac{x\log|x|}{2} + C$$

Comments