in section 3.4 we introduce the product and quotient rules so how do we find the derivative of a function involving a product in other words i have a function where certain objects are being multiplied together so as an example here let's think about this function y equals x squared times e to the x so we know the derivative of x squared and we know the derivative of e to the x but does that inform us about the derivative of x squared times e to the x so naively we might think that the derivative of x squared times e to the x is just going to be the derivative of x squared times the derivative of e to the x and we would say that the result would be 2x times e to the x but it turns out that the derivative of a product is not so straightforward so for the derivative of a product or a quotient of functions we have a rule for each of those situations so we will show in this video the product and the quotient rule and we will see situations in which those rules are necessary so the rules aren't difficult but we certainly do need to know the rules in order to correctly find the derivatives of functions involving products and quotients so here's the product rule first so the product rule reads this way so the derivative of f times g that's what this notation represents is going to be the derivative of f times g plus f times the derivative of g so effectively i identify two functions and the derivative gets applied to each of those so the derivative of gets applied to the f the derivative gets applied to the g function and then the other piece just comes along unchanged so this is the product rule and you need to commit the product rule to memory so now we're equipped to find the derivative of this function y equals x squared times e to the x so effectively we can identify two functions we'll call f the x squared piece and we'll call g the e to the x piece so applying the product rule we have f prime times g so the derivative of f is 2x and then the g comes along so we have e to the x and now the derivative is going to hop to the e to the x term and we'll leave the f term alone so then we'll have plus x squared times the derivative of g which is e to the x so this expression here is the derivative for our function x squared times e to the x so here's a proof of the product rule in case you're interested we show this just directly through the limit definition and with a nice trick here of adding in a special form of zero we rearrange and simplify down to our result you don't need to know this but if you're curious you can pause and take a look at the proof here of the product rule so let's go ahead and apply the product rule to a function here's the function f of x equals x to the fourth power times e to the x so we're going to apply the product rule because we have this product of functions right the x to the fourth term times the e to the x term so we can identify here two functions and i'll just recycle the f and g notation here although we've called our function f so we'll take the derivative of the first term here so the f prime for this expression x to the fourth times e to the x we'll have 4x cubed times g so we'll have 4x cubed times e to the x and then we'll have the addition between and now the derivative hops over to the g term and the derivative of e to the x is going to be e to the x so based on our labeling here here's f prime times g plus f times g prime now if we wanted to we could simplify this so we could factor out an x cubed times e to the x so factoring that out we're going to get a 4 plus x left over on the inside so these two expressions represent the derivative of this function f of x equals x to the fourth power times e to the x another function here is the function f of x equals 2 e to the x times the quantity x cubed minus 3. so again we can think about this as being two functions f times g so again our function is called f but we're just using this labeling to reference back to the product rule so the derivative by the product rule says we first take the derivative of this f term so the derivative of 2 e to the x is going to be 2 e to the x so i'm going to have 2 e to the x f prime times g and then the derivative will hop over to the g term so we'll have 2 e to the x times the derivative of x cubed minus 3 which is going to be 3x squared and then plus 0. effectively the derivative of negative 3 is going to be 0. so again here is our f prime times g plus f times g prime and that's the product rule if we wanted to we could simplify this a little bit so let's take that 2e to the x out and what we have left over is x cubed minus 3 and then minus 3x excuse me plus 3x squared so both of those represent the derivative of this function the function being the function defined as 2 e to the x times x cubed minus 3. so let's look at this function this function is f of x equals x times e to the x and what we'd like to do is find a formula for the nth derivative so the nth derivative meaning we just specify some order derivative that we want so like for instance the fifth sixth or tenth derivative and let's see if we can determine a formula for that derivative so first of all we'll apply the product rule to find the first derivative so the derivative here will be f prime of x so again i can think about two functions f and g so this is going to be f prime which is 1. so f prime times g will be 1 times e to the x and then we'll have f times g prime the derivative of e to the x is going to be e to the x so again just to restate this is f prime times g plus f times g prime so let's find the second derivative we're looking for a pattern here for the nth derivative so we're going to find several derivatives and see what we can deduce so the derivative of e to the x will be e to the x now here's the derivative of x e to the x which is the original function which we just found so our derivative of x e to the x is going to be e to the x plus x e to the x and that's going to simplify to 2 e to the x plus x e to the x we could factor out an e to the x so what we'll have is e to the x times two plus x and then we can find the third derivative so the third derivative we have yet again another product involved so we can think of this as being f and g so we'll have the derivative of f is e to the x times g and then plus f times the derivative of g so we'll have e to the x times 2 so this is going to become 2 e to the x plus x e to the x and then plus another and i see a mistake i've made here the derivative of this expression two plus x the derivative is just going to be one so that expression that i just wrote should just read plus e to the x at the end all right so notice here that we're going to have 3 e to the x plus x e to the x factoring out an e to the x we're going to have e to the x times 3 plus x so perhaps you're seeing the pattern the second derivative we have e to the x times two plus x the third derivative we have e to the x times three plus x so perhaps we'll put this all together now we'll say that the nth derivative is going to be equal to e to the x times n plus x so for instance we could say that the fifth derivative would be e to the x times five plus x all right so for this function x e to the x here's our pattern for the derivative the nth derivative will just be e to the x times n plus x and does this work for the value of one well the first derivative that would just be e to the x times one plus x if we expand we have our expression e to the x plus x e to the x so now for the quotient rule so here's how we find the derivative of a quotient of functions so suppose we have the function of the form f divided by g the derivative of this quotient f divided by g is equal to this expression so we have f prime times g minus f times g prime divided by g squared so what we have is the derivative of the top times the bottom minus the top times the derivative of the bottom all divided by the bottom squared so this is the quotient rule and you need to commit the quotient rule to memory now subtraction is not commutative so x minus y is not the same as y minus x so just try 2 minus 3 and 3 minus 2 you get different results so subtraction is not commutative so in the quotient rule this ordering is critical so we cannot change this ordering or we'll end up with the derivative being incorrect so let's apply the quotient rule here we're looking for the derivative of the function e to the x divided by x plus 1. so the quotient rule says that we take the derivative of the top so the derivative of the top is going to be the derivative of e to the x which is e to the x times the bottom and then minus the top times the derivative of the bottom the derivative of the bottom is just going to be one and then that all gets divided by x plus 1 the bottom squared so this is the expression for our derivative by the quotient rule we can simplify this if we expand we get e to the x times x plus e to the x and then minus e to the x so these e to the x's at the back here will actually drop out and then that's all divided by x plus 1 quantity squared so our derivative we might just say in summary is going to be x e to the x divided by x plus 1 squared and so here's an application of the quotient rule so note again just like the product rule we don't have the naive ability to just say derivative of the top divided by the derivative of the bottom we have to apply the quotient rule and you'll notice that the actual result is far different than what we would have gotten just by a naive application of derivative divided by derivative so let's look at another function let's find the derivative of y equals x plus 2 divided by 3x squared minus x so the derivative we might note is y prime so we'll have the derivative of the top that's going to be 1 times the bottom and then minus the top so minus x plus 2 times the derivative of the bottom which is going to be 6x minus 1 and then that all gets divided by the bottom 3x squared minus x squared so this could be simplified a bit on the top we'll just get three x squared minus x and then we will foil these two terms we'll get six x squared plus eleven x minus two and then that's all divided by the expression three x squared minus x quantity squared so this will simplify to negative 3x squared minus 12x plus 2 and then again all divided by the bottom 3x squared minus x squared now notice in this function we have 2 plus x e to the x in the numerator so not only are we going to have to apply the quotient rule we'll also have to apply the product rule so our derivative is going to be g prime of x so we have the derivative of the top so the derivative of the top well the 2 is going to go away its derivative is zero and now for x e to the x we're going to apply the product rule so again the product rule will say that our derivative is going to be e to the x plus x e to the x that's what we get up top and then times the bottom right now we're going to subtract and this is i'm running out of room but this is all on the same line we now have the derivative of the bottom which is going to be 2x times the top 2 plus x e to the x and that all gets divided by x squared minus 2 quantity squared now this perhaps will simplify but in this case we're just going to leave this as is so our derivative is represented by this expression so in this example we want to find the equation of the line tangent to the function y equals 2x over x plus 1 at x equals 2. so our function's derivative we'll just say y prime will have the derivative of the top times the bottom and then minus the top times the derivative of the bottom which is just going to be 1 and then that all gets divided by the bottom squared so you'll notice that this 2 distributes we get 2x plus two minus two x over x plus one squared so our derivative simplifies these two x's knock out so we just have two over x plus one quantity squared so this will tell us our slope of the tangent our slope of the tangent is going to be the derivative evaluated at 2 so we'll have a 2 on the top on the bottom we'll have 2 plus 1 which is 3 and 3 squared is 9. so the slope of our tangent is 2 9. so for our point our point will just be y of 2 we'll have x equals 2 and then our y coordinate will be y of two that's going to be two times two which is four over two plus one which is three so our point is two four thirds all right so we can put all this together now to write our equation of the tangent line so we'll just have y minus our y coordinate is equal to our slope of 2 9 times x minus the x coordinate and we will leave that in point-slope form so here we're given a function called h and it's defined as being equal to f of x times g of x and we want to find h prime of 2 given some information so first we're just going to find h prime of x which is just applying the product rule so applying the product rule the derivative of h will be f prime times g and then plus f times g prime and so we just want to find h prime of 2 by applying this table of information so h prime of 2 will be f prime of 2 times g of 2 and then plus f of 2 times g prime of 2. so we just read this information from our table f prime of 2 is going to be equal to negative 2 so this becomes negative two g of two is right here g of two is given as four f of two is given as equal to negative three and then lastly g prime of 2 is given as being equal to 7. so just simplifying this we have negative 2 times 4 which is negative 8 and then we have negative 3 times 7 which is going to be negative 21. so negative eight plus negative twenty one our result here based on this information would just simply be negative twenty nine so as a last example we wanna look at some functions where we have an unknown function and all we know about that function is that it's differentiable so what that means is that we can write f prime and be certain that it exists so suppose that f is a differentiable function let's find an expression for the derivative of each of the following functions so for the first function we have y equals x squared times f of x so by the product rule our derivative would just be 2x times f of x and then plus x squared times the derivative of f which we can represent as just f prime of x and so that would be the expression for this function defined this way where f is some unknown but differentiable function now the second function we have y equals the root of x plus x times f of x divided by e to the x so we'll rewrite this as x to the one-half plus x times f of x divided by e to the x so notice that we have to apply both the product rule and the quotient rule in the course of finding this derivative so the quotient rule says that we find the derivative of the top so by the power rule we'll have one half x to the negative one half and then this x times f of x is going to require the product rule so the derivative of x is going to be 1 so we have f prime times g so we have 1 times f of x and then plus x times f prime of x so we don't know f but we do know that it's differentiable and then times the bottom now this is all on one line so now we have the top times the derivative of the bottom derivative at the bottom is e to the x and this is all going to get divided by e to the x squared and so this expression represents the derivative of this function where f is again an unknown but differentiable function so notice on this piece right here in the midst of applying the quotient rule i also had to apply the product rule so we'll just leave it at that not to mighty things up so it is certainly possible that we have to apply one rule while applying the other so just to recap the derivative of a product requires us to use the product rule so we have the product rule the derivative of f times g is going to be f prime times g plus f times g prime so you want to make sure that you commit the product rule to memory and then we have the quotient rule again the quotient rule the derivative of f divided by g is going to be f prime times g minus f times g prime all divided by g squared so we might read that as the derivative of the top times the bottom minus the derivative of the bottom times the top all divided by the bottom squared again the ordering in the numerator is important because the operation of subtraction is not commutative so we'll continue to see the product and quotient rules going forward so as we continue to pick up derivative rules in sections 3.5 and beyond we will still perhaps come across cases where we need to use the product and quotient rule so we're just starting at a base level here as we develop more derivative rules the product and quotient rule is still always going to be there in the background and we may need to use the rule when the occasion warrants