 Hello and welcome to this screencast on integration by substitution or u substitution. In this one we're asked to integrate secant squared of 3x with respect to x. Now this is a composite function which is good. That's a sign we should use integration by substitution. But it's a composite function in two ways. So if I rewrite this a little bit, I can rewrite this secant squared as secant of 3x. The whole thing squared, that's what secant squared means. And I notice there's really two inner functions going on here. We have secant inside the square, but then we also have the 3x inside the secant. So this is two composite functions nested together. And so the question is which of those should we use as the inner function? Well, two things come to mind. First off, a good rule of thumb is to use the innermost function if you can for your substitution. The second thing that I remember is this fact from calculus which is the derivative with respect to x of tangent of x is secant squared of x. And that's good because I have a secant squared in this problem and I now know an antiderivative that's tangent. So that means if I could get this integral down to just secant squared then I can integrate that and get just tangent. So that indicates that I should choose the 3x to be my innermost part and so that's going to be my u. So here's where I'll start writing that. Let u be 3x and that leaves us with du is 3dx. Now we don't have a 3dx in the integrand, we only have a dx. So as usual, it's a very common trick, I'm going to divide by 3 and get a dx on its own. So now I have this 3x that's u matching the 3x in the integrand. I have this dx matching the dx in the integrand and so I have everything I need to completely replace every x with a dx or with a u or du. So let's write this integral out from scratch. So here's the very first thing I have, the integral of secant squared 3x dx. I'm going to replace everything with a u or a du so that there's no x's left. So this turns into the integral of secant squared u and the dx becomes 1 third du. That's good, there's no more x's left by the constant multiple rule for integrals I can pull the 1 third out front and so now all I have left is secant squared of u, the integral of that with respect to u. And what I wrote up on the top of the screen right here says that if I know secant squared is the derivative of something then I know what the original function was and that's tangent. So in other words I know an antiderivative. So we get 1 third tangent of u plus an unknown constant. But I started with x's so I'm going to have to end with x's. So I'm ending with 1 third tangent and u is the same thing as 3x plus an unknown constant. And there is my general antiderivative for secant squared 3x with respect to x. Now the nice thing about this is we can always double check. So you can pause here if you want. On the next screen we'll do a derivative to check. Here I've written what we found on the last screen. So to check if I think I've really found an antiderivative I can take its derivative. So I'll take the derivative with respect to x of 1 third tangent 3x plus a constant. Well this is a chain rule problem, 3x is on the inside and so this is equal to 1 third and I'll do the derivative of the outside that's secant squared 3x times the derivative of the inside. That's the derivative of 3x with respect to x. And the constant just becomes 0. Simplifying that 3 and the 1 third I get secant squared 3x which exactly matches what I started with. So that's a check. I know that I have found an antiderivative.