6
$\begingroup$

Main Question: Is it possible for a function f to have a derivative at a point x but be discontinuous at that point?

Consider a function that is defined as follows: $$f(x)=\begin{cases} x^2 & x \leq c \\ax+b & x > c \end{cases}$$ We are asked to find constants a,b,c such that the derivative of f at c exists. Consider the situation where $a=2c$. Following the limit definition of the derivative, we have that $f'(c)$ is equals to: $$\lim_{h\to0}\frac{f(c+h)-f(c)}{h}$$ provided that the limit is defined. To see that, we may examine the limit as $x\to0-$ and as $x\to0+$. $$\begin{equation}\lim_{h\to0+}\frac{f(c+h)-f(c)}{h} \\ =\lim_{h\to0+}\frac{a(c+h)+b-(ac+b)}{h}\end{equation}\\=\lim_{h\to0+}\frac{ah}{h}\\=a=2c$$ For when $x\to0-$: $$\begin{equation}\lim_{h\to0-}\frac{f(c+h)-f(c)}{h} \\ =\lim_{h\to0-}\frac{(c+h)^2-c^2}{h}\end{equation}\\=\lim_{h\to0-}\frac{2ch+h^2}{h}\\=2c$$ Thus, by definition if $a=2c$ then for all values b $f'(c)$ exists and is equal to 2c. Here is the issue, if $f'(c)$ exists for all values of b with the aforementioned condition then it could certainly be possible that $f(x)$ is discontinuous at c which contradicts an earlier theorem which states that if a function f has a derivative at a point x, then it is also continuous at x. This is an example graph in desmos: https://www.desmos.com/calculator/acym19fdm2.
This creates a situation where the function f has a derivative at the point x but it is not continuous at that point. Am I doing something wrong here?

Edit: As X-Rui and many others in the comments and answers pointed out, my error was in computing the right-hand limit. f(c) should always be equal to $c^2$ regardless of the limit since c is constant and f(c) was so defined. Hence the right-hand side limit computation should be as follows:

$$\begin{equation}\lim_{h\to0+}\frac{f(c+h)-f(c)}{h} \\ = \lim_{h\to0+}\frac{a(c+h)+b-c^2}{h}\end{equation}$$

From here we intend to find an values of a,b,c such that this limit will agree with the value of the left limit of 2c. Assume that there exists such a value c, then since f is differentiable at c f is continuous at c. Hence $ac+b=c^2$ by continuity (as pointed out by stoic-santiago). Then the limit above simplifies to $$\lim_{h\to0+}\frac{a(c+h)+b-(ac+b)}{h}=a$$ Hence our requirement of differentiability simplifies to the requirement that $a=2c$ (along with the above requirement for continuity).

Therefore, any a,b,c satisfying the two conditions $ac+b=c^2$ and $a=2c$ will suffice.

$\endgroup$
17
  • 13
    $\begingroup$ Easy consequence of definition of derivative: If $f$ is differentiable at $c$ then it is continuous at $c$. $\endgroup$ Commented Jan 30 at 0:25
  • 2
    $\begingroup$ Your example does not contradicts the theorem, the function is not differentiable. $\endgroup$
    – jjagmath
    Commented Jan 30 at 0:31
  • 4
    $\begingroup$ I won’t give the answer here in the comments, but I’ll indeed point out some errors. 1, you take the wrong sides when calculating the one-sided derivatives. Also, $f(c)$ should be $c^2$ no matter which side you are taking the limit from; this would show you the function has to be continuous at $c$. $\endgroup$
    – X-Rui
    Commented Jan 30 at 0:32
  • 1
    $\begingroup$ As @X-Rui points out, the mistake is in your left-side limit, procommania. Look at the function: $f(c)=c^2,$ but you used wrongly $ac+b.$ $\endgroup$
    – user376343
    Commented Jan 30 at 0:37
  • 1
    $\begingroup$ I'm sorry. I see the issue. $\endgroup$ Commented Jan 30 at 1:16

2 Answers 2

16
$\begingroup$

Your main mistake is you used the wrong definition of $f$ at $c$ when calculating the right-sided limit. You wrote $$\lim_{h \to 0^+} \frac{f(c+h) - \color{red}{f(c)}}{h} = \lim_{h \to 0^+}\frac{a(c+h)+b - \color{red}{(ac+b)}}{h},$$ where you used $f(c) = ac + b$. This is wrong. By definition, $f(c) = c^2$, no matter which side you are taking the limit from. The correct calculation should be $$\lim_{h \to 0^+} \frac{f(c+h) - \color{red}{f(c)}}{h} = \lim_{h \to 0^+}\frac{a(c+h)+b - \color{red}{c^2}}{h}.$$ From here, you can follow the classic proof to show $f$ must be continuous at $c$.

What you calculated was (virtually) the left-sided and the right-sided limits of the derivative of $f$ at $c$. Them being equal does not mean $f$ is differentiable at $c$.

$\endgroup$
0
1
$\begingroup$

Likely not. If f is differentiable at a point x, then f must also be continuous at x, locally linear (the reverse does not hold). If f is even not differentiable at a point x, how it could be as much as continuous derivative there.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .