Source video: BlackpenRedpen video
In this video from a fairly popular channel on youtube, he proves that if $f(x)$ is continuous, then:
$$ \int_{0}^{x} \int_{0}^{u} f(t)\,dt\,du = \int_0^x f(u)(x-u)du $$
by differentiating both sides with respect to $x$ and showing that $\frac{d}{dx}LHS = \frac{d}{dx}RHS$. Thus:
$$ \int_{0}^{x} \int_{0}^{u} f(t)\,dt\,du = \int_0^x f(u)(x-u)du + C $$
He shows that $C = 0$ by setting $x = 0$. I was confused about that and I saw a youtube comment that said:
Btw, when you show that C = 0, isn't that result only true for x = 0? what about other x values?
A reply said:
You know, since the derivatives are equal, that left hand side and right hand side differ only by a single constant. This constant is the same independent of x. Therefore it suffices to show that the difference of l.h.s and r.h.s. is 0 for any one x to show that said constant (the difference of the two functions) is 0 and the functions are the same. x=0 is the canonical choice here.
My question is why is $C$ independent of $x$?
It is because of the definition of the concept of primitive. A function $F: \mathbb{R} \to \mathbb{R}$ is called a primitive of a function $f: \mathbb{R} \to \mathbb{R}$ if $F' = f$. If we note that $F' = f$ implies $(F + constant)' = f$ and vice versa, if we identify the same class of primitives of $f$ as the "same" one (modulo constants, of course), and if we write $\int f$ for a generic primitive of $f$, then what the fundamental theorem of calculus asserts is the existence of primitive: under suitable conditions, the indefinite integral $x \mapsto \int_{a}^{x}f$ is a primitive of $f$. Also note that $f$ is a primitive of $f'$ trivially.
With the above in mind, let us analyze the puzzle. Suppose $f' = g'$. Then by definition they have the "same" primitive $f + C_{1} = g + C_{2}$, so $f=g + C_{2}-C_{1}$. Here we see that $C_{2}-C_{1}$ is a constant independent of the choice of the arguments of $f$ and $g$.
Note: Please be noted that this answer addresses the OP's question about the why the constant of integration is "constant", not the argument quoted by OP, which is not asked.