3

Let’s say I have two continuous functions $f(x)$ and $g(x)$ , and both have the same derivative $h(x)$. How could I formally show that $f(x)=g(x)+c$ where $c$ is a constant. I know I have to show that $f(x)-g(x)$ is a constant function but not sure how? Thanks

4 Answers4

3

Beware that the statement is not true, unless you make some further assumptions.

If $f$ and $g$ are continuous functions over an interval $I$, differentiable in the interior of $I$, and $f'(x)=g'(x)$ for every $x$ in the interior of $I$, then there exists a constant $k$ such that $f(x)=g(x)+k$, for every $x\in I$.

This is nothing else than the mean value theorem: consider $h(x)=f(x)-g(x)$. Then, for $a<b$ in $I$, $$ \frac{h(b)-h(a)}{b-a}=h'(c) $$ for some $c\in(a,b)$. But then $h'(c)=0$, so $h(b)=h(a)$ and therefore $h$ is constant.

The usual counterexample is $$ f(x)=\arctan x,\qquad g(x)=-\arctan\frac{1}{x} $$ defined over $\mathbb{R}\setminus\{0\}$. They have the same derivative, but the difference is not constant. Indeed $$ f(x)-g(x)=\begin{cases} \pi/2 & x>0 \\[4px] -\pi/2 & x<0 \end{cases} $$

egreg
  • 238,574
0

$f'(x)-g'(x) \equiv 0$ given that their derivatives are the same. Now we can apply FTC to this (integrate between some lower limit $a$ and $x$), and this will give you your answer!

fGDu94
  • 3,916
0

It suffices to show that if $A'=0$ then $A(x)=c$ for some $c$. But this is clear by the mean value theorem. Indeed fix $x\in \mathbb{R}$ and apply the mean value theorem to the interval $[ x, y]$ to deduce that $A(y)=A(x)$ for all $y>x$. Similarly one can deduce that $A(y)=A(x)$ for all $y<x$ whence $A$ is constant.

0

$$ f^{'}(x) = g^{'}(x) $$ Integrating both sides with respect to x . $$ \int f^{'}(x) = \int g^{'}(x) $$ $$ f(x) +C_1= g(x) +C_2$$ $$ f(x) - g(x) = C_2 - C_1$$ Since $ C_1$ is a constant and also $C_2$ is a constant so $C_2-C_1$ is also a constant Thus $$ f(x) - g(x) = C $$

  • 2
    You don't multiply both sides by $\mathrm{d}x$ and integrate. You "integrate both sides with respect to $x$". Your phrasing makes it sound as if integration can occur independently of choice of variable of integration, i.e., that the left bracket, $\displaystyle \int$, and the right bracket, $\mathrm{d}\text{[some variable]}$, are separable. – Eric Towers Apr 21 '19 at 16:17
  • This begs he question. The "+C_2$" in your integral uses what the OP wants to prove. – Ethan Bolker Apr 21 '19 at 16:18