1

We know that $f(x) = |x|$ is not differentiable at $x = 0$ (the derivative approaches $1$ as $x \to 0^+$ while the derivative approaches $-1$ as $x \to 0^-$). However, if I were to define a function $g$ such that

$$g(x) = \begin{cases} 1 &\text{if } x \geq 0 \newline -1 &\text{if } x < 0 \end{cases}$$

Then if I define $f(x) = \int_0^x g(x)$, $f(x) = |x|$ and $f'(x) = g(x)$ by the fundamental theorem of calculus. However, in this case, $f'(0) = g(0) = 1$ but we just established in the first paragraph that $|x|$ is not differentiable at $x = 0$.

What am I missing here?

Edit: I cannot use the fundamental theorem of calculus because $g$ is not continuous.

It turns out I cannot define an everywhere differentiable function such that its derivative is equal to $g$ by Darboux's theorem

Math_Day
  • 1,227

2 Answers2

4

There is even no differentiable function $f:\Bbb R\to\Bbb R$ such that $$f'(x) = \begin{cases} 1&\text{if }x>0,\\ -1 &\text{if }x<0, \end{cases}$$ because this would imply $$f(x)=f(0)+|x|,$$ which is not differentiable at $0.$

Anne Bauval
  • 34,650
3

There is no function whose derivative is $$g(x) = \left\{\begin{array}{ll} 1&\text{if }x\geq 0,\\ -1 &\text{if }x\lt 0. \end{array}\right.$$ This is because of Darboux's Theorem:

Darboux's Theorem. If $f\colon [a,b]\to\mathbb{R}$ is differentiable, then it has the intermediate value property: for any $r$ and $s$, $a\leq r\lt s\leq b$, if $y$ is a value between $f'(r)$ and $f'(s)$, then there exists $t$, $r\lt t\lt s$, such that $f'(t)=y$.

In particular, since $g(x)$ does not satisfy the intermediate value property (there is no point where $g(x)$ takes values strictly between $g(-1)$ and $g(1)$, for example), it cannot be the derivative of a function.

Arturo Magidin
  • 398,050
  • The third answer to this post https://math.stackexchange.com/questions/622076/continuity-rightarrow-intermediate-value-property-why-is-the-opposite-not-tr?lq=1 gives an example of a function that satisfies the intermediate property but isn't continuous. – Math_Day Nov 01 '23 at 22:37
  • 1
    @Math_Day: Yes, such functions exist; which is why you can have a function that has a derivative, but that derivative is not continuous (among other reasons, such as explicitly constructing it). But $g(x)$ does not satisfy the intermediate value property, so it cannot be a derivative. – Arturo Magidin Nov 01 '23 at 22:42
  • for sure, I was just including that post for those who are confused about the difference between functions that are continuous and functions that satisfy the intermediate value property – Math_Day Nov 01 '23 at 23:23