1

So I came across this question and have encountered pretty similar questions to this and I always have had found it difficult to understand this. One way to think about differentiability is to find whether the following limit exists and is finite,

$$\lim_{x\to a} \frac {f (x)-f (a)}{x-a}$$

How I think of differentiability (let me know if I am right) for a function is the function should be smooth ie. no abrupt changes, no cusps or any that kind of thing, which simply imply the following

  1. The function should be continuous, any removable or non-removable discontinuity must not be present as that will imply that the function changed abruptly.
  1. The derivative should be continuous as this would constrain the derivative from changing instantaneously at any point. We see this with modulus function which is not differentiable at zero since the derivative is discontinuous at zero.

So I often stumble upon functions like $\sin\left({\frac{1}{x}}\right)$, and I become a bit confused. I know that this function is not differentiable at $0$, since the $\lim_{x\to 0}\frac{\sin\left({\frac{1}{x}}\right)}{x}$ isn't finite as the numerator keeps oscillating between $0$ and $1$ and this rapid changing of the curve makes it non-differentiable at $0$.

But what I don't understand whether $\sin\left({\frac{1}{x}}\right)$ is differentiable at $0^{+}$ or $0^{-}$ ?

I am reframing my question, my confusion is due to the fact that, we say the limit of the function doesn't exist when $x\to 0$ but if I correctly understand the idea that $x$ approaching zero convey is simply that x goes closer and closer to zero (if I got this wrong correct me) without actually going to zero else the denominator would be zero. So we are apparently saying that the above function is non-differentiable at values ever so slightly greater or less than zero (depending upon which side you approach to zero on the number line) the reasoning being that the function is changing very rapidly. But if one carefully observes, the function is continuous at all the values except for $0$, also the derivative is continuous for that, so the above two criterion are fulfilled and the function should be differentiable at $0^{+}$ if not at $0$. So where did I go wrong?

  • 1
    At any $x\neq0$, the function is differentiable, since it's a differentiable function of a differentiable function. Use the chain rule to compute the derivative, and you'll see that the derivative oscillate increasing quickly as $x\to0$ and that it may be arbitrarily large in absolute value. – saulspatz May 06 '21 at 21:43
  • What do you mean that you can calculate the limit for values close to zero? $\lim\limits_{x\to 0.0000000000001}\ldots $? Then note, that $0.00000000000001$ is „far away“ from $0$. – Hirshy May 06 '21 at 21:43
  • @Hirshy I mean the smallest value of this set (0,1] – caramalizedTomato May 06 '21 at 21:47
  • The set $(0,1]$ has no smallest value. – Xander Henderson May 06 '21 at 21:48
  • The set $(0,1]$ does not have a smallest value, that is basically what I meant with „far away“ from 0. Whatever smallest value you come up with, I can think of an even smaller value. – Hirshy May 06 '21 at 21:49
  • @saulspatz yes I get your point but how close should one get to zero so as to say that the function becomes non-differentiable? – caramalizedTomato May 06 '21 at 21:49
  • @buddy001 The function is differentiable everywhere other than zero. You have to get "zero close to zero" in order to see the nondifferentiablity. – Xander Henderson May 06 '21 at 21:50
  • The function is differentiable everywhere except $0$. – saulspatz May 06 '21 at 21:50
  • 1
    Are you required to use the definition of the derivative? It is easy to see that, for x not 0, the derivative is cos(1/x)(-1/x^2) which exist for all x not 0. And sin(1/x) itself is not defined at x= 0. So sin(1/x) is differentiable for all x except x= 0. – user247327 May 06 '21 at 21:52
  • @Hirshy that is the problem I am facing, one can go all the way to zero but if not at zero, the function is said to be differentiable. – caramalizedTomato May 06 '21 at 21:56
  • @buddy001 Differentiability is a local property---it is defined pointwise. If you pick any number $a$ other than zero, the function $x \mapsto \sin(1/x)$ is differentiable at $a$. Thus the set of points at which $f$ is differentiable is $\mathbb{R} \setminus {0}$. The function is differentiable everywhere, except $0$. No limits required (aside from those in the definition of the derivative). – Xander Henderson May 06 '21 at 22:06
  • You can try to evaluate it using the symmetric derivative – Тyma Gaidash May 06 '21 at 22:14
  • 2
    Your counterexample is not good. the function $ x\mapsto \sin(\frac 1x) $ is not even continuous at $ 0 $ and we cannot speak about differentiability. We can consider $ x\sin(\frac 1x) $ which is continuous but not differentiable at $ 0 $. We cannot define a tangent line to the curve at this point. Also, this function is even, and differentiability at $ 0^+ $ or $ 0^- $ is the same thing. – hamam_Abdallah May 06 '21 at 21:50
  • @XanderHenderson It is the first time, someone conveted my answer to a comment. Who is allowed to do so. – hamam_Abdallah May 06 '21 at 22:50
  • @hamam_Abdallah Any diamond moderator or community moderator (SE staff) can convert an answer to a comment. – Xander Henderson May 06 '21 at 22:57
  • @XanderHenderson Ok. I see now. – hamam_Abdallah May 06 '21 at 23:01
  • The function isn't even defined at $x=0$, so of course it can't be differentiable there (and it can't have one-sided derivatives either)... – Hans Lundmark May 07 '21 at 04:57
  • @HansLundmark I am not able to understand as there are comments that say just the opposite, if you could write an answer it would be great. Also I edited my question, see if it portrays my confusion better. – caramalizedTomato May 07 '21 at 08:06
  • OK, I added an answer. Let's see if it makes things any clearer... – Hans Lundmark May 07 '21 at 09:09

3 Answers3

1

The derivative exists for any $x \neq 0$, and is given by the chain rule: $$ f'(x) = \cos(1/x) \cdot (-1/x^2) ,\qquad x \neq 0 . $$ But the derivative at $x=0$ does not exist, and neither do the one-sided derivatives. To investigate them, you must look at the one-sided limits $$ \lim_{h \to 0^\pm} \frac{f(h)-\color{red}{f(0)}}{h} , $$ which involve the number $f(0)$, which is undefined for our function $f$. So the limits don't exist, for the very trivial reason that the expression whose limit we are supposed to investigate doesn't exist to begin with!

Let me elaborate a little. As I think you know, when we compute the derivate of $f$ at some point $a$, what we do geometrically is to look at the slope of a line through two points on the curve $y=f(x)$, namely the “fixed” point $(x,y)=(a,f(a))$ and the “moving” point $(x,y)=(a+h,f(a+h))$ where $h \neq 0$, and see what happens to the slope of that line as $h \to 0$ (when the moving point moves along the curve to approach the fixed point). But if there is no point $(a,f(a))$ to begin with, you don't have anywhere to “attach” that line, so it doesn't even make sense to ask the question about what the slope of the curve is just there.

Another question that you could ask is whether the function $$ g(x) = \begin{cases} \sin(1/x),& x \neq 0,\\ A,& x=0, \end{cases} $$ would be differentiable at $x=0$ for some suitable value of $A$. (Now the number $g(0)=A$ exists, so at least we have some nontrivial limit to investigate, unlike the previous case where $f(0)$ was simply undefined.) However, this is also not the case, since whatever value you choose for $A$, the function $g$ is discontinuous at the origin (since $0$ is in the domain of $g$, but $\sin(1/x)$ doesn't have a limit there), and then $g'(0)$ cannot exist, by the well-known theorem that differentiability implies continuity.

It's also true that the limits $$ \lim_{x \to 0^\pm} f'(x) = \lim_{x \to 0^\pm} \bigl( \cos(1/x) \cdot (-1/x^2) \bigr) $$ do not exist for our function $f$, but that's a different question. In that case, for each $a \neq 0$ you do the above investigation with the line between a fixed point and a moving point, so that you know what the slope is at any point $a \neq 0$, and after you've done that, you see what happens to the slope as $a \to 0$. But that does not necessarily give the same result as attaching the line to the fixed point $(x,y)=(0,f(0))$ (if there is such a point) and investigating what happens when the moving point approaches that point. (Although if you add some additional assumptions, it actually does; see for example this question and its countless duplicates.)

Hans Lundmark
  • 53,395
  • But going through those questions, I guess only assumption I could get was that the function should be defined at the point at which we are trying to find the derivative which was already visible from your answer but I just can't see the others so immediately, it would be great if you could point them as well. – caramalizedTomato May 08 '21 at 20:27
  • 2
    The assumptions are right at the beginning of the question I linked to: the function should be not only defined but also continuous at the point in question, and the limit of its derivative as you approach that point should exist. – Hans Lundmark May 09 '21 at 04:53
0

$0^+$ refers to a limit as you approach $0$ from the right.

So taking a value $a$, we can calculate the derivative there, and then try to take the limit as $a \to 0^+$.

$$\lim_{h \to 0} \frac{f(a+h)-f(a)}{h} = \lim_{h \to 0} \frac{\sin(1/(a+h))-\sin(1/a)}{h}$$ which, using more calculus, gives $$-\frac{1}{a^2}\cos(\frac{1}{a})\cdot$$ which oscillates more and more wildly as $a \to 0^+$ and so does not have a limit.

RobertTheTutor
  • 7,415
  • 2
  • 10
  • 34
  • It doesn't blow up as $a\to0^+$. It oscillates. On the sequence $\frac2\pi,\frac2{3\pi},\frac2{5\pi},\dots$ it goes to $0$. – saulspatz May 06 '21 at 21:54
  • @saulspatz Well, it does both. – RobertTheTutor May 06 '21 at 21:55
  • I am having difficulty understanding the question (the asker has not really done a good job of explaining what their confusion is, despite a lot of interaction in the comments). As such, I am really uncertain about how your answer addresses the question. It might be better to seek clarification from the asker before answering, as it is highly likely that the question will later be edited to aid clarity. – Xander Henderson May 06 '21 at 22:07
  • 1
    Derivatives don't need to be continuous. This doesn't address differentiability at $0$. – Umberto P. May 06 '21 at 22:09
  • @UmbertoP. But the question asks about the derivative of $f$ at $0^+$, which implies $\lim_{x\searrow 0} f(x)$. The question is unclear, and one possible interpretation of the question gives rise to this answer. – Xander Henderson May 06 '21 at 22:35
  • @XanderHenderson the left- and right-derivatives of a function are well defined and also aren't the limits of the derivatives from either side. – Umberto P. May 07 '21 at 00:28
  • 1
    @UmbertoP. Indeed, the asker could be asking about Dini derivatives for all I know. My real point is that the question is not clear, and that the answer here is not obviously not an answer to the question, as the asker has not really done a good job of explaining what their misunderstanding is. – Xander Henderson May 07 '21 at 00:31
  • @XanderHenderson I agree. I will vote to close the question. – Umberto P. May 07 '21 at 00:34
  • @UmbertoP. I've edited my question, does it make my confusion clear now? Also you said that the limits of the derivatives from either sides are well defined then why the answers differ from this this is exactly my confusion so as to which argument is correct. – caramalizedTomato May 07 '21 at 08:00
0

Take $\xi=\frac1x$, then $f(x)=\frac{sin({\frac 1x})}{x}=\xi\sin(\xi)=g(\xi)$ and $x\to 0^\pm\implies \xi\to\pm\infty$

So, your question is equivalent to asking if $g$ is differentiable at $\pm \infty$.

Slightly abusing notation, $g(\pm\infty)=\lim_{\xi\to\pm\infty} \xi\sin(\xi)$ does not exist. This is because periodic functions do not have infinite limits. I attached the graph below, you can see the function oscillates between $\pm\infty$ on both sides.

Graph of g

However, so long as $\xi$ is finite, $g$ is defined, and we can show the derivative exists. This in turn means that $f$ is defined and differentiable for every $x\neq 0$.

Rhys Hughes
  • 12,842
  • I am having difficulty understanding the question (the asker has not really done a good job of explaining what their confusion is, despite a lot of interaction in the comments). As such, I am really uncertain about how your answer addresses the question. It might be better to seek clarification from the asker before answering, as it is highly likely that the question will later be edited to aid clarity. – Xander Henderson May 06 '21 at 22:07
  • I took "But what I don't understand whether $\sin\left({\frac{1}{x}}\right)$ is differentiable at $0^{+}$ or $0^{-}$?" as the question. My answer resolves that as a no, because you can't determine the limit in either case. I introduce $\xi$ because the graph of $f$ is a jumbled mess around $0$, while its much easier to see that the infinite limits of $g$ are indeterminate – Rhys Hughes May 06 '21 at 22:18
  • @RhysHughes It is indeed what I what my question is. – caramalizedTomato May 06 '21 at 22:22
  • @buddy001 Does my answer make sense to that end? – Rhys Hughes May 06 '21 at 22:33
  • It does, it is actually one way I look at it, I've edited my question because it was not very clear what my confusion is so if you could give it a read again. – caramalizedTomato May 07 '21 at 08:01