Let us consider this small problem: $$ \int0\;dx = 0\cdot\int1\;dx = 0\cdot(x+c) = 0 \tag1 $$ $$ \frac{dc}{dx} = 0 \qquad\iff\qquad \int 0\;dx = c, \qquad\forall c\in\mathbb{R} \tag2 $$
These are two conflicting results. Based on this other question, Sam Dehority's answer seems to indicate: $$ \int\alpha f(x)\;dx\neq\alpha\int f(x)\;dx,\qquad\forall\alpha\in\mathbb{R} \tag3 $$
However, this clearly implies that indefinite integration is nonlinear, since a linear operator $P$ must satisfy $P(\alpha f) = \alpha Pf, \forall\alpha\in\mathbb{R}$, including $\alpha=0$. After all, a linear combination of elements of a vector space $V$ may have zero valued scalars: $f = \alpha g + \beta h, \forall\alpha,\beta\in\mathbb{R}$ and $g, h\in V$. This all seems to corroborate that zero is not excluded when it comes to possible scalars of linear operators.
To take two examples, both matrix operators in linear algebra and derivative operators are linear, even when the scalar is zero. In a matrix case for instance, let the operator $A$ operate a vector: $A\vec{x} = \vec{y}$. Now: $A(\alpha\vec{x}) = \alpha A\vec{x} = \alpha\vec{y}$. This works even for $\alpha = 0$.
Why is $(3)$ true? Can someone prove it formally? If $(3)$ is false, how do we fix $(1)$ and $(2)$? When exactly does the following equality hold (formal proof)? $$ \int\alpha f(x)\;dx = \alpha\int f(x)\;dx,\qquad\forall\alpha\in\mathbb{R} $$
I would appreciate formal answers and proofs.
The issue here is that the indefinite integral operator, when applied to a function, does not give a function as its output. It gives an equivalence class of functions, equivalent up to constant translation.
We usually write $\int 2x ~dx = x^2 +C$, but what we really mean is that $\int 2x ~dx = [x^2]$, where $$[x^2]=\{x^2+C | C\in \mathbb{R}\}.$$
The space of such equivalent classes also forms a vector space with vector addition and scalar multiplication defined as follows:
$$[f]+[g]=[f+g]$$ $$c[f]=[cf]$$
(Note that while addition is equivalent to point-wise adding the functions in each equivalence class, multiplication is not when the scalar is $0$: $$0[f]=\{f+\overline{C}: C\in \mathbb{R}\} =\{0+C | C\in \mathbb{R}\} = [\overline{0}]$$ $$\ne \{0(f+\overline{C}) | C\in \mathbb{R}\} = \{\overline{0}\}.$$
That latter, besides not following from the definition, is a not an equivalence class in the right form.)
Now, the apparent problem disappears: $$\int \overline{ 0} ~dx = [\overline{0}]$$ and $$0\int \overline{1} ~dx = 0[x] = [0x]=[\overline{0}]$$
In the above, $\overline{-}$ maps a scalar to the constant function returning that scalar. $\overline{0}$ denotes the zero function, while $0$ denotes the zero scalar. (Similarly $\overline{1}$ denotes the identically-one function, and $\overline{c}$ denotes the everywhere-$c$ function.) This notation is just for clarity, to emphasize the difference between the two zero symbols.