\documentclass[a4paper,12pt]{article}
\begin{document}

\noindent {\bf Question}

\noindent Use the Mean Value theorem to prove that if $f$ and $g$
are two differentiable functions on the closed interval $[a,b]$,
where $a<b$, and if $f'(x) = g'(x)$ for all $x$ in $[a,b]$, then
there is a constant $K$ so that $f(x) = g(x) + K$ for all $x$ in
$[a,b]$.

\medskip

\noindent {\bf Answer}

\noindent Set $h(x) =f(x) -g(x)$, so that $h'(x) =f'(x) -g'(x) =0$
for all $x$.  Take $x$ in $(a,b]$, and apply the mean value
theorem to $h(x)$ (which is continuous on ${a,b}$ and
differentiable on $(a,b)$ since both $f(x)$ and $g(x)$ are) on
$[a,x]$, to see that there exists $c$ in $(a,x)$ so that $h'(c) =
\frac{h(x) -h(a)}{x-a}$. But since $h'(c) =0$, we have that $h(x)
-h(a) =0$, or that $h(x) =h(a)$.  That is, $f(x) = g(x) + h(a)$,
as desired, where $K =h(a)$.


\end{document}
