Let's continue on with finding more rules of differentiation. Think of this as we're writing the rule book for our game of calculus. You just have to agree upon the rules first. Let's do a fun and crazy example, ready? This is going to look terrifying, but you have the rules to do it. It's fun. Well, here we go, ready? Find the derivative for me of 9x_9 plus 8x_8, 7x_7, 6x_6, 5x_5, 4x_4, 3x cubed, 2x squared plus x plus Pi. Why not? Oh my God, look at this horrible terrifying function. Imagine graphing this or finding things about this function. It is gross. Can you find the derivative? Of course you can. How do you do it? Remember, the derivative distributes over addition and subtraction. Everything is added here just because, and we use the power rule for each term. Each term is of the form x_n. We're going to take each one and bring the derivative in and do that. Remember, the power rule, just a friendly reminder before I go off and use it. If I have a number, let's put a c in front here, cx_n. You can ignore the c, it does just comes along for the ride. It's c times the exponent. The exponent will fall down in front, and then you multiply that by x_n minus 1. We subtract one as we go. There's our power rule. We're going to combine everything here, power rule, constant multiple rule, sum and difference rule. You name it, we got it. Here we go, ready? The derivative is 81x_8 plus 64x_7 plus, good practice of your times tables here, x_6 plus 36x_5 plus 25x_4. Getting tired here, six is like a marathon. What is 3 times 3, 9 times x squared plus 4 times x plus 1. Remember, we have a leading coefficient on the linear term, that's the derivative. Then the derivative of Pi is zero. Pi is a constant. Our degree nine polynomial has a derivative, that is degree eight. That's true in general. With any polynomial, if you have a degree n polynomial, its derivative will be n minus 1. Good. Just wanted you guys to see that one. Always a fun one. Let's do another warm up that's maybe a little more serious in nature. Let's define, this comes up in physics, if you remember, you might have seen this here, the normal line to a curve. The normal line, where you think you have a normal force, sometimes people see, the normal line to a curve, we'll call C at a point, let's call it P, is the line through the point P that is perpendicular to the tangent line. This comes up in physics a bunch. If you have an object, here's some curve, here some graph, let's call this the function f of x, you can pick a point. Let's pick this point for no good reason, so there's my x value. We've always studied the tangent line. We have this thing we're developing, the derivative of the tangent line. But a lot of times when you have forces, you care about the normal force. Again, you probably have seen this if you took some physics. It is the force or the line that goes perpendicular. Remember, perpendicular means right angle. The green line here, the line that is tangent to the curve, is your tangent line, and it has a slope, an equation, and all that. A line that is perpendicular to that line is called the normal line. It's where the normal vector lives, the normal force lives, and they are at right angles to each other. The beauty of perpendicular lines, if you remember all the way up from high school geometry, they are related in terms of their slopes. A friendly reminder, if you have two lines, let me write this down, so if line 1 is perpendicular to line 2, then the slope of line 1 is the negative reciprocal of line 2. You can get asked, this is just another way to ask a multi-step problem about tangent lines, what is the slope of the normal line? Remember, to find the slope of the perpendicular line, it's a negative reciprocal. Let's do an example just to do one of these because now you're going to start seeing questions that involve that. Find the equation of the normal line to the curve, or to the graph of the function, defined by y equals, so let's do parentheses, 2x plus 1 squared at the point x equals 1. If you want, pause the video right here and try to do this one, and then we'll compare answers as we go on. I recommend that. Remember, just little things to call out. We're looking for the normal line, so what's our process? What's our steps? We have to find the derivative. We have to find the derivative for y prime, that's the slope of the tangent line. We then need to find the slope of the tangent line, that's like the function. We have to plug in x equals 1, and that's going to give me the slope of the tangent line at one. Then because I want the normal line, I want to find the negative reciprocal of this thing, and that'll be the slope of the normal line. They don't want the slope of the normal line, they actually want the equation, so I have to go ahead and find the equation. We're going to use the point-slope form. Find the equation of the normal line. This is just adding onto our multi sets so we're becoming better mathematicians, better problem-solvers, doing more involved problems. Let's go ahead and do that. First step is just to find the derivative. I don't actually have a formula for 2x squared plus 1, whole thing squared. I don't have that yet. We'll have that in a second. What I'm going to do is instead put this in a form that I know how to solve and that's going to be Foiling. It becomes 4x squared plus 4x plus 1. I'll FOIL this out and use the form I know. Now I can go ahead and find the other derivative using our power rule. It's 2 times 4 which is 8x plus 4. The derivative 1 is a constant 0, so that's my y-prime. Next thing I want to do is plug in 1. I will show you some notation. I hope you've seen this before. If you write a bar at the end and put x equals 1, it's like evaluated at 1. It's one way to think about it. You can also of course just write as y prime of 1. However, you want to write it, it's obviously 8 times 1 plus 4, 8 plus 4 is 12. This is our slope at the tangent line. Remember, any other question could've stopped earlier, but this one's going to keep going. What's the derivative? What's the slope of the tangent line at 1? That's 12. What is the slope of the normal line? It's no problem. Normal is perpendicular, so negative reciprocal. Now I have negative 112, and now I actually want the equation. I want to use point-slope formula so y minus y_1 is m, x minus x_1. Be careful, there's a lot of stuff going on here. Where is everything going to come from? Let's just go over here and we'll solve this thing. I need the y value at 1. Notice they didn't give that to us. I've seen people get all the way here and then go like, "Oh my gosh, I don't have y". How do you solve for y if I give you x? You plug in. As you go on and on, they're just going to give you less and less information, and you're just going to have to find what you need. At x equals 1, the y value becomes 2 times 1 plus 1, that's 3 so 3 squared, which is 9. You've got to go get that, and it's not there. That's okay. It's y minus 9 equals the slope. Now be careful what slope: the derivative, tangent line, the normal line, they want the normal line. We're going to put in minus 1 12th, and then x minus 1. The point in question is 1 comma 9, and you can see it here, and then I have my slope of the normal line. I'll leave the answer like this. There's no point in cleaning it up. It is what it is. Unless they ask you for a specific form, you have all the pieces. You've obviously gone through all the steps. How you present the answer at this point doesn't matter as long as you have all the right numbers. This is a little more of a serious concept. Normal line plays a bigger role in physics. You'll see it if you take Multi Variable Calculus as well. Let's keep adding on more rules of derivatives. We want to move on to our exponential function. The first thing is, what is an exponential function? Recall that an exponential function is of the form a to the x, where a is some base, a to the x. A can be positive or negative. We don't like negative numbers there, and we usually avoid the case where it's one because then it just becomes one of the x, which is 1, that's boring. Two to the x, 3 to the x, 4 to the x. You can have one-half to the x. You pick your favorite base, it doesn't matter. This is what they look like. F of x is 2 to the x or 3 to the x. You could also talk about one-half to the x. Just keep in mind they tend not to write it as one-half to the x. You usually see it as 1 over 2 to the x or even 2 to the negative x. Those are all exponential functions. The one of course that we see a lot in calculus is e to the x. That's a nice exponential function, and people think e for exponential, no no. E for Euler. Remember e is a number 2.718 in change. We'll talk more about that in a second. Let me give you the rule to differentiate this thing. Add this to your basket of knowledge here. If I have an exponential function, the derivative of an exponential function is going to be the exponential function itself times the natural log of the base. This is pretty amazing because it also gives you another relationship between an exponential function and the logarithm. The logarithm appears in the formula for the derivative, that's a little surprising. It's neat. Also tells you the derivative of the function is a scalar, a number, a multiple of itself. This is a special derivative and we're going to add this to the rule book. I'm going to box it up for us. There's a special case. Just a special case only because it comes up so much that I'm not going to just call it out as a special case. Normally we don't care. We give you the general formula and you go put it in the specifics. For the special case of the exponential function, watch what happens. The formula for exponential says, repeat, put the same thing down, times the natural log of the base. Here the base is e. What is the natural log of e? Do you remember, natural log? Quick, quick, quick. What is it? One, very good. E_x times 1 is just e to the x. The special case, the one that, it's amazing if you ask people who take calculus years later like, "What's the derivative of e to the x?" They're like, "Oh, e to the x. I remember that one". Ask them other stuff and, sometimes I forget. The special case of the exponential function is the derivative of the exponential e to the x is itself, e to the x. These are two rules. I want you to add these up and start keeping a rule book as we go. Let's do an example that now uses these rules. Let's find the derivative, find d to the x of. I'm just going to mix up polynomials with exponentials, just so you get used to seeing nasty functions and just see what happens. Let's do x to the e plus root 2x plus root x. In this first one, the root is only over the two. Pause the video if you get a chance and try to solve this thing before we go on and work out the solution. Remember everything is added or subtracted, so the derivative just moves along inside. No special tricks. X cubed, we've done that one before, 3x squared. Power rule, the exponent comes down in front and subtract one, 3x to the x. I get to use my new rule. Constant multiple rule still applies. The three is a constant comes along for the ride. The derivative of e to the x, as we just saw, was e to the x. Now we have the derivative of two to the x. I like this. This is a new one. How do we find? Let's just put it over here on the side real quick. If I have an exponential function, it's repeat, log to the base. So 2 to the x becomes 2 to the x times log of 2. Our new rule in action with the two, looks good. X to the e, this is the fun one. Lots of letters here. You've got to remember which was the variable, x is the variable e is some number. This is actually the power rule. The power rule kicks in here. Minus this, minus whatever comes along for the ride. E, where is e? There it is, e to the x to e minus one. It is what it is, what it is. It's a number, comes up front, to be treated like x cubed. Just does what it is. Looks gross. I kind of like it, but it's there. Root 2x, remember that square root is not on the x, so this is just plus root two. Here we have a linear term. The derivative is the slope as the coefficient like mx plus b, just the m and then x to the one-half. We've seen this one before. Think of this with a fractional exponent. So root x becomes x to the one-half and then its derivative becomes one-half x to the minus one-half. So here's a little more just the combination piece of what's happening here. Good. So go over these and again, anything like it. I think the fun one, the scary one is x to the e. That's a good one. Let's do just one more thing. Since we're talking about exponentials, I feel like we can't move unless we talk about e itself. So we're going to define, we actually have a way to think about e. So e right now in our minds is this number 2.718 and change. You say, well, where does that number come from? We can define e based on using the limit definition of e to the x. So if I have an exponential function, I want to define e as the limit, you'll see what this limit comes from in a second, as h goes to zero, well, let me rephrase this for a second. Take the limit as h goes to zero of e to the h minus one over h. I want e to be the space such that this limit is equal to one. So e is the number that makes this true. This is h, e is the base that makes this true. So this, there is only one base that makes this true and that base will be e, and it turns out to be this. Where does this limit come from? If I write out the function a to the x, you say limit of h equals to zero, that should look like the derivative. As h goes to zero it becomes the limit, as h goes to zero of a to the x plus h minus a to the x all over h. So I'm not writing the definition to supplying our exponential function f of x plus h minus the function. There isn't much you can do here, but you can factor out limit as h goes to zero. You can write a to the x times a to the h, minus a to the x all over h. You can factor out this a to the x. Isn't it? a to the x and both terms. This is where the expression in the definition comes from. Because remember the limit depends on h. h is moving to zero. E to the x is given as a base, x is the variable not h. It does not depend on that. So you can almost bringing up front, a to the x times the limit as h goes to zero. So we think about what the derivative of the exponential function is, is itself. So if I have this specific case where with the exponential function, so imagine for a second I started with the exponential function, I know the derivative of the exponential function has to be itself. Which means that this limit in question, which turns out to be the logarithm of the base. That's not obvious though and we'll show that later. But this constant, this number, whatever it is, it has to be one. If the derivative of the exponential function is going to be itself, this is the special number that is itself, then I need this limit to equal one. So we'll define e, so e is the number, the unique number, the base, such that this limit is equal to one. This limit appears in the derivative formula. So it's the number that makes it one. Just heads up people like you because like, oh, it's so cool. It's the function whose derivative is itself. There are other functions whose derivative are itself. They are a little boring. So for example there is the function f of x equals zero, its derivative is itself too. But really think of it more as like it's the number that makes this limit equal to one. That's how we're going to define it. I want you to know a limit, again e is so important you have to know when you're working with it. So this limit in particular is a tricky one. But if I put an e in the base, if I see this limit, recognize that this is equal to one. You'd almost treat it like a little formula. Good examples here, go over those. Let me know if you have any questions. See you next time.