12

Is it possible that derivative of a function exists at a point but derivative does not exist in neighbourhood of that point.

If this happens then how is it possible. I feel that if derivative exists at a point then the left hand derivative is equal to the right hand derivative so derivative should exist in neighbourhood of that point.

Maverick
  • 10,736

4 Answers4

10

This is not exactly an answer to your question, but I think the source of your confusion is that you seem to believe that the left/right hand derivatives $$f'_\pm(a)=\lim_{h\to 0^\pm} \frac{f(a+h)-f(a)}{h}$$ are the same things as the left/right hand limits of the derivative $$\lim_{h\to 0^\pm} f'(a+h).$$ They coincide in simple cases, but not in general. For example, if $$f(x)=\begin{cases}1,&x \ge 0 \\ 0,&x < 0\end{cases}$$ then $f'(x)=0$ for all $x\neq 0$, so $\lim_{x\to 0^\pm} f'(x)=0$, but $f'(0)$ doesn't exist (since $f$ is discontinuous at $x=0$). More precisely, the right hand derivative $f'_+(0)$ is zero, but the left hand derivative ${f}'_{-}(0)$ is undefined.

Hans Lundmark
  • 55,038
  • Thanks Hans Lundmark. But can you explain with respect to the example I have quoted f(x)=\begin{cases} x^2\sin(\frac{1}{x}} & x \ne0 \ 0 & x=0 \end{cases} – Maverick Apr 11 '16 at 09:10
  • 4
    In that case, $f'(0)=\lim_{h\to 0}\frac{f(h)-f(0)}{h}=\lim_{h\to 0}\frac{h^2 \sin(1/h)-0}{h}=\lim_{h\to 0} h \sin(1/h)=0$. But for $x \neq 0$, $f'(x)$ is given by the expression in the comment by MathematicsStudent1122, and that expression doesn't have a limit as $x \to 0$. – Hans Lundmark Apr 11 '16 at 09:45
9

Yes, consider $f(x) = \begin{cases} x^2 & x \in \mathbb{Q} \\ 0 & x \in \mathbb{R} \setminus \mathbb{Q} \end{cases}$

$f$ is differentiable at $0$ and nowhere else.

  • What I had in mind was thisf(x) = \begin{cases} x^2\sin(\frac{1}{x}} & x \ne0 \ 0 & x=0 \end{cases} – Maverick Apr 11 '16 at 08:43
  • Would you say that derivative is continuous at $x=0$. Actually this is what I want to understand. Even in Spivak's Calculus it says that the derivative of this function is not continuous. So if derivative to left and right do not exist how can we say that that derivative exist at the point – Maverick Apr 11 '16 at 08:50
  • 6
    @PankajSinha The derivative of the function you have is given by $$ f'(x) = \begin{cases} 2 x \sin \left(\frac{1}{x}\right)-\cos \left(\frac{1}{x}\right)&\mbox{if } x \neq 0 \ 0 & \mbox{if } x=0, \end{cases} $$ which is not continuous at $0$. We know the derivative exists because of the definition! For $x \neq 0$ your function is 'well behaved' so we can apply the product rule; at $x=0$ we can deduce it via first principles. Thus, $f'$ is defined everywhere but it does not have to be continuous. – MathematicsStudent1122 Apr 11 '16 at 08:52
  • Right. But isn't it some kind of contradiction that when we talk of derivative existing at a point we say that left hand derivative and right hand derivative must be equal and finite. And when we find the derivative using methods of differentiation we find that left hand limit and right hand limit of the derivative do not exist at that point. – Maverick Apr 11 '16 at 08:57
  • 3
    @PankajSinha For each fixed $x$ the left and right hand limits of the difference quotient limit exist when we take $h \to 0$. However, when considering the function $f'(x)$ in which $x$ is allowed to vary, there is no a priori reason to believe that the left- and right- hand limits of $x$ (not $h$) exist.

    There is a result in analysis known as the Darboux theorem, which states that derivatives have the intermediate value property. This does not imply that derivatives need be continuous.

    – MathematicsStudent1122 Apr 11 '16 at 09:02
  • @PankajSinha: Not a contradiction, unless you think that those two concepts are the same (which they are not). I've added an answer about this. – Hans Lundmark Apr 11 '16 at 09:02
  • Could you explain what Q and R (real numbers) \ Q means? – user1717828 Apr 11 '16 at 12:29
  • @user1717828 : ​ ​ ​ https://en.wikipedia.org/wiki/Rational_number ​ http://mathworld.wolfram.com/SetDifference.html ​ ​ ​ ​ ​ ​ ​ ​ –  Apr 11 '16 at 17:16
4

Yes, it's possible! Consider the function

$$f(x) = x^2 W(x)$$

where $W$ is the Weierstrass function. At $x=0$ the derivative is $0$, but if it were differentiable anywhere else then $W$ would be differentiable too.

Daniel Fischer
  • 211,575
Deusovi
  • 3,043
  • 1
    How can you apply the product rule to $f$? Wouldn't that yield $2xW(x)+x^2W^{\prime}(x)$? But there is no $W^{\prime}(x)$ because $W$ is nowhere differentiable. – Justin Benfield Apr 11 '16 at 08:43
  • @JustinBenfield: My bad, not sure what I was thinking. Fixed, thank you! – Deusovi Apr 11 '16 at 08:45
  • Am I correct in thinking that to prove your claim requires an application of the squeeze theorem? Might be nice to see that worked out. – Justin Benfield Apr 11 '16 at 08:53
  • 1
    @JustinBenfield the limit in question is $\lim_{x\rightarrow 0} xW(x)$. W is bounded in [-2,2] so yes we can apply the squeeze theorem with the envelope functions $2|x|$ and $-2|x|$ – anonymous Apr 11 '16 at 22:31
4

You ask about existence of a derivative in a single point, but in title you say continuity.

As for existence, a derivative $f'(a)$ of a real function $f(x)$ at point $x=a$ is defined as a limit $$\lim_{h\to 0} \frac{f(a+h)-f(a)}h$$ The existence (and the value) of the limit determines a derivative at the chosen point, independent on the existence of the limit in any neighborhood of $a$. As others show, there exist functions which are differentiable at a single point only.

However if you ask for continuity, it requires the derivative to be defined (exist) in some neighbourhood of $a$, so that a limit of the derivative exists: $$\lim_{x\to a}f'(x)$$ Then you can ask if a derivative is continuous at $a$. And there are functions (examples given in other answers) with a derivative discontinuous at some point, although existing in a neighborhood of that point.

CiaPan
  • 13,884