in our first lecture we're going to talk about u-substitution technically this is a part of the calc 1 curriculum but it's a super important technique of integration so we also review it in calc 2 just to make sure everyone's kind of on the same page with it so let's start with an integral that uses u substitution the main thing to remember is that u substitution is kind of like an inverse chain rule so I claim if you look at this integral it looks like someone took the derivative of a function using the chain rule so why is that well because you have a function here that has an inside function namely x squared and then outside you have the derivative of that inside function namely 2x the derivative of x squared is 2x just to recall remember how the chain rule works I'm gonna do a quick problem before doing this integral the chain rule works by saying you consider the inside function as one variable take the derivative as if it's one variable and then multiply it by the derivative of the inside function so let's take the derivative of this not the integral so let's take the derivative of this guy so remember the way you do that with the chain rule is you treat this entire inside function X cubed plus 2x plus 5 has one variable and you take the derivative of it well the derivative of one variable to the seventh power is seven times that one variable to the sixth power so that's the first part of the chain rule the second part of the chain rule says whatever you treat it as one variable you now have to multiply by the derivative of that thing so we treated X cubed plus 2x plus five as one variable so now I'm going to multiply by its derivative and the derivative of X cubed plus 2x plus 5 is obviously 3x squared plus 2 okay so a claim that's why this integral looks like someone did the chain rule because it looks like they treated x squared as one variable and then multiplied by the derivative of that thing they treat it as one variable namely 2x so if you think about it a second what would give you a derivative of two x times cosine x squared well if I look at sine x squared and take the derivative so using the same rule as we did before I'm gonna treat x squared as one variable so the derivative of sine of one variable is then cosine of that one variable and now I need to multiply it by the derivative of the thing I just treated as one variable so 2x okay and this is exactly the thing we're trying to integrate here so if the derivative of sine of x squared is 2x cosine of x squared then the antiderivative of 2x cosine x squared is sine x squared and of course since this is an indefinite integral I also have plus C remember every time we do an indefinite integral we allow for the addition of an arbitrary constant okay so this is in a way it's kind of misleading because we sort of you know eyeballed this and said well what function has 2x cosine x squared as a derivative and so if you're familiar with u substitution which hopefully you're a little familiar with I actually didn't do u substitution on this I just kind of guessed the integral so let's actually do this problem again using the machinery of U substitution so what the machinery of U substitution does is it kind of Engineers this reverse chain rule idea for you and so with u substitution the first step is to pick out your you or your inside function so even without noticing that the derivative of x squared exists in this integral I already know that x squared is kind of an inside function right it's being plugged in to this bigger function cosine so the first step in au substitution is to figure out what your U is and so I'm going to set u equal to x squared and then the next part is to solve for D U and so hopefully you're familiar with u substitution but just in case you aren't the way you get D u is you take the derivative of both sides of this equation so the derivative of U we write as d U and the derivative of x squared we write as 2 X and then DX essentially this is just keeping track of which variable you've taken the derivative with respect to it's D U in this D X so one thing to remember with U substitution is you can only integrate if your integral has all the same variable so in particular if you plug in U for x squared which I'll do here so I can write this as cosine of x squared which is cosine of U notice what's left over is 2x DX now if I were to write 2x DX here I don't want to do that because I think that can be a little confusing if I were to write 2x DX in this integral I would have an integral that had both use and X's in it and that can't be integrated because you can only integrate when you have all the same variable in an integral but if you notice what's left over 2x DX is exactly what do is write D U is exactly 2x DX so I can write instead of the 2x DX they can write to you and now this is an integral just in terms of one variable and it's a pretty quick integral to do write notice that this integral we started with is a lot more complicated and this is a pretty simple integral right this is an integral you can do I don't know you know the first day you learn about integrals in calc 1 so this equal the integral of cosine u is just sine U since we're not done you don't have to write the plus C but I like to write it here just so we don't forget it of course we're not quite done because I've asked for the integral of something in terms of X I can't give back an answer that's just in terms of U so to finish up I'm just gonna plug back in what u equals in terms of X so U is x squared so that means that this is sine of x squared plus C so notice this is the exact same answer we got before as before the only thing is that we didn't need to kind of eyeball it and notice you know what was going on with us 2x as the derivative of x squared it kind of did everything for us as soon as we picked out the correct use substitution to make this integral is particularly nice because we didn't have to fiddle around with this equation a lot sometimes you do have to fiddle around with the D U DX equation just to get things to match up so let's do another one where maybe we have to do that ok this integral looks pretty similar to the last one and so I'm going to proceed in kind of the same way I'm gonna say obviously the inside function the thing that's being plugged into another function is this X cubed here so let's just start with that so we have u equals x cubed and then as before I'll just do the derivative of both sides a derivative of U is d U and the derivative of x cubed is 3x squared DX but now note we have kind of a problem because I want to substitute in and make sure everything in this integral is in terms of U and not X so I'll be able to substitute in for X cubed because that's just equal to U but I can't yet substitute in for x squared DX because I don't have D U equals x squared DX I have D U equals 3x squared DX and this is something that new substitutions are really helpful with because I can just divide this whole equation by three and so I get 1/3 d u equals x squared DX which is exactly what I have left over once I deal with this secant squared okay so lets sub in carefully the secant squared X cubed becomes secant squared of U and then the x squared DX the other thing I have to substitute in for after I divided this equation by 3x squared DX is exactly 1/3 D u the nice thing is with a 1/3 well first write it like this but obviously since 1/3 is just a constant it can be brought outside of the integral sorry this is just one-third secant squared of U du u and now I can take the integral remember secant squared is a pretty quick integral to take because the derivative of tangent is secant squared so I get one-third tangent of U and then just like last time I have to plug back in for what my u substitution was to give me a function in terms of X so this equals one-third tangent of X cubed + C okay um let's actually take the derivative of this and make sure that it works out so if I want the derivative of one-third tangent of X cubed well it makes sense that I'd have to use the chain rule because remember the use of the u substitution method is the reverse chain rule so what would I do I would treat X cubed is one variable and so I get the derivative of tangent is secant squared and remember I'm treating x cubed is one variable so it's just secant squared of that one variable times the derivative of what I just treated as one variable so times 3x squared and now notice that the threes cancel and so what I get back is x squared secant squared of X cubed so really what the u-substitution machinery did here was a kind of took care of this extra three right where we saw our first problem here was that D U was three x squared rather than x squared and so he divided both sides of this equation by three and that gave us this one third in our integral once we did the u substitution and that got carried through to our answer here okay I want to talk about another way to do this integral that's not au substitution but when we get on further in the course and use substitution integrals are popping up as part of larger problems it helps to be able to do them really quickly without doing the full udu treatment that we did with this integral so another way I could do this is just by starting with a guess so I want something whose derivative is x squared secant squared X cubed so let's just make a guess and then if we're off we'll adjust the guess so as we said before how would I get a secant squared it's by taking the derivative of tangent and of course there's no way to get that inside function X cubed out if I take the derivative of tangent so I'm kind of stuck with that X cubed so let's just start with tangent of X cubed take the derivative see what we get so I take the derivative of this guy we kind of did this only with the one-third out front and in the previous method of doing the integral but I'll do it again kind of slowly so again this is a chainable problem I treat X cubed as one variable so I get secant squared of that one variable times the derivative of the thing I treated is one variable okay this was my first guess and notice I see that I'm off because I got back three x squared secant squared X cubed rather than x squared secant squared X cubed so well that's no big deal because I'm only off by a constant so let me just divide both sides of this equation by three so that three goes away and I get one-third tangent X cubed and sure enough the derivative as we saw in the previous slide of one-third tangent X cubed is x squared secant squared X cubed obviously this is a little harder to do because you're just kind of making a guess adjusting the guess and it doesn't really work with super complicated use substitution problems but it's a good technique to kind of have in your back pocket if a u-substitution is you know just one small part of a much larger problem okay let's do another u substitution problem here so you know the first part of au substitution integral is figuring out what you want your U of your inside function to be so I claim there are a couple of ways to see this here one way is you know there's no way you're getting this quadratic x squared plus 4x plus 3 out of this parenthetical term so right that's kind of stuck in there so in a way that has to be your inside function another way you can tell is that the derivative of the thing on the bottom or just the quadratic x squared plus 4x plus 3 is 2x plus 4 which is a multiple of X plus 2 so you know that this kind of makes sense as the derivative of the inside function if this guy's the inside function okay so let's go ahead and try this with that use substitution so again we'll make u equal to x squared plus 4x plus 3 take the derivative of both sides I get D U equals 2x plus 4 DX Tech if you really want to be pedantic about it you should have parentheses around this I'm not going to do that a lot because I think it just kind of makes things a little more confusing but technically DX is x this entire thing okay and then we say well I don't have 2x plus 4 left over in the integral but I do have X plus 2 which is what I get if I divide 2x plus 4 by 2 so just like in the last problem I have 1/2 D you just dividing both sides of the equation by 2 equals x plus 2 DX ok great that's enough to substitute in so what do I get back well I have to be a little careful I have X plus 2 DX that's 1/2 D U and then this is all over x squared plus 4x plus 3 which is U to the third so 1 over U to the third ok to integrate this remember the way you integrate this is you write this variable as being in the numerator and you have to change the sign of the exponent so this becomes 1/2 integral of U to the minus 3 D U and now it's a pretty quick inverse power rule integral so I remember the way you do that you add 1 to the exponent so the exponent here is minus 3 I'm gonna add one and get -2 and then you divide by the new exponent so I'm dividing by the new exponent which is minus 2 all right and so this gives me I have to be a little careful with the algebra here so I have a negative sign because of the minus 2 in the denominator here so this gives me negative 1 over 4 u squared it's usually nice to put your answer back with positive exponents so I had to move my you to the minus 2 back in to the denominator and then that makes the exponent positive and of course as usual we have to plug back in for what u equals in terms of X so our original substitution was u equal x squared plus 4x plus 3 and so my final answer is negative 1 over 4x squared plus 4x plus 3 squared plus C okay great so not so bad we had to do the same trick of dividing this equation here by two to get it to match up but again not so bad one thing to keep in mind is that a lot of times u substitution integrals are just perfectly engineered for you to be able to do them so for instance if I went back to my original integral here and change this to X plus two point one then notice we couldn't do this integral just that little change makes this an integral we can't do with u substitution why not because when I got down if I were to attempt the same method when I get to this step I want to be able to write some multiple of D u equals x plus two point one DX but notice there's no way to get that so it kind of be up a tree on this one so u substitution problems are kind of perfectly tailored for you to be able to do them that way okay let's do another one this is the first one we've seen that's a definite integral namely that it has these endpoints 0 and PI over 2 other than that it's pretty straight forward so if you want to think about it a second I'll let you think about what you believe the inside function should be and if you said sine X you're right because a couple of reasons first sign is definitely being plugged in to this exponential and second because it's derivative actually exists perfectly outside namely the derivative the sine is cosine so I'll set u equal to sine X D u equals cosine X DX and I'm actually going to leave the endpoints off for a reason that we'll talk about in a bit we're obviously going to come back to them but then substituting in I have e to the sine X but sine X is just u so I have e to the U and then what's left over cosine X DX which is exactly D u all right great the integral of e to the U the and get to much easier than that it's just e to you and now I'll plug back in for my original function in terms of X so this gives me e to the sine X and now that things are back in terms of X I can plug in the end points so the end points are 0 and PI over 2 all right let's plug these in so if I plug in PI over 2 to this function I get e to the sine PI over 2 and then minus what I get when I plug in 0 to this function so I get e to the sine 0 all right sine of PI over 2 is 1 so you e to the 1 sine of 0 is 0 so I get e to the 0 which is 1 okay so here's my answer but I actually want to say a little something about definite integrals and use substitution so these limits we put on this integral are really short for this integral goes from x equals 0 to x equals PI over 2 so that's why I left them off when I had my integral in terms of U because that's technically not equal to this integral in terms of U going from 0 to PI over 2 right because there's no sign involved anywhere so an alternate method to do definite integrals when you're using u substitution is to actually change these limits here this 0 in this PI over 2 so let's assume we did that so I'm going to kind of take this equality and continue this integral down here [Music] so if you remember the limits that I had in my original integral x equals zero x equals PI over two these are in terms of X but since this new integrals in terms of you I need limits in terms of U as well all right when you first see this it might be a little disconcerting because we're not used to switching limits of definite integrals right they're just something that are given to us with the integral and then we evaluate the integral with them at the end of the problem but if you think about it a second you know these limits are in terms of X we want limits in terms of U but U and X are by definition related by this equation here u equals sine X so in particular if x equals 0 then u equals sine 0 which is 0 and if x equals PI over 2 then u equals sine of PI over 2 which is 1 and so now the nice thing about this is that I don't have to convert back to X's like I did here I can just do this integral all in terms of use so I integrated I get e to the U evaluated from 0 to 1 so it's e to the 1 minus e to the 0 which is e minus 1 so notice we got the same thing we got of course you don't have to do it this way and I think sometimes people are confused by this new method because you're not used to changing limits of integrals you don't have to do it this way you can plug the X's back in as we did when we first did this integral and then evaluate the the definite integral in terms of the limits with respect to X ok let's do another one this one is a little bit different in that there isn't an obvious inside function you know with something like cosine of X cubed that X cubed is obviously the inside function but here we can look for something similar namely a function and its derivative and so if you look at this integral you have natural log T but you also have 1 over T well 1 over T is exactly the derivative of natural log T so that suggests that the thing whose derivative exists in the integral should be you so let's make the substitution and see why it works so I'll set u equal the natural log T and then D U is 1 over T DT and notice this substitutes in perfectly because the natural log T is just u and then what's left over is 1 over T DT which is exactly D u ok and then again we get a pretty simple integral to do just by the inverse power rule this is u squared over 2 and so this becomes Ln T quantity squared over 2 plus C ok not so bad especially once you're comfortable with the machinery of u substitutions alright let's do one that's maybe a touch harder because this is sort of like a double chain rule problem but again a lot of things tell us that this sine of X cubed should be the inside function if you made your inside function X cubed instead it would still work you would just have to do yet another u substitution but let's try just making sine of X cubed R U so if u is sine of X cubed then in order to find D u I have to do the chain rule to take the derivative of sine of X cubed but this almost looks exactly like our first integral we did here so I take the derivative treating X cubed as one variable and then multiply by the derivative of what I treated is one variable and notice what we have left over in the integral isn't 3x squared cosine X cubed DX it's just x squared cosine X cubed DX so I divide both sides by 3 I get 1/3 D u equals x squared cosine X cubed DX and so now I can substitute in so I'd get e to the u right because U is sine of X cubed and then everything else left over x squared cosine X cubed DX is exactly 1/3 D U so I get 1/3 do you obviously this integral is pretty quick it's just e to the U over 3 and then I substitute back in to get e to the sine of X cubed over 3 plus C okay I think this is a little talent in that you substitutions if you do them correctly a lot of times an integral that looks pretty complicated is actually pretty simple right this integral looked really bad but really the reason it kind of looks bad is just coming from the fact that this sine of X cubed has a complicated derivative namely 3x squared cosine of X cubed and we had to account for that in this equation here dividing by 3 ok let's do another one this is another one where the inside function is pretty obvious but there are some possible pitfalls so one issue is say were to make my u cosine theta that would still kind of work because the derivative of cosine is negative sine so I'd be able to substitute for whatever's left over but notice then I would have cube root of u plus 7 which can be done it's just a little more difficult than cube root of U so I claim this is a lot easier if I make my inside function not just cosine theta but the entire thing under this cube root so if I make my U cosine theta plus seven then D U is negative sine theta plus zero obviously D theta I don't have that negative in the integral so I'll divide by it or that's the same as multiplying the whole equation by minus one so I get negative D u equals sine theta D theta all right and now let's see what this becomes so I have cube root of exactly U and then this sine theta D theta becomes negative D you remember the way you'd integrate this is by changing that to an exponent so I have negative integral u to the one-third do you so gets a little tricky it's not so bad so I add one to the exponent if I add one to one-third I get 4/3 and then I divide by the new exponent remember dividing by a fraction is the same as multiplying by the reciprocal so I get 3/4 and then I still have this negative sign out here so it's negative 3/4 U to the 4/3 and then all I need to do is plug in my my U in terms of theta I'll write it over here because I'm running out of space so remember you was cosine theta plus 7 so I get negative 3/4 cosine theta plus 7 to the 4/3 + city ok so as with some of the later integrals we're seeing the algebra can be kind of tough but once you pick out the you correctly and you're able to solve for whatever's left over in the integral usually the integral becomes pretty straightforward okay this next one though is a little more difficult because there isn't the same kind of function and it's derivative that we've seen in the other problems and in general just knowing this is a u-substitution problem this is a little difficult but if you're told it's a uses use substitution problem let's kind of start with that and see where that gets us so the first step in au substitution in an integral is figuring out what your inside function is well if you had to choose what your inside function is here there's kind of not an obvious choice right namely it's the thing under the radical and then you have d u equals well the derivative of X plus 1 is just 1 so DX so there's no problem substituting the only problem is if I were to put in all these things well I would have this thing is U but then I have an extra X out there so we don't usually do this like mixing integrals with use and X's but I think it kind of helps for a problem like this so I still have this X out here I've square root of U and then I have DX which is the same as D u so the thing that keeps me from taking this integral is this this extra X here right this X weren't here I could take the center goal just using the inverse power rule well if you think about it for a second I want to change this X into something in terms of you well this equation here relates X and u so in particular if I want to know what X is in terms of U I can just subtract 1 from both sides of the equation and get u minus 1 equals x so this is I think this kind of hardest type of U substitution problem where you have to do some sort of transformation to get everything in terms of U in your integral so let's go ahead and write this in so this X becomes u minus 1 and then I have square root of U which Allred is U to the one-half and in order to do this integral I'll just multiply this through so this gives me the integral of u times U to the one-half is U to the 1 plus 1/2 which is u to the three-halves and then minus u to the one-half great and now I can actually do this with the inverse power rule just twice so I add 1 to the exponent I get you to the five-halves divide by the new exponent which is the same as multiplying by 2/5 same thing over the over here u to the three-halves times 2/3 and then obviously I have to put everything back in terms of X U is equal to X plus 1 so I have 2/5 X plus 1 to the 5 halves minus 2/3 X plus 1 to the 3 halves and then obviously plus C kind of ran out of space there so as I said this is definitely I think the most subtle kind of view substitution problem because there isn't an obvious derivative of the inside function but by kind of messing around with it a little bit we just said well the only thing that's keeping us from integrating is this X so it can write that X in terms of you just by using this original substitution equation ok let's do another one so this is one where I think it's maybe just a little harder to deal with the derivative of the inside function but just starting with this you'd say naturally well you know the inside function should probably probably be this rude X here because it's being plugged into secant squared and I'll write that as X to the one half then I take the derivative I get bu equals 1/2 X to the minus 1/2 DX and notice this is almost exactly what I have left over because X to the minus 1/2 is the same as 1 over root X ok the only difference in this integral is I don't have this two so let me just multiply both sides of this equation by two so I get to D u equals 1 over root X DX and so notice I have that exactly left over right 1 over root X well there's no one but its root X in the denominator 1 over root x times DX great so this gives me secant squared of U and we saw that before that's just that integrates to tangent and then the DX over root X becomes 2 times D u so I have to do right so this gives me 2 tangent of U and then plugging back in I have to engine of rude x plus c okay like a lot of integration techniques we'll see in this class you know it's obviously it's it's good practice to watch someone do u substitution problems but really there's no replacement for just doing them yourself and kind of seeing the issues you might run into seeing where you might be confused and just doing lots of examples is really helpful when you're learning a new technique like this