# Integral problem

1. Jan 8, 2012

### Jalo

1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

Ive solved it this way:
= [ln |x|]1-2 = ln 1 - ln 2 = -ln2

However the solutions say the integral is divergent, therefore it should tend to +∞ or -∞

If someone could tell me what I've done wrong I'd appreciate!
Thanks

2. Jan 8, 2012

### D H

Staff Emeritus
You did two things wrong.

1. Lesser problem: Your integral is incorrect. $\int 1/|x|\,dx = \mathop{\mathrm{sgn}} x \, \ln |x|$, not $\ln |x|$.

2. Huge problem: You integrated across a singularity.

f(x)=1/|x| is positive everywhere. How could the integral of this function from -2 to 1 possibly be negative? That you obtained a negative result when the integrand is always positive and the integration interval is in the positive direction should have been a big warning sign indicating that you did something wrong.