# Real Analysis Derivative Question

I am having trouble with this:

If $h(x)=0$ for $x<0$ and $h(x)=1$ for $x\geq 0$, prove there does not exist a function $f:\mathbb{R}\to \mathbb{R}$ such that $f'(x)=h(x)$ for all $x \in \mathbb{R}$. Give examples of two functions, not differing by a constant, whose derivatives equal $h(x)$ for all $x\neq 0$.

For the last part, Obviously if $h(x) = 1$ for $x<0$ and $h(x)=x$ for $x>0$ it will work. Is there another example? Also, I am not sure where to begin on the proof.

• What about the function f:R->R such that f(x)=0 for all x<=0 and f(x)= x for all x>0 – Amr Nov 9 '12 at 0:44
• To show that such a function doesn't exist, you could look at the difference quotient for the derivative at zero: $\lim_{h \to 0^-} \frac{f(h)-f(0)}{h}$. Since the derivative is zero for $x < 0$, $f(h)$ is constant for all $h< 0$. By continuity, you must have $f(h)= f(0)$... – ec92 Nov 9 '12 at 1:45

All derivatives satisfy the intermediate value property. If they assume two values on an interval, the assume all of the values in between. This is a consequence of the Mean Value Theorem. Hence, your function is doomed.

• This is a good way to look at the problem! No neede to do anything, since the given $f'(x)$ doesn't satisfy IVT. +1. – coffeemath Nov 9 '12 at 2:18
• I think this theorem is also known as Darboux's theorem. In the proof the mean value theorem is applied to something like $f(x)-x$. – abnry Nov 9 '12 at 2:27
• All derivatives defined on an interval. As coffeemath shows, there are many fine $f$'s that satisfy the requirement except for not having a proper derivative at zero. – Ross Millikan Nov 9 '12 at 2:42
• By the way he phrases the question, he is looking for a function whose derivative exists throughout. – ncmathsadist Nov 9 '12 at 2:43

For the last part, you can define $f(x)=k_1$ for $x<0$ and $f(x)=x+k_2$ for $x>0$, and let $f(0)$ be any constant. Since the $k_1,k_2$ are arbitrary, there are infinitely many choices.

Note that here with different choices say $(1,2)$ and $(3,5)$ for $(k_1,k_2)$ you'll have functions not differing by a constant, in the sense that the differences will be different constants for $x<0$ than for $x>0$.

For the first part, suppose $f(-1)=c$ and use that $$f(x)=f(-1)+\int_{-1}^x f'(t)dt.$$ Then on doing the integral you find that $f(x)=c$ for x<0 and $f(x)=c+x$ for $x \ge 0$. This function is continuous, but has a "corner" at $x=0$ so is not differentiable on the whole set of reals.

• If anyone read this already, note that I forgot the prime on the derivative $f'(t)$, which I've just inserted. – coffeemath Nov 9 '12 at 2:17