# Question Video: Discussing the Differentiability of a Piecewise-Defined Function at a Point Mathematics • Higher Education

Given that 𝑓(𝑥) = 8𝑥 − 8 if 𝑥 < −2 and 𝑓(𝑥) = 𝑎𝑥³ if 𝑥 ≥ −2 is a continuous function, find the value of 𝑎. What can be said of the differentiability of 𝑓 at 𝑥 = −2?

08:32

### Video Transcript

Given that 𝑓 of 𝑥 is equal to eight 𝑥 minus eight if 𝑥 is less than negative two and 𝑓 of 𝑥 is equal to 𝑎𝑥 cubed if 𝑥 is greater than or equal to negative two is a continuous function, find the value of 𝑎. What can be said of the differentiability of 𝑓 at 𝑥 is equal to negative two?

In this question, we’re given the piecewise-defined function 𝑓 of 𝑥, and we’re told that this is a continuous function. We need to use this to find the value of 𝑎. By looking at the definition of 𝑓 of 𝑥, we can see something interesting. When 𝑥 is less than negative two, our function 𝑓 of 𝑥 is exactly equal to the linear function eight 𝑥 minus eight. And when 𝑥 is greater than or equal to negative two, we can see that our function 𝑓 of 𝑥 is exactly the same as the cubic function 𝑎𝑥 cubed. And we know both of these are examples of polynomial functions. So they’re continuous for all real values of 𝑥. In other words, 𝑓 of 𝑥 is a piecewise-defined function where each piece is continuous.

We call these piecewise continuous functions. And we know piecewise continuous functions will be continuous everywhere, except maybe at the endpoints of our intervals. So in this case, it doesn’t matter what the value of 𝑎 is. We know 𝑓 will always be continuous for all values of 𝑥 less than negative two and all values of 𝑥 greater than negative two. We just don’t know what happens when 𝑥 is equal to negative two.

Of course, we’re told that 𝑓 of 𝑥 is a continuous function. So it must be continuous when 𝑥 is equal to negative two. So to help us find the value of 𝑎, let’s recall the definition of continuity at 𝑥 is equal to negative two. There’s a lot of different ways of writing this. We’ll recall the following method.

We say that 𝑓 is continuous at 𝑥 is equal to negative two if the following three conditions are held. First, 𝑓 evaluated at negative two must be defined. Another way of saying this is saying that negative two must be in the domain of our function 𝑓 of 𝑥. Next, we need the limit as 𝑥 approaches negative two from the left of 𝑓 of 𝑥 to be equal to the limit as 𝑥 approaches negative two from the right of 𝑓 of 𝑥. Equivalently, you’ll often see this written as the limit as 𝑥 approaches negative two of 𝑓 of 𝑥 exists. However, the version we’ve written down is more useful for piecewise-defined functions.

Finally, we need the limit as 𝑥 approaches negative two of 𝑓 of 𝑥 equal to 𝑓 evaluated at negative two. And it’s worth pointing out that the limit as 𝑥 approaches negative two of 𝑓 of 𝑥 will be equal to both the limit as 𝑥 approaches negative two from the left of 𝑓 of 𝑥 and the limit as 𝑥 approaches negative two from the right of 𝑓 of 𝑥. So we need to check all three of these conditions.

Let’s start with the first condition. We need to show that negative two is in the domain of our function 𝑓 of 𝑥. And we can just do this by using the piecewise definition of 𝑓 of 𝑥. 𝑓 evaluated at negative two is equal to 𝑎 times negative two all cubed, which we can simplify to give us negative eight 𝑎. So negative two is in the domain of our function 𝑓 of 𝑥.

To check the second part of our continuity condition, we’ll check each of these limits separately. Let’s start with the limit as 𝑥 approaches negative two from the left of 𝑓 of 𝑥. Since 𝑥 is approaching negative two from the left, all of our values of 𝑥 will be less than negative two. And from our piecewise definition of the function 𝑓 of 𝑥, when 𝑥 is less than negative two, 𝑓 of 𝑥 is exactly equal to the linear function eight 𝑥 minus eight. So because these two functions are exactly equal when 𝑥 is less than negative two, their limits as 𝑥 approach negative two from the left will also be equal.

And of course this is now the limit of a linear function. So we can just do this by using direct substitution. Substituting in 𝑥 is equal to negative two, we get eight multiplied by negative two minus eight. And if we calculate this, we see it’s equal to negative 24.

We now want to calculate the limit as 𝑥 approaches negative two from the right of 𝑓 of 𝑥. This time, since our values of 𝑥 are approaching negative two from the right, all of our values of 𝑥 will be greater than negative two. Once again, from the piecewise definition of 𝑓 of 𝑥, we can see when our values of 𝑥 are greater than or equal to negative two, 𝑓 of 𝑥 is exactly equal to the cubic 𝑎𝑥 cubed. So because these two functions are exactly the same when 𝑥 is greater than or equal to negative two, their limits as 𝑥 approach negative two from the right will also be equal.

