Understanding the definition of "Indefinite integral". Everywhere I have looked up, see here, the indefinite integral is defined as: $$F'(x)= f(x) \iff \int f(x) \, dx= F(x) + C $$
From what I understand if $f$ has an antiderivative $F$ then the set $$\{F(x) + C : C \in \mathbb{R}\}$$ is called "indefinite integral" of $f$.
But I don't understand the definition, $F'(x) =f(x)$... okay, where? What values of $x$? For every $x$ in the domain of $f$? Oh then I think we have a problem.
Let $f(x)= 0$ for $x \in (0,1)\cup(1,2)= \text{Domain}(f)$, we then go on to say $\displaystyle\int f(x)\, dx =\int 0 \ dx = C = \{ F(x) = C, \forall x \in \text{Domain}(f): C \in \mathbb{R}\}$, a set of constant functions... Sure but what if $F:(0,1)\cup(1,2)\to \mathbb{R}$ given by, $$ F(x)= \begin{cases}1, \ x \in (0,1) \\ \\ 2, \ x \in (1,2) \end{cases}$$ then $$F'(x)= 0 = f(x)\, , \ \forall x \in \text{Domain}(f)$$ but $F(x)$ is not a constant function on $\text{Domain}(f)$ and so $F(x)\notin \displaystyle\int f(x) \, dx$ and yet $F'(x)=f(x), \forall x $. What gives? Surely, that definition is incomplete?

NOTE: I have not mentioned $f$ is Riemann integrable or not so writing $F(x)=\int_a^x f(t) \, dt$ is already a no-go.
 A: The $+C$ isn't just a constant, per se. It's a locally constant function. This is true for any defined integral and any domain. Over connected domains, a function is constant if and only if it's locally constant. Otherwise, it would just have to be constant over every connected component. To be a little more rigorous, we can think of the indefinite integral as the antiderivatives on a connected component of the domain.
For example,
$$
F(x) =
\begin{cases}
-\frac{1}{x} + C_1,  & \text{if $x < 0$} \\
-\frac{1}{x} + C_2, & \text{if $x > 0$}
\end{cases}
$$
is the "correct" general antiderivative of $f(x) = \frac{1}{x^2}$ on its usual domain $\mathbb{R}\backslash\left\{0\right\}$.
I like to think of $+C$ as "$+$expression whose derivative equals $0$," or $+C$ to represent an entire family of functions with a derivative of $0$. Also, we know $F(x) + C_1$ and $F(x) + C_2$ are two different expressions, but they are still elements of the set $\left\{F(x) + C: C \in \mathbb{R}\right\}$.
Here's another way of explaining all this. An indefinite integral is the equivalence class of functions under the equivalence relation of having the same derivative. So an indefinite integral is not one function, per se, but a set of functions.
I'm going to sidetrack here but in abstract algebra and linear algebra, The derivative is a linear transformation (homomorphism) that sends nonzero vectors (functions) to $0$, so we can only define its inverse (the indefinite integral) only up to adding something whose derivative equals $0$.
(Opinion) I do agree that people loosely define indefinite integral notation $\int$, but I think it was done to help keep people sane. I doubt any professor grading a Calculus 1 class would want to grade homework having the solutions that are something like $\ln{|x+r|}$, and the students are forced to write a piecewise-defined function. It's inconvenient. It's kind of like how some people say $\sqrt{-1} = i$. It's impossible to take the square root of a negative number, yet people still abuse the square root notation, so some people accept that $\sqrt{-1} = i$ even though others would argue it's wrong (not to mention that $\sqrt{-1}$ could equal either $i$ or $-i$ depending on which branch you choose, but that's a different story).
A: You make a good point. Indefinite integral notation and manipulation tends to be a little loose, in my opinion. And you’re also right that, on a disconnected domain, it’s perfectly allowable to have multiple different constants. Famously $\int1/x=\ln|x|+C$ can have a different $C$ on $(-\infty,0)$ to $(0,\infty)$. I wouldn’t worry too much: $\int f$ just stands for “some antiderivative of $f$, on some subdomain of the domain of $f$”.
For instance it’s common to perform u-substitutions and the like with indefinite integrals - but, without any bounds of integration, those substitutions might not be valid! You then end up with an antiderivative that works in some places, but not in others. And as far as indefinite integration cares, that’s ok. $\int f$ just notationally streamlines the integral calculus.
A: The main problems here are the domain of definition and constant of integration. Both of these can be solved if you restrict to intervals (open/closed/clopen), which is how it is usually defined in texts.
Thus, for a Riemann integrable function $f : (a,b)\to \mathbb{R}$, the antiderivatives of $f$ is the set $$\{F(x)+C|F : (a,b)\to \mathbb{R}, F'(x) =f(x)
, C\in \mathbb{R}\}$$
The indefinite integral is more of a constructive tool for students to learn and convenient notations for people to solve problems. Thus, although it is fun to wonder how one can make it rigorous, it may not be necessary.
A: A definite integral is a number, an indefinite integral is a function.
In particular, a definite integral is the area enclosed between the function and one of the axes and the curve in the delimited interval.
The indefinite integral is the inverse functional of the derivative. Meaning that the function provided by the indefinite integral, when derived, should give as a result the original function that was integrated.
The interval where said function is defined is exactly that: the interval where the function is defined. In example $F(x)=1/x$ is defined in $\mathbb{R} - \left\{0\right\}$
I feel thate's confusion between the indefinite integral (functional returning a function) and the definite integral (functional returning an area). The simbology is similar, but they actually are 2 different functionals. That's what i was thaught.
