Main content

## Differential Calculus

### Course: Differential Calculus > Unit 2

Lesson 5: Differentiability- Differentiability and continuity
- Differentiability at a point: graphical
- Differentiability at a point: graphical
- Differentiability at a point: algebraic (function is differentiable)
- Differentiability at a point: algebraic (function isn't differentiable)
- Differentiability at a point: algebraic
- Proof: Differentiability implies continuity

© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Differentiability at a point: algebraic (function is differentiable)

Sal analyzes a piecewise function to see if it's differentiable or continuous at the edge point. In this case, the function is both continuous and differentiable.

## Want to join the conversation?

- Why isn't this an example of the non-differentiable "sharp turn" discussed in the Differentiability at a Point: Graphical video?(50 votes)
- Not all piecewise functions are sharp turns. In this case, if we compute the limit that defines the derivative, from both sides of 3, we find that the two limits are equal. This means that the slope of the tangent is equal from both sides, so the derivative exists.(37 votes)

- I feel like, even though I've watched all videos in this section up to this point, some of this came way out of left field. In which video can we find the difference between x---> 0, h---> 0, x--->3, etc? This video also seems to be talking about two different types of limits (limits to what y can equal, limits to what the slope can equal?). Where did this come from?(14 votes)
- Yes, two different limits are mentioned in the video. One is to check the continuity of f(x) at x=3, and the other is to check whether f(x) is differentiable there.

First, check that at x=3, f(x) is continuous. It's easy to see that the limit from the left and right sides are both equal to 9, and f(3) = 9.

Next, consider differentiability at x=3. This means checking that the limit from the left and right sides of f'(x) are both equal. In this case, they are both equal to 6. Therefore f(x) is differentiable at x=3.(10 votes)

- At2:40, can u describe the "equation" for the Differentiability? Why do u write (x-3) under there?(13 votes)
- Sal is giving the equation for the "Formal definition of the derivative", see: https://www.khanacademy.org/math/differential-calculus/derivative-intro-dc/formal-definition-of-derivative-dc/v/alternate-form-of-the-derivative

One of the criteria for a function to be differentiable at a point is that the function must have the same derivative (slope) when coming from the left and right — this is what Sal is demonstrating starting at2:40.(6 votes)

- How can we know that this is not a "sharp turn"? This is similar to the top comment but I don't think the replies really answer this question.(8 votes)
- A sharp turn can be visualized by imagining the tangent line of either side of the "apex" of the turn (i.e. the tip/point of the sharp turn).

If you imagine the tangent to the "left" and "right" of that point, you'll see the tangent lines don't smoothly touch each other. Imagine a smooth hill now, of a function that CAN be differentiated, if you imagine those tangent lines as they get closer to the top of the hill they begin to "line up" with each other, and finally meet horizontally!

The real way to check this is to see what the slope of each tangent line is from either side. Normally we take the limit x-> c+ and limit x->c- (to represent approaching from the right and left respectively). If these limits are not equal, then we are getting 2 different slopes at a single point for the tangent line! Obviously this isn't what we want, which slope/tangent line would we choose?! Which limit would we choose? We cannot definitively say that it is due to a sharp turn, but it doesn't matter, this method works whether there's a sharp turn or other discontinuity! The way to tell for sure would be to see if the function is continuous. If it is continuous function (like f(x) = |x|) AND the limits don't work from either side (like f(x) = |x|), then it's a sharp turn! Can you prove/see why?(8 votes)

- It is not fully clear where the differentiability requirement is coming from(5 votes)
- I'm not quite sure what you mean by the differentiability requirement. I'm guessing you're asking how Sal knows that it's differentiable at that point.

A piecewise function is differentiable at a point if both of the pieces have derivatives at that point, and the derivatives are equal at that point. In this case, Sal took the derivatives of each piece: first he took the derivative of x^2 at x=3 and saw that the derivative there is 6. Then, he took the derivative of 6x-9 at x=3, and saw that the derivative there is also 6.

It might be more clear after you watch the next video, where he shows an example that is not differentiable.(8 votes)

- Wait, he gets 9 from the same formula he then subtracts 9 from later, why is this not just turning into (9-9)/(3-3) over and over?(3 votes)
- That's why he factors the enumerator and cancels the
`(x-3)`

!`(9-9)/(3-3) = undefined`

, and you can't have that. So, by cancelling factors, Sal is able to sidestep the undefined values and finish solving the equation.

(This is an example of a removable discontinuity. There is a hole when`x = 3`

, but the limit at`x = 3`

exists, so you can still take the derivative.)

I hope this helps!(7 votes)

- Do we actually need to test for continuity? If we find that the function is differentiable at x=3, doesn't it automatically follow that it is continuous at x=3?(3 votes)
- a) Yes, you actually need to test for continuity as not
*all*continuous functions are derivable.

