# Function with the same derivative are equal up to a constant

If functions $f$ and $g$ are continuous on $[a,b]$ differentiable on $(a,b)$, and $f'(x) = g'(x)$ on $(a,b)$, then there exists a real number $K$ such that $f(x) = g(x) + K$ for all $x\in [a,b]$.

-
 Hint: Let $p(x)=f(x)-g(x)$ – André Nicolas Apr 12 '12 at 18:34

Hint: Set $h=f-g$. Show that $h$ is continuous on $[a,b]$ and that $h'$ is identically zero on $(a,b)$. Then use the result of a previous question of yours.