Short answer "NO". For ANY function f(x) defined on some (connected) interval a
Standard Proof (which you should have seen before):
Suppose first that some anti-derivative exists. That is that some F(x) is defined for x∈(a,b) such that F'(x)=f(x) for all x∈(a,b).
Now suppose that there is another anti-derivative, G(x). Let K(x) = G(x)-F(x), so that K'(x) = G'(x)-F'(x) = f(x)-f(x) = 0. Then for any x,c∈(a,b), by the mean value theorem, K(x)-K(c)=K'(z)(x-c) for some "z" between "x" and "c". But K'(z)=0, hence K(x)=K(c) for all x∈(a,b). That is, K(x) is constant. Every anti-derivative of f(x) is of the form F(x)+K for some constant K. Furthermore, it is easy checked that every F(x)+K is an anti-derivative of f(x).
QED
Notice that this theorem requires a connected domain. If the domain of f(x) is not connected, then anti-derivatives can have differ by different constants on each connected component. (But only one constant within each component, by the above theorem.) For example: f(x)=1/x² has anti-derivatives:
F(x) = A - 1/x, for x>0; and F(x) = B - 1/x, for x<0
for any constants A and B.
Also note that, in this case, F(x) can never be extended to a function continuous at x=0 regardless of the choices for "A" and "B". Of course, being differentiable by definition, anti-derivatives are always continuous on their entire domain.
Also notice that the theorem requires that f(x) have at least one anti-derivative defined on the entire domain, otherwise not anti-derivative means no constant of integration! (You ought to have seen examples of functions which do not have anti-derivatives.)
Normally, piecewise functions are defined on a connected domain, and so allow at most one constant of integration.
For example, if f(x) =
2x+1 for x<1
3 for 1≤x≤5
3x²-72 for x>5
Then one anti-derivative is: F(x) =
x² + x for x<1
3x - 1 for 1≤x≤5
x³-72x+249 for x>5
Notice the "-1" and the "249" required to keep F(x) continuous, hence differentiable, at x=1 and x=5. Now then, EVERY anti-derivative of f(x) must take the form:
x² + x + k for x<1
3x - 1 + k for 1≤x≤5
x³-72x+249+k for x>5
For any constant "k", the ONE constant of integration.
Notice that, in the example to which Cidyah refers, the original piecewise function is undefined at both 0 and 20 (disconnected domain with 3 sections, hence 3 constants) and all the anti-derivatives have derivatives at neither 0 nor 20.