# Proof that $f'(x) = g'(x)$ if and only if $f = g + c$

Good evening,

I need to prove that $f'(x) = g'(x)$ for all $x \in (a,b)$ if and only if there exist a $c \in \mathbb{R}$ with $f = g+c$.
We know that $f:[a,b] \rightarrow \mathbb{R}$ and $g:[a,b] \rightarrow \mathbb{R}$ are continuous and differentiable on $(a,b)$.

My attempt:

Define $t(x):=c$
Let $t:[a,b] \rightarrow \mathbb{R}$ be continuous and differentiable on $(a,b)$.
$t'(x)=0$ for all $x \in (a,b)$ $\Rightarrow t(x)=c$ , $c \in \mathbb{R}$ for all $x \in [a,b]$.

Proof (with contraposition):

assume that $t(x)$ isn't $const$ on $[a,b]$
$\Rightarrow \exists x_0 \in [a,b]$ that $t'(x_0) \neq 0$
Under the assumption there exists a $x,y \in [a,b] : f(x) \neq f(y)$
$w.l.o.g.$ assume that $x<y \Rightarrow (x,y) \leq (a,b)$
$\Rightarrow t(x)$ is differentiable on $(x,y)$ and continuous on $(x,y) \leq (a,b)$
With the mean value theorem $\Rightarrow \exists \eta_0 \in (x,y): t(y)-t(x) = t'(\eta_0) \cdot (y-x)$
Under the assumption we know that $(y-x) > 0$ and $t(y)-t(x) \neq 0$.
$\Leftrightarrow \frac {t(y)-t(x)}{y-x} = t'(\eta_0) \Rightarrow f'(\eta_0) \neq 0 \Rightarrow Assumption.$

Now since we know that the differentiation of a constant function is zero we can define our $c:= f-g \Rightarrow f'(x)-g'(x)= 0 \Rightarrow f'(x) = g'(x)$.

Am I on the right track?

-
Well, it would be much easier to start with $(f-g)' = 0 \iff (f-g) = c$. – dtldarek Dec 2 '12 at 22:54
I think it is intended to show it that way since I came to a conclusion but not to a equivalence. Thank you. – Just a Student Dec 2 '12 at 23:09

Suppose $f'=g'$. $h=f-g$ must be differentiable and its derivative is $h'=f'-g'$.Since it identically vanishes, $h$ must be a constant from Mean Value theorem.