b) Yes, derivability implies continuity but not the other way around.(3 votes)

- I have done examples and practice problems where you just differentiate the function as it is, without thinking about either side. Why is this different? Is it because it because it might not be continous? but we already see the it is. Why have I done practice problems where I don't check for differentiability from both side, and now I am doing it from both sides. Is this method just better practice?(3 votes)
- differentiation is defined from the first principles of differentiation which involves a limit.

So you need sure that limit exists to ensure the function is differentiable.

The function also needs to be continuous for it to be differentiable because of the definition.(2 votes)

- Why did coming from the left use X = 3 when clearly it says x UNDER 3?(3 votes)
- Because it is under and equal three. He uses the equal to verify what x=3 should be equal to, and then he verifies what x=3 would be coming from the right and the left.(2 votes)

- at3:00where does the x-3 on the bottom of the equation to come from?(3 votes)
- limit as x -> h of (f(x)-f(h))/(x-h) is another way of writing out the differentiation of a function. Instead of the limit of h-> 0 notation. There's a video on here where he introduces that.(2 votes)

## Video transcript

- [Voiceover] Is the function given below continuous slash
differentiable at x equals three? They've defined it piece-wise, and we have some choices. Continuous, not differentiable. Differentiable, not continuous. Both continuous and differentiable. Neither continuous not differentiable. Now one of these we can knock
out right from the get go. In order to be differentiable
you need to be continuous. You cannot have differentiable
but not continuous. So let's just rule that one out. And now let's think about continuity. So let's first think about continuity. And frankly, if it isn't continuous, then it's not going to be differentiable. So let's think about it a little bit. So in order to be continuous, f of ... Using a darker color. F of three needs to be equal to the limit of f of x as x approaches three. Now what is f of three? Well let's see, we've fallen
to this case right over here, because x is equal to
three, so six times three is 18, minus nine is
nine, so this is nine. So the limit of f of x
as x approaches three needs to be equal to nine. So let's first think about the limit as we approach from the left hand side. The limit as x approaches three. X approaches three from the
left hand side of f of x. Well when x is less than three we fall into this case, so f of x is just going to be equal to x squared. And so this is defined and continuous for all real numbers, so we can just substitute the three in there. So this is going to be equal to nine. Now what's the limit of as we approach three from the right hand side of f of x? Well as we approach from the right, this one right over here is f of x is equal to six x minus nine. So we just write six x minus nine. And once again six x minus nine is defined and continuous for all real numbers, so we could just pop a three in there and you get 18 minus nine. Well this is also equal to nine, so the right and left hand, the left and right hand limits both equal nine, which is equal to the value
of the function there, so it is definitely continuous. So we can rule out this
choice right over there. And now let's think
about differentiablity. So in order to be differentiable ... So differentiable, I'll
just diff-er-ent-iable. In order to be differentiable the limit as x approaches three of
f of x minus f of three over x minus three needs to exist. So let's see if we can evaluate this. So first of all we know
what f of three is. F of three, we already evaluated this. This is going to be nine. And let's see if we can
evaluate this limit, or let's see what the
limit is as we approach from the left hand side
or the right hand side, and if they are approaching the same thing then that same thing that they
are approaching is a limit. So let's first think about the limit as x approaches three
from the left hand side. So it's over x minus three,
and we have f of x minus nine. But as we approach from
the left hand side, this is f of x, as x is less than three, f of x is equal to x squared. So this would be instead of f of x minus 9 I'll write x squared minus
nine, and x squared minus nine. This is a difference of squares, so this is x plus three
times x minus three, x plus three times x minus three. And so these would cancel out. We can say that is
equivalent to x plus three as long as x does not equal three. That's okay because we're
approaching from the left, and as we approach from the left x plus three is defined
for all real numbers, it's continuous for all real numbers, so we can just substitute
the three in there. So we would get a six. So now let's try to evaluate the limit as we approach from the right hand side. So once again it's f of
x, but as we approach from the right hand side,
f of x is six x minus nine. That's our f of x. And then we have minus f
of three, which is nine. So it's six x minus 18. Six x minus 18. Well that's the same thing
as six times x minus three, and as we approach from the right, well that's just going to be equal to six. So it looks like our
derivative exists there, and it is equal to limit
as x approaches three of all of this because
this is equal to six, because the limit is
approached from the left and the right is also equal to six. So this looks like we are both continuous and differentiable.