TITLE: Is $e^{\int \frac {1}{x}dx}$ equal to $x$ or $|x|$?
QUESTION [7 upvotes]: I encountered this expression quite a lot of times as a part of the integrating factor while solving linear differential equations.
$$e^{\int \frac {1}{x}dx}$$
For sometime, I wrote it as $x$, and was satisfied as even the answer given in my textbook had $x$ instead of $|x|$. But after realising the possibility to be $|x|$, I am confused.
What should be the answer, and why?
Edit: (My reasoning)
$\int \frac {1}{X} dx = log |x|$ and $e^{logt} = t$ if I'm not wrong. So in this case, $t = |x|$ so the answer should be $|x|$.
What is wrong with this reasoning? And could you please provide a mathematical proof if the answer should be $x$?
Edit 2: 
Wolfram Alpha evaluates e^(∫(1/x)dx) to $x$

REPLY [2 votes]: The general antiderivative is as described in the answer by Mike Earnest.
But in the context of ODEs, where you're going to multiply both sides of the equation by the integrating factor, you can just multiply by $x$ instead of $|x|$, since if $x<0$ the only thing that would be different is a factor of $-1$ one both sides, which doesn't make any difference as far as the ODE is concernced. (And for the same reason, you don't gain any generality by multiplying by the most general antiderivative $C_{1,2}|x|$.)