Let D bea set of nonzero real numbers. Suppose that the functions and are differentiable and that 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 . then we have

for all x in D

So, 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?