Hacker News new | ask | show | jobs
The antiderivative of 1/x is ln(x), not ln |x (blog.danielh.cc)
2 points by max__dev 259 days ago
1 comments

Sir what you wrote down is equivalent to integral 1/x = ln|x| if x > 0 else ln|x| + pi*i
1/x = ln|x| + C if x > 0

ln|x| + pi*i + C or ln|x| - pi*i + C or is x < 0 (Protip: Choose C=-+pi*i)

In reals ln|x| is fine.

In complex, it's a mess https://en.wikipedia.org/wiki/Complex_logarithm