in this video i want to talk about continuity and differentiability so what's the basic idea behind continuity let's start with that so let me give you a graphical example so looking at this graph would you say it's continuous or discontinuous on the interval from a to b as you can see there's no breaks there's no jumps this graph connects from a to b there's no missing points so we could say that f of x is a continuous function from a to b now what are some examples of functions that are not continuous so let's call this a b and c so on the interval from a to c notice that we have a jump discontinuity as you can see there is no connection between the left part of the graph and the right part of the graph therefore this is a discontinuous function it's not continuous now there are some other types of discontinuities that you need to be familiar with so this type of discontinuity at point c is known as a hole so that's a type of removable discontinuity the jump discontinuity is a non-removable discontinuity and another one you need to be familiar with is the infinite discontinuity which usually occurs at a vertical asymptote as you can see this side goes all the way up to positive infinity and this side goes down to negative infinity so for example let's say if you have a rational function like 1 over x minus 2. x cannot equal 2 because this function will be undefined you'll have a 0 in the denominator and so you're gonna have a vertical asymptote at x equals two and that's going to be a point of discontinuity so anytime you have a vertical asymptote it's discontinuous at that point so those are some examples of functions that are not continuous now what about differentiability what's the main idea behind that continuity tells us if the original function f of x if it's continuous or discontinuous at some point differentiability tells us if the first derivative if it's continuous or not so differentiability describes the continuity of the first derivative function so let me give you some examples some graphical examples where a function may be continuous but not differentiable but let's look at our first example so we said this is a continuous function from a to b there's no breaks in the graph now notice that the curve is smooth everywhere from a to b there's no sharp turns when you see that that means that it's differentiable everywhere the slope doesn't change erratically anytime you see a smooth graph that means it's differentiable everywhere on in this function so that means that the first derivative f prime of x where this is f x is continuous on the interval from a to b now let's move on to our next example and let's focus on this function the absolute value of x so the graph is basically the shape of a v so notice that this function is continuous we don't have any holes no jump discontinuities or infinite discontinuities so f of x is continuous everywhere on the interval from negative infinity to infinity but now is it differentiable notice that we have a sharp turn at x equals zero the slope changes instantly from negative one to one so what is the slope at this point there is no slope at that point so that means that it's not differentiable at x equals zero which means that the first derivative is not continuous at x equals zero now what we're going to do is we're going to break this function into a piecewise function so on the right side we have the graph of positive x and the left side is negative x so it's x when x is greater than zero and negative x when x is less than zero and when x is equal to zero the y value of this function is zero so we could describe the absolute value of x using this piecewise function now what about f prime of x we know that the derivative of positive x is one and the derivative of negative x is negative one what about at x equals zero what's the slope so we can clearly see that the slope of the right side is equal to one and the slope on the left side is negative one and so if we plot f prime of x we're going to get a graph that looks like this so here's 1 and negative 1. so on the right side where x is greater than zero the slope is going to be one and it's always one so we're going to have a horizontal line and for the left side the slope is negative one now we don't know what the slope is at zero looking at this v shape graph the slope changes instantaneously from negative one to one it doesn't go through negative point five negative point two zero or point three they just change instantaneously from negative 1 to 1. so that means that we really don't have a derivative value at this point so it's not differentiable so we don't know what this is at x equals 0. we can't really see that the derivative of zero is zero we know that it is but looking at the graph we don't have a slope of zero at this point a slope of zero will be a horizontal line and this doesn't look like a horizontal line at x equals zero so we can't really put a number here therefore we could say that it's not differentiable at x equals zero because we don't have a derivative value at that point and we can see that f prime of x it's not continuous at x equals zero so differentiability describes the continuity of the first derivative function now what i like to do at this point is give you some practice problems consider the piecewise function f of x which is x squared when x is less than zero and x plus two when x is equal to or greater than zero is the function continuous at x equals zero and is it differentiable at x equals zero so how can we find the answer to that question feel free to pause the video and try so let's talk about the continuity first in order for a function to be continuous we need to make sure that the left side and the right side of limits are equal to each other at 0. so what is the limit as x approaches zero from the left to the left of zero we need to use this portion of the piecewise function so that's gonna be zero squared and that's zero now what about the right side of zero the limit as x approaches zero from the right so we need to use this part of the function and so it's going to be zero plus two which is two so notice that the left side and the right side they don't equal to each other which means that the limit as x approaches 0 from either side it does not exist so if the limit doesn't exist you don't have a continuous function and if the function is not continuous at x equals zero it's automatically not differentiable at x equals zero now let's go ahead and graph the piecewise function so we could see that the function is clearly not continuous at x equals zero so i'm going to graph these two separately at first so y equals x squared is a parabola that opens upward and so it looks like this and y equals x plus two it's a linear function so it's a straight line the y-intercept is 2 and the slope is 1. so we have the point 0 2 and with a slope of 1 there's a 1 in front of the x you need to go one to the right and then up one to get the next point so the next point is going to be at 1 3 and then 2 4 and so we have this straight line now to put these two together we need to use x squared only for the left side of zero so we're gonna use just this portion of the graph and then we're gonna use the right side of this graph now let's focus on this graph x squared so x is less than zero which means that we're going to have an open circle at zero and then it's going to go towards the right like that and then here we have a closed circle because it includes zero so if we plug in zero into x plus two you're going to get two so let's say two is over here and then it's going to go up with a slope of one so it's going to go up at a 45 degree angle and as you can see it's clearly not a continuous function we have a jump discontinuity at x equals zero so if the y values are not the same it will not be continuous so a quick test for continuity is to plug in these values into these functions so if you plug in zero into x squared you're gonna get zero if you plug in zero here you're gonna get two because the y values are different at this x value it will not be a continuous function now let's talk about differentiability so we know that if it's not continuous it's not differentiable and looking at the slopes you can see the slopes are clearly different the slope for this graph is 1 and the slope at this region this is it looks like a horizontal tangent so the slope is zero if the slopes are not the same it's not going to be differentiable so we don't have to find the first derivative because if it's not continuous it's automatically not differentiable now let's move on to our next example so let's say that f of x is equal to x when x is less than or equal to one and it's equal to x cubed when x is greater than one so let's determine the continuity of this piecewise function first so let's evaluate the limit as x approaches one from the left side so we need to use x so if we plug in one into x that's going to be just one and then for the right side we need to use x cubed so that's going to be one to the third power which is one so notice that the left side and the right side of limits they're the same so that tells us that the limit as x approaches one from either side exists it's equal to one now we need to make sure the function is defined at one because if these two limits exist and if the function is equal to a value other than one you can get this situation you can get a hole with a point above the hole or below the hole and that would be a removable discontinuity but this is a good first step for the functions being continuous so what is the value of f of one x is equal to one in this region because this is less than or equal to one so that's just going to be one so we can say that the limit as x approaches one of f of x is equal to f of one this is the three-step continuity test so we could say that the function is indeed continuous at x equals one so what about the differentiability of the function is the first derivative continuous at x equals one we have to find out it may or may not be continuous so let's determine if it is so let's start with f prime of x and the derivative of x is one and the derivative of x cube using the power rule is three x squared so what is the limit as x approaches one on the left side for f prime of x so we need to use this and so that's equal to one and the limit as x approaches 1 from the right for f prime of x we need to use 3x squared so that's going to be 3 times 1 squared which is 3. so notice that the left sided limit and the right side limit are not the same so therefore that tells us that the first derivative is not continuous at x equals one which means that f of x the original function is not differentiable at x equals one so let's summarize what we have for this problem the original function is continuous at x equals one but the original function is not differentiable at x equals one because the first derivative f prime of x is not continuous at x equals 1. so keep this in mind differentiability describes the continuity of the first derivative now let's go ahead and graph the piecewise function so we could see the answer visually so on the right side we have the graph of x cubed so when x is one y is one and so this graph is just gonna increase like that if you were to draw the whole graph it would look something like this so we only need this portion of the graph let me draw that better it's just going to go up now this graph y equals x is just a straight line at a 45 degree angle well that really doesn't look like a 45 degree angle so let me do that again so it looks something like that now when x is one y is one so we don't need an open circle at this point so as you can see the graph is continuous there's no disconnects there's no jump discontinuities or holes in this graph so the function f of x is continuous everywhere in this uh graph now looking at the first derivative it's not technically smooth my drawing doesn't show it too well so i'm gonna draw it better i think you could see the sharp turn it's not really smooth at this point so the slope of this line is one and a slope of this curve just beyond one is approximately three so the slope changes from 1 and then it instantly changes to a higher value 3. so it's not really smooth at this point and you could see it better if you use a graphing calculator to graph this piecewise function but graphing it by hand you can see that the slope changes abruptly at one it's not a smooth transition which means that f of x is not differentiable at x equals one now let's move on to our next example so let's say that f of x is x squared minus three when x is less than two and it's four x minus seven when x is equal to or greater than two so is the function continuous at x equals two well let's find out so let's evaluate the limit as x approaches 2 from the left so we need to use this part of the piecewise function so it's going to be 2 squared minus 3 so that's 4 minus 3 which is the one so this is the three-step continuity test now let's evaluate the limit on the right side of two so we have to use four x minus seven so that's gonna be four times two minus seven four times two is eight eight minus seven is one so the left sided and the right side of limits are the same so therefore the limit exists the limit as x approaches two from either side of f of x is going to be 1 as well now we need to make sure the function is defined so let's determine f of 2. so x equals 2 in this part of the function so that's going to be 4 times 2 minus 7 which is 1 as well so we can say that the limit as x approaches 2 of f of x is indeed equal to f of 2. now once you make this statement you've completed the three-step continuity test so we could say that the function is continuous at x equals two now is the function differentiable at x equals 2 so let's begin by finding the first derivative f prime of x so the derivative of x squared is 2x and the derivative of the constant negative 3 is 0. the derivative of 4x is 4. so in order to determine if f of x is differentiable we need to analyze the continuity of the first derivative so we're going to use the three-step continuity test on the first derivative function so the limit as x approaches 2 from the left side of f prime of x that's 2 times 2 which is 4. and the limit as x approaches 2 from the right side of f prime of x it's simply 4. so because these two are the same the limit exists so the limit as x approaches 2 from either side of f prime of x is 4. now we need to make sure that f prime of x is defined at 2. so we have to use this part of the piecewise function that's 4 as well and so we can make the statement that the limit as x approaches 2 for f prime of x is indeed equal to f prime of 2. so what this tells us is that the first derivative f prime of x is continuous at x equals two which means the original function f of x is differentiable at x equals two now as we said before differentiability describes the continuity of the first derivative so now let's graph the piecewise function let's graph each part separately and then we can combine it into a single graph so we have x squared minus three so the graph is going to be shifted down three units and it's going to open in the upward direction now for the second one it's four x minus seven so it's going to start at negative seven and then the slope is four so as we travel one to the right it's going to go up to it's going to go up 4. so the first point is going to be at 0 negative 7 and then it's going to be 1 negative 3 and then 2 1. and so this graph is going to look like this so we need to combine these two into a single graph so we're going to use this graph up to x equals 2 and then this graph beyond x equals 2. so let's start with this one if we plug in 2 it's going to be 2 squared minus 3 so that's 1. now keep in mind it connects that 2 so i don't need to put an open circle because if i plug in 2 here it will give me 1 as well now if we plug in zero we're going to get negative three this should be two one i put the wrong point and if i were to plug in one it'll be one minus three which is negative two and there's going to be symmetry at x equals zero so this graph is going to look something like this now this one is going to be a straight line so the next point if we plug in 2 i mean if you plug in three it's gonna be four times three which is twelve minus seven that's five so it's gonna be up here so i'm gonna draw that in blue now we can see that the function is continuous everywhere my graph is not perfect but there's no holes or discontinuities in this graph now looking at this point x equals two notice that there's a smooth transition between the red line and the blue line because it's smooth that means that it's differentiable at x equals two so the slope for that part of the piecewise function the derivative was 2x if you plug in 2 that gives you a slope of 4. and the derivative of this is just 4. so to the left of this point like if you go just a little to the left the slope is 4 and a little to the right the slope is 4. so at this point the derivative value at x equals 2 is 4. so because the first derivative is continuous the function is differentiable at x equals two so i hope these examples help you to understand the difference between continuity and differentiability continuity is for f of x it determines if f of x is continuous differentiability tells you if f prime of x is continuous or not so make sure you understand that concept now there are some other functions that you need to be familiar with and that's x to the one third and x to the two thirds now even though they're different there's some similarities between these two graphs x to the one third looks like this and then if we graph x to the two thirds this side looks similar and this side is going to be flipped over the x axis because of the square part of x to the two thirds it's going to be an even function it's going to be symmetrical you could think of this as x to the one third squared or the cube root of x and then squared so that's an even function now for both of these functions they're continuous but they're not differentiable at x equals zero now this graph looks smooth however at zero it has a vertical tangent when you get very close to zero my graph is not perfect but it should look more like this so at the center you have a vertical tangent now you know that the slope of a horizontal line is basically zero now what about the slope of a vertical line it's something over zero let's use one to keep things simple so if you have one over zero it's undefined and when you have an undefined slope typically you have a vertical tangent and so it's not differentiable at that point because you don't have a derivative value at that point even though this looks smooth when you have a vertical tangent it tells you that it may not be differentiable at that point now looking at this graph the slope changes from a negative value to a positive value almost instantaneously at this point here the function is going down so the slope is negative and then the function is going up so the slope is positive and so it's not going to be differentiable because we have a sharp turn and at the same time if you look at this curve it's turning into a vertical tangent and the same is true for the right side it looks like a vertical tangent now the fact that it's not differentiable at this point tells us that the first derivative is not continuous now what type of discontinuity are we dealing with in the first derivative when you see a vertical tangent think of a vertical asymptote when the function has a vertical asymptote you have an infinite discontinuity so if you see a vertical tangent that tells us that the first derivative has a vertical asymptote at that point and let's show that so let's start with this function f of x is equal to x to the one third and let's find the first derivative so using the power rule it's going to be one-third and then x one over three minus one that's one over three minus three over three which is negative two over three and so you can rewrite it like this if you bring the x to the denominator it's going to change from negative two-thirds to positive two-thirds and we can put the three in the bottom so notice that x is in the bottom of the fraction and so that tells us that x cannot equal zero for the first derivative function but for the original function it can zero to the one third is just zero and so that's why it's continuous at zero but for the first derivative if we plug in zero it's going to be one over three times zero and that is undefined so if you were to graph this there would be a vertical asymptote at x equals zero so for this type of function it's continuous everywhere but it's not differentiable at x equals zero because for the graph of f of x there's a vertical tangent and for the graph of f prime of x there's a vertical asymptote which means it has an infinite discontinuity and so it's discontinuous at x equals zero remember the differentiability of f of x describes the continuity of f prime of x so if f prime of x is not continuous at a certain point f of x is not differentiable at that point now let's look at the other example f of x is equal to x raised to the 2 over 3. so using the power rule it's going to be 2 over 3 x 2 3 minus one is negative one-third so once again x will be in the denominator so therefore x cannot equal to zero if we were to graph it there's gonna be a vertical asymptote at zero which means that f prime of x is not continuous at x equals zero which means that f of x is not differentiable at x equals zero so anytime you see some sort of vertical tangent there's a good chance that it will not be differentiable at the center of that vertical tangent you