If a function is continuous, what must you do in order to make sure it is differentiable? If you find that a function is continuous at a certain point by substituting point to the right and left of it, do you just then substitute it into the gradient function to see if it is differentiable? I read in my textbook that you have to check both sides of that limit (x approaches 0) in the gradient function. Is that talking about the gradient function or whether it is continuous or discontinuous? 
 A: I assume that by gradient you mean slope (one of the interpretations of a function's derivative), as in $$m = \frac{\Delta y}{\Delta x} = \frac{\text{Change in y}}{\text{Change in x}} = f'(x)$$
A good thing to point out is that the statement "a function is differentiable" is a bit vague. You can consider 3 scenarios:
Possible Scenarios related to a function's differentiability


*

*A function f is differentiable at a given point c.
For this, my book recommends to use the following altenate form of a derivative:
$$f'(c) = \lim_{x \to c} \frac{f(x) - f(c)}{x - c}$$
Now, I guess what you were referring to when talking about the double sided limit existing is that, in fact, both of the one following one sided limits must exist and be equal for the statement above to be true:
$$\lim_{x \to c^-} \frac{f(x) - f(c)}{x - c}$$
$$\lim_{x \to c^+} \frac{f(x) - f(c)}{x - c}$$
That is, the function approaches the same value at that point c both as you approach it (this point c) from the left as well as the right. 


*A function is differentiable on an open interval (a, b)
Both one sided limits (and therefore the double sided limit) noted above must exist for all x such that $$a < x < b$$ Or in basic terms, every x value in the interval except for the endpoints.


*A function is differentiable on a closed interval [a, b]
For this scenario to be true, f must be differentiable on the open interval (a,b) and the derivative from the right of a and the derivative from the left of b exist. In other words, since we're evaluating a closed interval, we cannot possibly have a double sided limit, since we're "chopping up" anything that does not lie in the interval [a,b]. So, for the endpoints, we must have the one sided limits (right and left ones respectively) for the function to be differentiable on the closed interval [a,b].
Examples of functions not differentiable at a point c


*

*A sharp turn
From one of the answers above, I guess you were looking at the absolute value parent function, that is $$ y = f(x) = |x|$$
You should notice that this is a piecewise function. That is, we can further define f(x) the following way:
$$f(x) = -x,\text{  } x < 0\\
    f(x) = x,\text{  } x > 0$$
Here's a portion of what this function's graph looks like:
Graph of y = |x| on interval [-2, 2]
Looking at the graph we can see that for any given x value, the absolute value function "returns" that number's positive equivalent. That is, if x > 0, then absolute value yields that number itself, since its already positive. However, if x < 0, then the absolute value function "returns" that number's opposite, since the opposite of a negative is its positive counterpart.
For this scenario, let c = 0. 
Lets find each one sided limit (left and right derivatives) as x approaches our value of c which is 0. 
$$\lim_{x \to 0^-} \frac{f(x) - f(0)}{x - 0} = \frac{-x}{x} = -1$$
$$\lim_{x \to 0^+} \frac{f(x) - f(0)}{x - 0} = \frac{x}{x} = 1$$
This is a bad situation! The one sided limits are not equal and therefore the function is not differentiable at the point (0, 0). You should note that it is differentiable on every other point in its domain, but not at x = 0.
This is a common scenario that my book refers to as "A Graph with a Sharp Turn". As you can see both visually and from our limit calculations, the slope changes abruptly (or sharply) at the point (0, 0), hence its name "sharp turn". 


*A vertical tangent line
For this example, lets consider the function $$f(x) = x^{\frac{1}{3}}$$
 and let c = 0. Lets calculate the double sided limit directly now:
$$\lim_{x \to 0} \frac{f(x) - f(0)}{x} = \lim_{x \to 0} \frac{x^{\frac{1}{3}}}{x} = \lim_{x \to 0} \frac{1}{x^{\frac{2}{3}}} = \infty$$
Here's a graph for part of the function. By looking at this, we can see how a vertical tangent line is present, and since the limit evaluates to infinity, we can conclude that f is not differentiable at x = 0.


*A Graph with a Cusp
For this example, let c = 0 and 
$$ f(x) = x^{\frac{2}{3}} $$
Lets look at the one sided limits once more:
$$\lim_{x \to 0^-} \frac{f(x) - f(0)}{x} = \lim_{x \to 0^-} \frac{x^\frac{2}{3}}{x} = \lim_{x \to 0^-} \frac{1}{x^{\frac{1}{3}}} = -\infty $$
$$\lim_{x \to 0^+} \frac{f(x) - f(0)}{x} = \lim_{x \to 0^+} \frac{x^\frac{2}{3}}{x} = \lim_{x \to 0^+} \frac{1}{x^{\frac{1}{3}}} = \infty $$
Here's a graph of part of the function. As we can see, different values are being approached from each side (negative infinity and positive infinity) so here's yet another case where f is not differentiable at x = 0.
Final observations
You should note that on all the examples we went through, the function was continuous at x = c, but it was not differentiable at x = c. That is, a function can be continuous at the point x = c, but it is not necessarily true that it is differentiable at the point x = c. However, the opposite is true, that is, if a function is differentiable at x = c, then it is guaranteed to be continuous at x = c.
$$\boxed{\text{If f is differentiable at x = c, then f is continuous at x = c.}}$$
$$\boxed{\text{If f is continuous at x = c, f is not necessarily differentiable at x = c.}}$$
We've already seen 3 scenarios for which the second statement is validated. If you want to see a proof for the first, here you go.
$$\lim_{x \to c} [f(x) - f(c)] = \lim_{x \to c} [(x-c) \cdot (\frac{f(x) - f(c)}{x-c})]
= [\lim_{x \to c} (x - c)] [\lim_{x \to c} \frac{f(x) - f(c)}{x-c}]
= (0)[f'(c)] = 0$$
So, as x gets closer to c (since the derivative at c exists since we start off by saying that f is differentiable at c), we see how the difference $$f(x) - f(c)$$ approaches 0. That is, eventually, there will be no difference between f(x) and f(c) and at that point $$\lim_{x \to c} f(x) = f(c).$$ So, f is continuous at x = c.
Special Thanks to
-My Professor at County College of Morris for teaching me this material
-The creators of the book we used, Calculus: Early Transcendental Functions 6th Edition
A: A function is continuous at $a$ if $\lim_\limits{x\to a} f(x)$ exists and equals $f(a)$
and
$\lim_\limits{x\to a} f(x)$ exists if $\lim_\limits{x\to a^-} f(x) = \lim_\limits{x\to a^+} f(x)$
The derivative $f'(a) = \lim_\limits{x\to a} \frac {f(x)- f(a)}{x-a}$
And just like the limit test we have for continuity the limit exists if, 
$\lim_\limits{x\to a^-} \frac {f(x)- f(a)}{x-a} = \lim_\limits{x\to a^+} \frac {f(x)- f(a)}{x-a}$
