3

I'm going through Etgen's One and several variables (a book on calculus), and I came across the following question: Prove that the function

$$f(x) = \begin{cases} x^2 & x \le 1 \\ 2x & x \gt 1 \end{cases}$$

is not differentiable at $x = 1$. Using the definition of the derivative (the limit as $h \to 0$ of the difference quotient; i.e., $\lim_{h \to 0} \left( \frac{f (c + h) - f(c)}{h} \right)$), I found that the value of that limit of both the LHS and RHS is equal to $2$, so I assumed the limit must exist. But I also found that this function is not continuous at $x = 1$, so it should not be differentiable at that point.

In the same book, we had to prove that if the limit of the difference quotient exists at a real number $c$, then $f (x)$ is continuous at that point. I feel like I must be making a mistake somewhere, or misunderstanding what the definition of the limit is, so any help is appreciated.

K. Jiang
  • 10,436
Chidi
  • 71
  • 2
    It's not enough to check that the left limit and right limit of the difference quotient both exist and are equal. You have to show that the (two-sided) limit exists. Since the function is discontinuous, the two-sided limit doesn't exist. – Eric Towers Jul 13 '24 at 16:27
  • Ah I see. I assumed that if the function was discontinuous, calculating the limit of the difference quotient would reflect that. – Chidi Jul 13 '24 at 16:43
  • It does. That limit here goes to $\infty$ when you pick a secant that spans the discontinuity. – Eric Towers Jul 13 '24 at 16:47
  • differentiable implies continues which is not the case here. – Peter Jul 13 '24 at 16:48
  • 4
    The RHL is not equal to $2$! $\lim_{h\to 0^+} \frac {f(1+h) -f(1)}h = \lim_{h\to 0^+}\frac {2(1+h) - 1^2}{h}=\lim_{h\to 0^+} \frac {1+2h}h=2+\lim_{h\to 0^+} \frac 1h=\infty$. – fleablood Jul 13 '24 at 16:53
  • 2
    Note that if $c=1\le 1$ then $f(c) = c^2$ but as $c + h > 1$ then $f(c+h) = 2(c+h)$. So $f(c+h) - f(c) = 2(c+h) - c^2$ and we don't get a nice limit at all. $2(c+h)-c^2= (2c-c^2) + 2h$ and $\frac {f(c+h)-f(c)}h = \frac {(2c-c^2) +2h}h= \frac {2c-c^2}h + 2$ and the $h$ doesn't cancel out nicely at all. – fleablood Jul 13 '24 at 17:04
  • 1
    Thanks to these comments and the answer, I can see the error I made (I commented on the accepted answer). To confirm, if the first case was strictly for $x \lt 1$, would $f(x)$ be differentiable at 1? – Chidi Jul 13 '24 at 17:13
  • 1
    Oh... d'oh! Of course not. If $f(x)$ is discontinuous at $x=c$ then $f(c+h) -f(c)$ is greater than some constant so so limit is infinite. – fleablood Jul 13 '24 at 18:31
  • 1
    If not continuous at $x=c$ then there exists a $\delta$ so that for any $h$ there is an $x_0$ so that even though $|x_0 - c|<h$ that $|f(x_0) -f(c)| > \delta$. So $|\lim_{h\to 0}\frac {f(x+h) - f(h)}h| >\lim_{h\to 0}|\frac {\delta}h| = \infty$. Can't be differential at a discontinuity as the difference between $f(c)$ and $f(close\ to\ c)$ is a measurable real actual gap. The entire premise of a derivative is the assumption $f(close\ to\ c)$ is close to $f(c)$. And that assumes a continuity. and wo it derivatives are meaningless. – fleablood Jul 13 '24 at 19:51

1 Answers1

1

Your difference quotient limits are not correct. For your function, $f (1) = (1)^2 = 1$. Let's consider the difference quotients from the left and right.

From the left:

$$\lim_{h \to 0^+} \frac{f (1) - f (1 - h)}{h} = \lim_{h \to 0^+} \frac{1 - (1 - h)^2}{h} = \lim_{h \to 0^+} \frac{2 h - h^2}{h} = \lim_{h \to 0^+} (2 - h) = 2$$

which is what you got.

But from the right:

$$\lim_{h \to 0^+} \frac{f (1 + h) - f (1)}{h} = \lim_{h \to 0^+} \frac{2 (1 + h) - 1}{h} = \lim_{h \to 0^+} \left( 2 + \frac{1}{h} \right) = \infty$$

It is a helpful and easy exercise to prove that in general, if the derivative of $f (x)$ exists at a point $x = x_0$, then the function must be continuous at $x_0$. In your case, since $f (x)$ is not continuous at $x = 1$, then the derivative of $f (x)$ must not exist there.

K. Jiang
  • 10,436