 The graphs of the function f and g are illustrated here on the screen. We can see that f and g are both piecewise linear functions. Suppose that u equals f composed with g of x. Can we compute u prime of one? Well, we could try to come up with formulas for what happens for our functions f and g at the number one, but it turns out the chain rule allows us to compute the derivative just from the graphs we see right here. Because if we're trying to compute u prime of one, what we need to do is you define u prime, which u prime of course is an abbreviation for du dx. And the chain rule tells us that du dx, this is equal to du dg times dg dx, where g of course is this interfunction we see right here. So in other words, if we wanna compute u prime, this is gonna equal the derivative of f evaluated at g of one. And we're gonna times that by g prime at one. All right, so we need to evaluate these things here. So what can we do? So let's first think about g of one for a moment. g of one means that we come along to the x axis till we hit one, then we climb up until we find some coordinate right here. So we see that g of one is gonna equal three right there. I'm gonna label that on the graph in case we have to use it again in the future. So we have this point one comma three right there. So g of one, g of one is equal to three. What does it mean to take g prime at one? g prime at one means the slope of the tangent line at g, okay? And so when we look at g at one, since it's a linear function, the tangent line is just the function itself. The slope of the function at x equals one is what g prime of one is trying to calculate. So let's see if we can find the slope of this line. We'll notice that we go over one down three. This gives us a slope of negative three. That's gonna be the derivative in that situation. g prime at one is going to equal negative three. All right, with that perspective in mind, what do we have to compute? We're still have to compute f prime at three. So as we need to find the slope of f at the point x equals three. So if we come along the graph here, here's x equals three and then we're gonna climb up the graph right here. So we find this point right here. Well, while the point, it's some type of fraction. We could figure that if we want to. What we need to figure out is the slope of this sector right here. But this is just, again, a linear function. Notice there is a point right here and there's a point right here that maybe is a little bit easier to find the slope for. So this one is over two up four. So we have the point two four right there. This one is, let's see, two, four, six up three. So this is the point six comma three. So if we try to compute the slope here, we're gonna get m just by the usual slope formula is going to be three minus four over six minus two. We end up with a negative one over four. So negative one fourth is the slope of the function at that location. So this tells us that f prime. So let's write this again here. We have to compute f prime at three times it by g prime at one. The slope of f at three is equal to negative one fourth. The slope of g at one was equal to negative three. And so putting those together, we end up with the slope negative three over negative four, which is actually three fourths. So without actually seeing the function, we don't see the function u. We see the function f and we see the function g. But we can calculate what the slope of the tangent line is gonna be for the function u at one. So what I wanna do is then repeat this exercise, so let's come up with a new function. Let's look at the function v this time. v is gonna be g of f of x. So we swap the order. The chain rule stool applies here v prime at one. This is gonna equal g prime evaluated at f of one. And we're gonna times that by f prime at one. So what are the, what are these about these functions do we know? Well, we have to compute f of one again. So we haven't done that one yet. So coming along f one, remember f is the green function. We go over one, we're gonna come up one right here. So we do find a point, I'm gonna label it, you get one comma two. So f of one is equal to two. So that means we have to compute g prime of two and times that by f prime at one. Well, g prime of two, where is x equals two? x equals two right here. Ooh, what is this? This is a sharp corner. We notice when you come from the left, when you come from the left, this slope wants to be negative three. But if we were to come from the right, that would be a positive. So if we haven't computed it yet, we'll probably need to eventually, but notice because we have the sharp corner, the derivative doesn't exist right here. G prime at two does not exist. So it actually doesn't matter what f prime at one is, the slope of that tangent line, we haven't done it yet. It turns out the answer to this is that doesn't exist. v prime at one is undefined. So we can see that from the graph right here. One last example, let's consider w to be g of g of x and find w prime at one. So to find that one, to find w prime at one, again by the chain rule, we're gonna take g prime evaluated at g of one, and then we have the times that by g prime at one. So what do we know here? We already did g prime at one. Remember we did that earlier, it's negative three. So that we can throw in already. Have we done g of one already? The answer is yes, we did it over here, right? So that was a three. So that then, so what we have to do now is we have g prime at three, the slope of the function g at three, and we times that by negative three, which is the slope at one, which when we investigate the graph, we haven't done that one yet already. Notice x equals three would be over here. This is our point, we need to figure the slope at that point. So now we're at a point where we should compute the slope of this thing. I'm gonna use this corner to help me with the slope because this was an x intercept, two comma zero. Can I find another point? Aha, here's one right here, counting it over two, four, five, five over, and it's two up. So we can use that to help us find the slope here. So g prime at three is gonna equal two minus zero over five minus two. So we get two thirds as the slope at that point. And so putting it in over here, we're going to get two thirds times that by negative three. That simplifies to be negative two. So the derivative of w at one is gonna equal this negative two. And so this shows us how we can compute the derivative of a composition of function if we have the graphs of these two composition factors. It all comes from the chain rule here.