The fact that "derivatives belong to unique functions" or, more correctly, that if f(x) and g(x) have the same derivative then f(x) and g(x) differ at most by a constant, is given in most calculus books and follows from the mean value theorem:
Lemma: Suppose f(x) is continuous on [a, b], is differentiable on (a, b), and f'(x)= 0 for all x in (a, b). Then f(x)= C (f(x) is a constant) for all x in (a,b).
Let x be any point in (a, b). By the mean value theorem, (f(x)- f(a))/(x- a)= f '(c) for some c between a and x. Since f'= 0 between a and b, f'(0)= 0 from which it follows that f(x)- f(a)= 0 or f(x)= f(a). That is, f(x) is equal to the number f(a) for all x between a and b and so f(x) is a constant there.
Theorem: If f(x) and g(x) are both continuous on [a, b], differentiable on (a, b), and f'(x)= g'(x) for all x in (a, b), then f(x)= g(x)+ C, a constant.
Let H(x)= f(x)- g(x). Then H(x) is continuous on [a,b] and differentiable on (a, b). Further, for all x in (a, b), H'(x)= f'(x)- g'(x)= 0 because f'(x)= g'(x). By the lemma, H(x)= f(x)+ g(x)= C for some number C. Then f(x)= g(x)+ C.