# Why should we use the fundamental definition of derivative while checking differentiability?

I have seen in many examples that using the fundamental definition of derivative only gives the correct results while checking for differentiability at a point. But why do we get wrong results while we directly apply the rules of differentiation and taking the limit at the point. Here is an example

$$y = \begin{cases} x^2, &-\infty < x < 1\\ 2x, &1\leq x < \infty \end{cases}$$

If we check the differentiability at the point $$x=1$$ then when we apply the rules of differentiation left hand and right hand derivative becomes same. But by using fundamental definition of derivative it will be different.

But if I am right the rules of differentiation are in fact derived from the fundamental definition of derivative? So both of these should give correct result. Or it seems like I am missing some basic concept.

I have seen same question like this one here. The answer to this question only says it gives wrong result.But it doesn't answer the question of why?

• If you take the limit, you are assuming that the derivative is continuous. But there exist functions that, although differentiable, the derivative is not continuous. I have example in my blog, but unfortunately this entry is written in spanish prohibidoentrarmatematicas.blogspot.com/2018/06/… I have no time to rewrite now, sorry. But I think that the translator of chrome must work well there... Jan 8, 2021 at 15:53
• I've edited your question to display the equation with MathJax. You may find it helpful to look at the edit history and see how your equation was typeset in this case. Jan 8, 2021 at 15:53
• "But by using fundamental definition of derivative it will be different." No, it won't. Write up that "fundamental definition" (lol, there are several) and show how that will be different.
– user436658
Jan 8, 2021 at 15:55
• The function can't be differentiable at 1 as it is not continuous at 1. When using the fundamental limit definition, you should obtain that the limit does not exist. Jan 8, 2021 at 15:57
• @AbhishekPG there's nothing like that on SE, but in most cases you can search the tutorial page and just use the parts you need, instead of reading through everything. For example, searching for piecewise functions gives you this, which doesn't require too much syntax to implement. Jan 8, 2021 at 16:45

The issue here is that the derivative $$y'(1)$$ is not defined. I'll start with the definition and then discuss why the differentiation rules don't apply at $$x = 1$$. First, for the derivative to exist at $$x = 1$$, then by definition,the following limit has to exist: $$\lim_{h\to 0}\frac{y(1+h) - y(1)}{h} \tag{1}.$$ Now, in order for $$(1)$$ to exist the left and right limits have to exist and agree. So, we can look at the left and right derivatives:

Right Derivative: $$y'_{+}(1) = \lim_{h\to 0^{+}}\frac{f(1+h) - f(1)}{h} = \lim_{h\to 0^{+}}\frac{2(1+h) - 2}{h} = \lim_{h\to 0^{+}}\frac{2h}{h} = 2$$ There's no trouble there, however we run into problems with the left derivative:

Left Derivative: \begin{align} y'_{-}(1)&=\lim_{h\to 0^{-}}\frac{y(1+h) - y(1)}{h}\\ &= \lim_{h\to 0^{-}}\frac{(1+h)^2 - 2}{h}\\ &= \lim_{h\to 0^{-}}\frac{1 +2h+h^2-2}{h}\\ &= \lim_{h\to 0^{-}}\frac{h^2+2h-1}{h}\\ &= \lim_{h\to 0^{-}}\left(h + 2 - \frac{1}{h}\right)\\ &= \infty \end{align}

So, since the left and right derivatives don't agree, we can say that $$y$$ is not differentiable at $$y = 1$$. As has been pointed out in the comments we could also have concluded that from continuity, because if $$y'(1)$$ had existed, then $$y$$ would need to be continuous at $$x = 1$$, and because it is not we can immediately rule out differentiability there.

Now, to understand why it doesn't work to take the derivatives of $$2x$$ and $$x^2$$ and take a limit, we start by noting that we can certainly write $$y'(x) = \begin{cases} 2x,&-\infty

However, if we were to write $$y'(1) = \lim_{x\to 1}y'(x)$$ we would be making two unfounded assumptions:

