2

According to wikipedia :

A function is said to be continuously differentiable if its derivative is also a continuous function;

I thought of the discontinuous function :

$f(x)=\left\{ \begin{aligned} \cos(x)\quad x \ne 0\\ 0 \quad x=0\\ \end{aligned} \right.$

which doesn't exist for $x=0$ and is discontinuous .

it's derivative is :

$f'(x)=\left\{ \begin{aligned} -\sin(x)\quad x \ne 0\\ 0 \quad x=0\\ \end{aligned} \right.$

which exists for $x=0$ and is continuous .

Am I doing something wrong ? if not were my assumptions true that discontinuous function can have continuous derivatives ?

user21820
  • 57,693
  • 9
  • 98
  • 256
Losh_EE
  • 334
  • 1
    See https://math.stackexchange.com/questions/828508/why-can-a-discontinuous-function-not-be-differentiable – Henry Jul 09 '22 at 16:39
  • 2
    To better understand the answers, what you've done is to differentiate each piece of a piecewise differentiable function. In particular, note that when you investigate the limit of difference quotients for this function at $x=0,$ you have to use the formula $\cos x$ for the $x \neq 0$ neighboring points and use the formula $0$ for the $x=0$ base point. (Recall derivative is limit of secant slopes where one endpoint, the base point, of the secant is fixed at the differentiation point.) By differentiating each piece, each piece is treated as if it applies to both $x \neq 0$ and $x=0.$ – Dave L. Renfro Jul 09 '22 at 16:56
  • Here you have differentiated a point (0,0) which can not be done by the definition of differentiation. – Janaka Rodrigo Jul 10 '22 at 05:12

4 Answers4

9

You claim that $f'(0)=0$ but that's not true since you cannot derive the function in a discontinuity point, so your derivative only exists in $\mathbb{R}-\{0\}$

1

Hint: $f$ is differentiable at $a$ implies $f$ is continuous at $a$.Contrapositively $f$ is not continuous at $a$ implies $f$ is not differentiable at $a$ .


$\lim_{x\to 0} f(x) =\lim_{x\to 0} \cos x=1\neq 0$

Hence given function $f$ is not continuous at $0$ , we can't talk about $f'(0) $

Sourav Ghosh
  • 12,997
1

As other answers point out, your question is flawed because, according to the definitions, $f'(0)$ does not exist. This answer might not be totally satisfying to you though, and I think there is a more interesting question remaining after you fix your terminology.

Now; the derivative $f'(x)=-\textrm{sin}(x)$ is obviously defined everywhere except 0, and moreover, has an obvious extension to say $f'(0)=0$ which makes the whole derivative continuous on the real line.

That is to say, your derivative has a removable discontinuity(*) at zero, and it's trivial to repair it into a total continuous function. So your function "might as well be" continuously differentiable.

That being said, your function also "might as well be" everywhere continuous -- the discontinuity is removable.

So a more interesting version of your question is -- is there a discontinuous function f, which is really discontinuous (not just a removable discontinuity or two) whose derivative might as well be everywhere continuous?

The answer is actually yes! And it's not hard to construct it: let $f(x)=0$ when $x<0$, and let $f(x)=1$ when $x>0$. It doesn't matter what $f(0)$ is, do what you want.

Now there is no way to make that continuous. But the derivative $f'(x)=0$ is defined everywhere except zero, so it "might as well be" continuous everywhere. And there you go! You have a function that's really not continuous but that "might as well" be continuously differentiable everywhere. Fun!

This function is called the Heaviside function, and it looks like a step (I hope you can imagine it). You can obviously extend this example and make lots more steps, and make your function have lots of (real) discontinuities -- infinitely many if you want to -- and still have $f'$ be "essentially" continuous everywhere.

(*) Technically it's not a discontinuity at all; the function isn't discontinuous at zero because it's not defined at zero. But you could trivially extend the function to be defined at zero in a way that's continuous. I don't know a common term for this situation but I hope the spirit of this is obvious.

Richard Rast
  • 1,641
  • "Removable discontinuity" is in fact the standard term, and can be used even for a limit point where the function is not defined at all, as in these example derivatives. – aschepler Jul 10 '22 at 03:58
  • Regarding the Heaviside function, defined however you want at $x=0,$ its symmetric derivative exists and equals $0$ everywhere (including at $x=0).$ For an arbitrary function, existence of the (finite) ordinary derivative implies existence of the (finite) symmetric derivative (proof), but as just seen, the converse fails. The converse can also fail for continuous functions (e.g. absolute value function; for more precise results, see here). – Dave L. Renfro Jul 10 '22 at 09:54
0

That function is not continuous at the point $x=0$, so $f$ is not differentiable at that point. Hence your claim $f’(0)=0$ doesn’t make sense.

Remember, if a function is not continuous, its derivative doesn’t exists (in other words, a derivable function MUST be continuous).