2
$\begingroup$

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?

$\endgroup$
6
  • 5
    $\begingroup$ @MathN00b: What is your definition of a "tangent line"? :) $\endgroup$ Jan 18, 2015 at 20:26
  • $\begingroup$ A line that touches a function at exactly 1 point in the neighborhood of the function. $\endgroup$
    – Teoc
    Jan 18, 2015 at 20:27
  • 1
    $\begingroup$ then there are infinitely many tangents for x=0 $\endgroup$
    – Jasper
    Jan 18, 2015 at 20:28
  • 1
    $\begingroup$ This is not the definition of a tangent line. $\endgroup$
    – Did
    Jan 18, 2015 at 20:28
  • 2
    $\begingroup$ @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". $\endgroup$
    – Blue
    Jan 18, 2015 at 20:43

6 Answers 6

6
$\begingroup$

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]$.

$\endgroup$
4
  • $\begingroup$ Ah I see, thanks for clarifying $\endgroup$
    – Teoc
    Jan 18, 2015 at 20:29
  • $\begingroup$ Replace "infinitely many tangent lines" by "no tangent line". $\endgroup$
    – Did
    Jan 18, 2015 at 20:30
  • $\begingroup$ @Did, I've wanted to emphasize the idea of subgradient. I have delete the term "tangent". $\endgroup$
    – Alex Silva
    Jan 18, 2015 at 20:34
  • $\begingroup$ @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. $\endgroup$ Dec 11, 2020 at 15:47
2
$\begingroup$

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$.

$\endgroup$
1
$\begingroup$

Consider $f(x)=x$ and $f(x)=-x$ separately. Clearly the equation of the derivative has a discontinuity at $x=0$.

$\endgroup$
10
  • $\begingroup$ 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. $\endgroup$
    – Teoc
    Jan 18, 2015 at 20:26
  • $\begingroup$ It is $0$ at $f(x)=0$. This doesn't solve the discontinuity problem. Why the downvote by the way? $\endgroup$
    – Alex
    Jan 18, 2015 at 20:27
  • $\begingroup$ I meant the derivative at $x=0$ And it is because it does not answer my question. $\endgroup$
    – Teoc
    Jan 18, 2015 at 20:28
  • $\begingroup$ 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. $\endgroup$
    – Alex
    Jan 18, 2015 at 20:29
  • 2
    $\begingroup$ "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. $\endgroup$
    – Did
    Jan 18, 2015 at 20:31
1
$\begingroup$

$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$.

$\endgroup$
2
  • $\begingroup$ 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. $\endgroup$
    – Teoc
    Jan 18, 2015 at 20:27
  • $\begingroup$ You might want to see this: math.stackexchange.com/questions/166474/… $\endgroup$ Jan 18, 2015 at 20:30
1
$\begingroup$

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$.

$\endgroup$
-5
$\begingroup$

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.

$\endgroup$
4
  • 6
    $\begingroup$ "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. $\endgroup$ Jan 20, 2015 at 2:14
  • $\begingroup$ 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 $\endgroup$ Jan 20, 2015 at 2:26
  • 7
    $\begingroup$ First, 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)$. $\endgroup$ Jan 20, 2015 at 2:55
  • $\begingroup$ 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. $\endgroup$ Jan 20, 2015 at 3:11

You must log in to answer this question.

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