Theorem: If a function is differenciable with the property that for all points then, for some real number .
Proof: Let and be be points . Then, the closed interval is continous (because differenciability implies continuity). And the open interval is differenciable because that is the property of the function. This satisfies Lagrange's Mean Value theorem. There exists a point such as,
thus, . Which means that the evaluation of the function is invariant, i.e. it is a constant function. Q.E.D.
Given a function on some interval. If and are primitives, that is, for all points in the open interval. Then, , thus, is derivative zero throughtout the interval. By the theorem that means that, for some constanct function . Thus, . Q.E.D.