 Welcome back for one last video for now on examples of the chain rule. And this one's quite a bit different from the previous ones, because we're going to involve no formulas whatsoever. This is just going to convince you that the chain rule is a derivative rule that works anywhere as long as we can represent our function well enough. So here I have two functions, f and g, f is, the blue one, g is the red one, and they're both sort of piecewise linear. They're just made up of line segments, sort of jointed together at these strange angles. And I'm going to define c of x to be the composite f of g of x. And what I would like to do is find the derivative of c at zero and the derivative of c at one. Now, how can I do this without formulas, you ask? Well, I do have one formula that lets me do all of this, and that's just the formula for the chain rule itself. Let's think about how we would do this. We're being asked to find the derivative of c at zero and the derivative of c at one. Let's come up with a formula that gives me the derivative of c at x, just for any x whatsoever. I can do that because I know that c is a composite function. It tells me right here that's a composite function. And so the chain rule will tell me this, that the derivative of c anywhere is going to be equal to f prime of g of x times the derivative of g. And that's just the straight chain rule, but that turns out to be enough to allow me to calculate these two derivatives that I'm interested in. So let's jump in and see if I can do that. Well, first of all, what's c prime of zero? Well, here's c prime of x down here. So c prime of zero would just simply be c prime of zero is going to this formula down at the lower left and substituting x equals zero into it. This would give me f prime of g of zero times g prime of zero. Simple enough, I'm just using the formula for c of x and instead of x, I'm just going to kind of rub it out and put a zero. Wherever I see the x, and that gives me this formula you see right there. Now let's go through and see if I can calculate this. Well, I have some pictures here of f and g, and they're pretty easy to read, because they're all straight lines. I'm going to switch to green and see what I can do with this. What is, first of all, I need to know what g of zero is. Well, g of zero pretty clearly, that would be one that's happening right there. So I can make one substitution into this formula here. g of zero is equal to one according to the graph. So c prime of zero is now going to be f prime of one, that's using that substitution, times g prime of zero. So now, I guess what this boils down to is I'm multiplying two derivative values together. Now, how do I do that? How do I find those values? Well, just remember what the derivative is. I mean, the derivative of f at a point is going to be the slope of the graph of f at that point, and same thing for g. Now, these are very simple pictures here. These are simple graphs, they're just straight lines. So let's just go to these places and see what the slope is. Well, I guess I'll use my green again. f prime of one would be if I go to this point right there at x equals one and measure not the height of f, but the slope of f, that's what f prime of one is. Pretty clearly at that point I have a straight line and I'm going over by one and up by a half there. So that f prime of one is equal to one half. Likewise, g prime of zero, I'm going to go over to zero and measure not the height of g, but the slope of g. And you can see g is a straight line right there and it's going down by one and over by one. So that's a slope of minus one. So c prime of zero is the product of those two things and that's negative one half. Again, how I got that was just using the definition of c and using the formula for the chain rule itself. And then just simply evaluating at x equals zero and then following the slopes that the graph gives me. Look at c prime of one, I've erased all my work here. If you need to go back and see that, just rewind the video and do a still. Now c prime of one is the same principle. I've got my formula for c prime of anything over here. And I'm just going to replace x with one wherever I see it. And I've done that in this third line right there. So let's go through and see what I can do. Let's see, I have f prime of, now g of one. Let's say g of one is zero from the looks of it. And then I'm going to need to multiply by g prime of one. Now let's try to identify what this is going to come out to be. So g prime of one, g prime of one is not the height of g but the slope of g right there. However, I have a problem because when I look at x equals one right there, the graph of g is not locally linear at that point. If I were to zoom way in on that little bubble, what I would see here is I would continue to see a v shape. I would continue to see that v shape no matter how far I zoomed in on it. So this derivative is not going to exist. It does not exist because g prime of one is undefined. G is not differentiable at one and therefore the derivative of my composite function c is not going to exist either. And if that weren't bad enough, the derivative also fails to exist when you differentiate f at zero. This is a little harder to see but this is sort of like a sharp turn like so. f prime of zero doesn't exist either. If either one of those two derivatives fails to exist, then the entire derivative of c fails to exist. This just really fails badly at this point because both derivatives involved fail to exist. Okay, so that's an example of how you can calculate the derivative of a composite function using only the graphs that are given. Thanks for watching.