# functions differing by a constant

• May 2nd 2010, 04:02 PM
serious331
functions differing by a constant
Let D be a set of nonzero real numbers. Suppose that the functions $g : D \rightarrow R$ and $h : D \rightarrow R$ are differentiable and that $g'(x) = h'(x)$ for all x in D. Do the functions differ by a constant???

so we can say that:

If D is an open interval then, we can define $f = g-h : D\rightarrow R$. then we have

$f'(x) = g'(x) -h'(x) = 0$ for all x in D

So, $f : D \rightarrow R$ is constant iff g and h differ by a constant.

however, what i wanted to know is how can we assure that D is an (open) interval?
• May 2nd 2010, 04:29 PM
The answer is no, as you have apprehended. Take $D:=(-2,-1)\cup(1,2)$ and set g to be the indicator on (-2,-1) and h to be zero. Then they're derivatives are equal but they do not differ by a constant. You will need to insist that D be connected if you want this to hold.
• May 2nd 2010, 05:29 PM
serious331
Quote:

The answer is no, as you have apprehended. Take $D:=(-2,-1)\cup(1,2)$ and set g to be the indicator on (-2,-1) and h to be zero. Then they're derivatives are equal but they do not differ by a constant. You will need to insist that D be connected if you want this to hold.

Maybe I misunderstood you. Let $D:=(-2,-1)\cup(1,2)$. Define
$g(x) = \begin{cases} 1, & \mbox{if } x \in (-2,-1) \\ 0, & \mbox{otherwise}. \end{cases}$