How to define the antiderivative of a function with singularities? It seems like there are a few ways of describing the antiderivative of a partial real function with singularities. What are the different ways of nailing down more specifically what an antiderivative is so that, for instance, it's possible to pick (101), (102), or (103) definitively as the antiderviatve of $\frac{1}{x}$ ?
A long time ago I learned the antiderivative of the $\frac{1}{x}$, shown below (101).
$$ \int \frac{1}{x} dx = \ln \lvert x \rvert + C \tag{101} $$
I was wondering today what exactly that means and why the indefinite integral isn't something like (102) where each particular solution only defined for positive or negative numbers but not both.
$$ \int \frac{1}{x} dx = \ln(\pm x) + C \tag{102} $$
The Wikipedia article describes another way of parameterizing a family of solutions where the positive and negative portions of the logarithm have independent constants (103). I rewrote it so the whole definition is piecewise instead of just the constant.
$$ \int \frac{1}{x} dx = \begin{cases} \ln(x)\;\;\,+ A \;\;\;\;\text{if $x$ is positive} \\ \ln(-x) + B \;\;\;\;\text{if $x$ is negative} \end{cases} \tag{103} $$
Which of these is right? (103) seems to capture the fact that the two "halves" of a particular solution really are independent better than (101) does. To me, (101) feels more abitrary than either (102) or (103).
Of these possibilities (102) will never present you with spurious faux-counterexamples to the first fundamental theorem of calculus. For example, if we take (102) as the antiderivative of $\frac{1}{x}$ we can't conclude (201) by using the fact that there is no particular solution $F$ that is defined on both 1 and -1 instead of appealing to the fact that no $F$ is continuous on $[-1, 1]$.
$$ \text{BAD:}\;\;\;\; \int_{-1}^{1} \frac{1}{x} = F(1) - F(-1) = 0 \tag{201} $$ 
 A: It's true that $$F(x) := \left\{\begin{array}{cl}\log x + A , & x > 0, \\ \log (-x) + B , & x < 0\end{array}\right.$$
is an antiderivative of $x \mapsto \frac{1}{x}$ for all choices of $A, B$: After all, computing gives $\frac{d}{dx} F(x) = \frac{1}{x}$.
But the greater generality of this family than that of the family $\log |x| + C$ of antiderivatives usually given isn't of much practice relevance. As you hint, when computing a definite integral $\int_a^b f \,dx$ using the Fundamental Theorem of Calculus, one of the hypotheses (continuity of $f$ on $[a, b]$) prevents us from interacting with both piecewise definitions in $F$, and good references will indicate this restriction. Indeed, whenever the Fundamental Theorem of Calculus applies---in this example, when $a, b$ are both negative or both positive---we lose no generality just using the more convenient family $\log |x| + C$.
One can imagine how much worse dealing with the most general antiderivative would be when integrating functions like, e.g., $\tan x$, which has a countable infinity of singularities.