First, that $$y$$ is actually differentiable at $$x = 1$$, and so writing $$y'(1)$$ makes sense, and second that $$y'$$ is continuous. We don't know a priori that either of those things are true, and in fact as previously mentioned, we know that $$y'(1)$$ can't exist because $$y$$ isn't continuous at $$x = 1$$.

To give a bit more of an intuitive explanation, remember that the derivative at a point relies on the value of the function at that point. So, when we use $$2x$$ for the derivative on the left, instead of using $$y(1) = 2$$, which lies on the right piece, we're really using $$\lim_{x\to 1^{-}}y(x) = 1$$ on the left piece.

• That makes sense. So that actually means that, to apply the rules of differentiation the function has to be differentiable at the point where we consider? And here i arbitrarily assumed its differentiable and applied the rules of differentiation. Jan 8, 2021 at 16:34

When considering limits, you always have to look at what happens as $$h$$ approaches $$0$$ both from the left hand side and right hand side. The limit $$\lim_{h \to 0}\frac{f(x+h)-f(x)}{h}$$ exists if and only if the left-hand limit and the right-hand limit both exist and are equal.

If $$f(x) = \begin{cases} x^2, &-\infty < x < 1\\ 2x, &1\leq x < \infty \end{cases}$$ then $$\lim_{h \to 0^+}\frac{f(1+h)-f(1)}{h} = \lim_{h \to 0^+}\frac{2+2h-2}{h} = \lim_{h \to 0^+}\frac{2h}{h}=2$$ but \begin{align} \lim_{h \to 0^-}\frac{f(1+h)-f(1)}{h} &= \lim_{h \to 0^-}\frac{(1+h)^2-2}{h} \\ &=\lim_{h \to 0^-}\frac{h^2+2h-1}{h} \\ &= \lim_{h \to 0^-}h+2-\frac{1}{h} \\ &= \infty \, . \end{align}

You can't use the derivative rule $$\frac{d}{dx}(x^2)=2x$$ since $$f(x) \neq x^2$$ when $$x=1$$.

• f(x) is actually 2x when x=1 as per definition. Jan 8, 2021 at 16:44
• @AbhishekPG Yes, that's right. Do you have any questions about my answer?
– Joe
Jan 8, 2021 at 16:46
• I guess whenever you apply the limits to derivative rule, the question doesn't arise whether f(x) is x^2 or 2x at x=1. Because we only need to consider the left and right hand limit to derivative at x=1. And in this case the limit from left of x=1 will then imply the use of f(x)=x^2 and limit from right would imply the use of f(x)=2x as per function definition. Jan 8, 2021 at 17:18
• @AbhishekPG The function only has one value at $x=1$, and that is $2$. It is not possible to imply the use of different values of $f(x)$ depending on which limit we are considering. In fact, the reason that the left-derivative does not exist is because the function isn't continuous at $x=1$, i.e. the anticipated value of $f(x)$ as $x$ approaches $1$ from the left-hand side is not the same as the actual value of $f(x)$ when $x=1$. Differentiable functions are all continuous: if $f$ is differentiable at $x$, then the limit as $h$ approaches $0$ of $f(x+h)-f(x)$ must be equal to $0$.
– Joe
Jan 8, 2021 at 19:17

Hint: Note that in order that $$y=y(x)$$ is differentiable at $$x=1$$ it has to be continuous at $$x=1$$. Here we have \begin{align*} \lim_{x\to 1^{-}}y(x)=\lim_{x\to 1^{-}}x^2&\color{blue}{=1}\\ \lim_{x\to 1^{+}}y(x)=\lim_{x\to 1^{+}}2x&\color{blue}{=2}=y(1) \end{align*} Since the left-side limit of $$y$$ is not equal to the right-side limit of $$y$$ at $$x=1$$ the function is not continuous at $$x=1$$ and can't be differentiable at $$x=1$$. There is no need to apply the fundamental definition of derivatives.