But now we can see we’re calculating the limit as 𝑥 approaches negative two from the right of a cubic polynomial. So once again, we can evaluate this by direct substitution. We get 𝑎 times negative two all cubed, which of course we can simplify to give us negative eight 𝑎. Remember, we’re told that 𝑓 of 𝑥 is a continuous function. So in particular, it must be continuous when 𝑥 is equal to negative two.

So by our second continuity condition, the limit as 𝑥 approaches negative two from the left of 𝑓 of 𝑥 must be equal to the limit as 𝑥 approaches negative two from the right of 𝑓 of 𝑥. In other words, we must have negative 24 is equal to negative eight 𝑎. And if we solve this equation by dividing through by negative eight, we see that 𝑎 must be equal to three. And setting 𝑎 equal to three means both the limit as 𝑥 approaches two from the left of 𝑓 of 𝑥 and the limit as 𝑥 approaches two from the right of 𝑓 of 𝑥 are both equal to negative 24. In fact, setting 𝑎 equal to three also sets 𝑓 evaluated at negative two equal to negative 24, which we see is also our third continuity condition. Therefore, if we set 𝑎 equal to three, our function 𝑓 of 𝑥 will be continuous for all real values of 𝑥.

The next part of this question wants us to discuss the differentiability of our function 𝑓 when 𝑥 is equal to negative two. To do this, let’s clear some space. Recall that the derivative of 𝑓 at 𝑥 is equal to negative two is supposed to tell us the slope of the tangent line when 𝑥 is equal to negative two. And we can see that 𝑥 is equal to negative two is the endpoint of our interval. In other words, it’s the point where the two pieces of our piecewise-defined function 𝑓 of 𝑥 join up.

Now, we’ve already shown that these two pieces join at the same point. We showed this when we were checking the continuity of 𝑓 at 𝑥 is equal to negative two. However, for our tangent line to have a well-defined slope at this point, we’re going to need the slope from the left and the slope from the right to be equal.

Now, we could do this from first principles straight from the definition of derivatives. However, there’s a simpler method because we’re given a piecewise continuous function and we know how to differentiate each piece of this function. We can actually find an expression for 𝑓 prime of 𝑥 by first differentiating each piece. We get that 𝑓 prime of 𝑥 is equal to the derivative of eight 𝑥 minus eight with respect to 𝑥 if 𝑥 is less than negative two and 𝑓 prime of 𝑥 is equal to the derivative of three 𝑥 cubed with respect to 𝑥 if 𝑥 is greater than negative two.

And it’s worth reiterating at this point. This won’t tell us the differentiability of 𝑓 of 𝑥 at the endpoints of our intervals. So in our case, this hasn’t yet told us whether 𝑓 of 𝑥 is differentiable when 𝑥 is equal to negative two. However, it will help us to check whether the slope matches up from the left and from the right.

We can now evaluate both of these derivatives. First, eight 𝑥 minus eight is a linear function. So its derivative with respect to 𝑥 will just be equal to the coefficient of 𝑥, which in this case is eight. Next, to differentiate three 𝑥 cubed with respect to 𝑥, we’ll use the power rule for differentiation. We need to multiply by the exponent of 𝑥 and then reduce this exponent by one. This gives us nine 𝑥 squared.

So we’ve now found the slope of 𝑓 of 𝑥 when 𝑥 is less than negative two and the slope of 𝑓 of 𝑥 when 𝑥 is greater than negative two. We can use this to find the slope of 𝑓 of 𝑥 as 𝑥 approaches negative two from the left and the slope of 𝑓 of 𝑥 as 𝑥 approaches negative two from the right. Let’s start with the slope of 𝑓 of 𝑥 as 𝑥 approaches negative two from the left.

When 𝑥 is less than negative two, we can see the slope of 𝑓 of 𝑥 is the constant eight. So this value is equal to eight. We can do the same to find the slope of 𝑓 of 𝑥 as 𝑥 approaches negative two from the right. Since 𝑥 is approaching negative two from the right, our values of 𝑥 are greater than negative two. And we know in this case the slope of 𝑓 of 𝑥 will be nine 𝑥 squared. And of course this is a quadratic polynomial. So we can do this by using direct substitution. We get nine times negative two all squared. And if we evaluate this expression, we get 36.

Therefore, what we’ve shown is the slope as 𝑥 approaches negative two from the left of 𝑓 of 𝑥 is not equal to the slope as 𝑥 approaches negative two from the right of 𝑓 of 𝑥. This tells us that 𝑓 can’t possibly be differentiable when 𝑥 is equal to negative two. It is also worth pointing out that if these two values were equal, we would also need to check that 𝑓 was continuous at negative two. But we already did this.

Therefore, given the function 𝑓 of 𝑥 is equal to eight 𝑥 minus eight if 𝑥 is less than negative two and 𝑓 of 𝑥 is equal to 𝑎𝑥 cubed if 𝑥 is greater than or equal to negative two is a continuous function, we were able to show the value of 𝑎 must be equal to three. We were also able to show that our function 𝑓 of 𝑥 was not continuous when 𝑥 was equal to negative two.