 Hi there, and welcome to this screencast where we're going to do an example of computing a derivative where several rules are being combined at once. In particular, both the product rule and the quotient rule are going to show up here. And it's going to be our job to decide what rule to apply when. This is going to be a pretty challenging process here, so let's try to think through it. So here's the function a of x equals x times e to the x all divided by x squared plus 1. Now this is a fully algebraically simplified function. There's no tricks to this where I can make the function really, really easy by canceling something out for instance. So I'm stuck with this particular formula. What do I do first? Should I be using the product rule first? Should I be using the quotient rule first? Should I be using some other rule first? Well, the way to answer that question, and it's a really good question to strategize your way through the problem before jumping into it, is to just look at the way that the function is structured. I mean, I have a question for you. I'm going to want you to think about this while you pause the video and then come back to answer it. Is this function a of x more structured along the lines of the product rule where I have one thing times another? Or is it more structured like a quotient rule problem where I have one thing divided by another? So I would like you to pause the video and think about this question. Is the most appropriate rule to apply first in this problem, taking the derivative, the product rule, which I'll just label A, or is it going to be more like a quotient rule problem like I've labeled B? Well, when you look at the structure of this function, I don't really have two functions times each other. I have two functions that are divided by each other. I have this function on the top and then I have this other function on the bottom. On the outermost level of structure, in other words, this function is a quotient. It's not really a product. It could be rewritten as a product if we wanted to. I could rewrite this as say x times the function e to the x over x squared plus one. So I can make this look like a product. But the way that it's written here, the way that it's given to us, it really looks more like a quotient than anything else. So based on the fact that this function is really a quotient, when you get down to it, we're going to apply the quotient rule first. Let me go down here to the bottom and let's start on the quotient rule. First of all, by writing down a clean copy of my function, that's a of x is x e to the x over x squared plus one. So now that I've gotten in my mind to use the quotient rule on this problem, I'm going to have to start thinking about what the quotient rule says. So if I had a function f divided by g, the quotient rule says that its derivative would be f prime times g minus g prime times f all over g squared. And in this picture, this guy on top here is my f and this guy on the bottom here is my g. So this guides me in how to execute the quotient rule next. So a prime of x, the derivative, is going to be, let's see, it's the derivative of the top function, which I'm going to denote using my d over dx notation. So it's this derivative times the bottom function, x squared plus one, minus the top function times the derivative of the bottom. And that's x squared plus one. And this is all the top of one giant fraction. And the denominator of that fraction is the bottom function, the g squared. So it's really helpful when you know you're going to use the quotient rule to, first of all, identify what the numerator and denominator are and actually do this or write out what the quotient rule says before we take any derivatives. Now what we're going to do on the next slide is go through and work through the two derivatives that you see that show up in the process of doing the quotient rule. So now we're going to do the two derivatives that are in the process of the quotient rule separately. It's a good idea when you have a long and complicated expression that involves a lot of moving pieces to it to do those pieces separately. So let's look at this derivative here and then this derivative here separately. Now this derivative is the derivative of x times e to the x. Now that is definitely going to be a product rule situation. In this derivative here I am absolutely differentiating a function that is a product of two functions. So the product rule does show up in the midst of this quotient rule problem. The quotient rule was our first rule that we applied because the big function, a of x was really a quotient. But now here in the trenches I'm encountering a derivative that I need to take that's a product. So again I'm going to do that separately and then import it back into the end. So the derivative here of x times e to the x. Okay according to the quotient rule that would be the derivative of the first function. That's the derivative of x times e to the x plus x times the derivative of e to the x. So these derivatives are getting simpler and simpler and that's the whole point behind these rules. The derivative of x with respect to x is 1 times e to the x plus x times and the derivative of e to the x is itself. Okay so that first little bubble that I pointed to is just e to the x plus x e to the x. The second one here is much simpler. This is just a polynomial function and its derivative, the derivative of x squared plus 1 is just 2x. Okay so now we're going to go on to another slide and complete the quotient rule process. This is just going to involve taking the many calculations I just did and importing them right back in here and I'll do those in blue. So the derivative here we decided was e to the x plus x times e to the x. That was already being multiplied by x squared plus 1 minus x e to the x and then this other derivative was just 2x. And this was all over x squared plus 1 the quantity squared. I'm not going to expand that out just yet. In fact all the derivative taking notice is done. The only thing that's left to do here now is just to simplify all the algebra. Sometimes I skip those steps when I do videos but this one's a little bit more complicated so I think I will go through all the steps of simplifying the algebra. Let's see what we can do. Well I'm noticing in the numerator here, I'm going to circle something here, this term has a factor of e to the x on it and there's a common factor of e to the x on the first term as well. So let's process through this just a little bit. And this blue set of parentheses here on the left I can factor out an e to the x and that will leave me with a 1 plus x times x squared plus 1. Again this expression here is equal to this expression here. I'm just factoring out an e to the x minus and then there's an e to the x on the second term as well. I'm going to factor it out and I'm left with x times 2x. Again this is a video not a live lecture so if that didn't make sense or you want to see it again just pause it and replay it and ask a question of your instructor or on the discussion board if you have it. Now what I have here now is in the numerator are two terms being subtracted each which has a factor of e to the x so I can pull that e to the x completely out. And here's what I got left on the top I have a 1 plus x times x squared plus 1 minus this expression here is 2x squared. And this is all over x squared plus 1 the quantity squared. Let's go over to another slide and finish this off. There's not much left to do here and just need to work out the algebra that's on the inside of the big parentheses here. If I foil the first two terms together I get x squared plus 1 plus x cubed plus x. I'm subtracting off a 2x squared here and let's not forget the denominator of the big fraction. And now I can just collect like terms in the top. I have an x cubed term. I see an x squared minus a 2x squared so that's minus 1x squared plus x plus 1 and the entire thing is over x squared plus 1 squared. And that will do it. That is the most simplified form we can get for a prime of x. There's no additional algebra that will allow me to do this. So about half of this video was algebraic simplification. This is how it goes sometimes. So recap, we started with the function that we had to decide which rule to use first. And this decision making process is just governed by looking at the function and asking ourselves what is it? Is it a product? Is it a quotient? Is it something else? By identifying the fact that it's a quotient, when you really get down to it, that tells us what rule to use. Thanks for watching.