The definition of a derivative is the slope of a function tangent to a point. It is also defined as $$\lim_{h\to0} \frac{f(x+h)-f(x)}{h}$$ If we apply this to $f(x)= |x|$, we get that it is $\lim\limits_{h\to 0} \dfrac{|h|}{h}$, which is undefined. However, if we look at the graph of $|x|$, we see that there can exist a tangent line at x=0, with slope 0. So why is the derivative undefined instead of 0?
-
5@MathN00b: What is your definition of a "tangent line"? :) – Andrew D. Hwang Jan 18 '15 at 20:26
-
A line that touches a function at exactly 1 point in the neighborhood of the function. – Teoc Jan 18 '15 at 20:27
-
1then there are infinitely many tangents for x=0 – Jasper Jan 18 '15 at 20:28
-
1This is not the definition of a tangent line. – Did Jan 18 '15 at 20:28
-
@MathN00b: That's not the usual definition. :) Here's why it's not a "good" definition: If your graph were a horizontal line, say $y = 0$, then every non-horizontal line would be "tangent" by the "touches at one point" criterion. If instead your curve were a parabola, say $y = x^{2}$, then every line whatsoever would be tangent according to "touches at one point (in a neighborhood)". – Andrew D. Hwang Jan 18 '15 at 20:42
-
2@MathN00b: By your definition, any line that crosses a graph would also be considered tangent to it. Informally, a tangent line at a point is the (that is, the unique) line that a graph looks like when you zoom-in really-really-REALLY closely on that point. If the graph doesn't look like a line up-close to a point, then it simply has no tangent there. The graph of $|x|$ doesn't look like a line at $x=0$; no matter how closely you zoom-in on $(0,0)$, the graph will look like a "V". – Blue Jan 18 '15 at 20:43
6 Answers
Let $f(x) = |x|$. For $x > 0$, the gradient is $1$, whereas for $x < 0$, the gradient is $-1$. At $x = 0$, you have infinitely many lines, which are represented by the subgradient $[-1,1]$.
- 3,625
-
-
-
@Did, I've wanted to emphasize the idea of subgradient. I have delete the term "tangent". – Alex Silva Jan 18 '15 at 20:34
-
@Did Sir, please explain why not to use "Infinitely many tangent lines"? If not Infinitely many then how many? Can't saying that, there is no tangent line implies there is No right hand and No left hand derivative at that point? (But clearly i think both right hand derivative and left hand derivative exists at $x=0$ for f(x)=|x|$) elaborate please. – Akash Patalwanshi Dec 11 '20 at 15:47
The following expressions could all be "tangent" lines of $|x|$ at $x=0$ if one were to use a naive definition of tangent: \begin{align} y_1(x) &= \frac12x\\ y_2(x) &= 0\\ y_3(x) &= -\frac13x \end{align} since they all have exactly the point $(0,0)$ in common with $|x|$. So the derivative of $|x|$ at $x=0$ should be $1/2$, $0$, and $-1/3$?
A tangent line only really makes sense as a limit of secant lines which you see by your limit does not make sense for $|x|$ at $x=0$.
By the way, the weak derivative of $|x|$ is actually the function you described, which is $-1$ when $x<0$, $0$ when $x=0$, and $1$ when $x>0$.
- 13,304
Consider $f(x)=x$ and $f(x)=-x$ separately. Clearly the equation of the derivative has a discontinuity at $x=0$.
- 19,395
-
Yes, but why is it not defined to be $0$ at $x=0$? With the limit definition I see it does not exist, but not with the slope of tangent definition. – Teoc Jan 18 '15 at 20:26
-
It is $0$ at $f(x)=0$. This doesn't solve the discontinuity problem. Why the downvote by the way? – Alex Jan 18 '15 at 20:27
-
I meant the derivative at $x=0$ And it is because it does not answer my question. – Teoc Jan 18 '15 at 20:28
-
I think it does. The function in your question is not differentiable at $x=0$ because the derivative is not continuous at $x=0$, hence the derivative does not exist. – Alex Jan 18 '15 at 20:29
-
http://math.stackexchange.com/questions/281601/why-is-the-derivative-of-fracxx-equal-to-emptyset-at-x-0 – Alex Jan 18 '15 at 20:30
-
@MathN00b The tangent definition requires a unique tangent. Can you draw a unique tangent line at $x = 0 $? – user141592 Jan 18 '15 at 20:30
-
2"The function in your question is not differentiable at x=0 because the derivative is not continuous at x=0, hence the derivative does not exist." Ouch! The derivative function could have a jump and still exist at the location of the jump. – Did Jan 18 '15 at 20:31
-
-
In fact when you combine this with http://en.wikipedia.org/wiki/Darboux%27s_theorem_%28analysis%29, it becomes a correct anwswer: derivatives can have discontinuities, but not "jump" (or "simple") discontinuities. – Pete L. Clark Feb 04 '15 at 04:55
-
Derivative at a point is a limit at a point. Limit at a point exists when $\lim_{x \to a{-}} = \lim_{x \to a^{+}}$. In this case $\lim_{x \to a{-}} \neq \lim_{x \to a^{+}}$, so the limit at this point doesn't exist, so the derivative at the point doesn't exist. – Alex Feb 04 '15 at 10:15
$f(x)=|x|=\begin{cases} x \text{ if } x>0\\ 0 \text{ if } x=0\\ -x \text{ if } x<0 \end{cases}$
$\lim_{x\to 0^-}\frac{|x|}{x}=\lim_{x\to 0^-}=\frac{-x}{x}=-1$ but similarly if we check the right hand limit, we see that we get $\lim_{x\to 0^+}\frac{|x|}{x}=1$, and since $1\neq -1$, we don't have have a derivative at the point $x=0$.
- 11,194
-
Yes, but why is it not defined to be $0$ at $x=0$? With the limit definition I see it does not exist, but not with the slope of tangent definition. – Teoc Jan 18 '15 at 20:27
-
You might want to see this: http://math.stackexchange.com/questions/166474/why-is-a-function-at-sharp-point-not-differentiable – Sujaan Kunalan Jan 18 '15 at 20:30
What does "tangent line" mean? Intuitively, it means a line that provides a good linear approximation to the function near that point. More precisely, suppose $f: \mathbb{R} \to \mathbb{R}$ is a function, $L: \mathbb{R} \to \mathbb{R}$ is a function whose graph is a line, and $p \in \mathbb{R}$ is a point. We say "$L$ is tangent to $f$ at $p$" if and only if, as $x \to p$, we have $$ f(x) = L(x) + o(x - p). $$ In other words, the difference between $f(x)$ and $L(x)$ shrinks faster than linearly as $x$ approaches $p$. (One can check that this is equivalent to the usual definition of derivative; however, this formulation also generalizes more readily to higher dimensions.)
The reason $f(x) = \lvert x \rvert$ has no tangent line at $x = 0$ is that there is no such "good linear approximation". For example, consider the line $L(x) = 0$ with slope zero: we have $f(x) - L(x) = \lvert x \rvert$, which shrinks linearly as $x$ approaches zero. Similarly, if we chose $L(x) = -x$, then we'd have $f(x) - L(x) = \lvert x \rvert + x$, which is equal to $2x$, a linear function, for $x > 0$.
- 5,284
If you draw the graph of the equation, you will get a v-shaped configuration with the vertex located at x=0, y=0.
If you try to put a tangent at that vertex point, you will see that the line can take on one of innumerable slopes and still be "touching at one point". It's undefined.
- 329
-
6"If you try to put a tangent at that vertex point, you will see that the line can take on one of innumerable slopes and still be "touching at one point"" That's true also for $f(x) = x^3$ at $x = 0$. So your argument is unconvincing. – Pete L. Clark Jan 20 '15 at 02:14
-
No Peter. You are wrong. dy/dx would be 3x^2. At x=0 there is one and only one tangent. That would be a tangent with slope = 0 – Inquisitive Jan 20 '15 at 02:26
-
7First, please do not call me "Peter". Second: the point of my comment is that the function I gave has a tangent line but satisfies the property that I quoted: namely, there is more than one line passing through the point $(0,0)$ which intersects the curve at only one point. Therefore this "touching at one point" business cannot be the definition of the tangent line. For another kind of counterexample, consider $f(x) = x^2 \sin(1/x)$. – Pete L. Clark Jan 20 '15 at 02:55
-
Well, this OP seems to be having trouble seeing the difference between physical reality and pure mathematics. I think the OP is trying to reconcile a pure math concept with physical reality. – Inquisitive Jan 20 '15 at 03:11