 So one form of integration of particularly messy functions is usually under the heading of trigonometric substitutions. And the thing to remember here is there's actually only two real integration techniques. There's u-substitutions and there's integration by parts. And the thing that's important to remember is that any other method, any other way we have of evaluating an integral is going to be based on some sort of algebraic or trigonometric identity. We're going to do some algebra. We're going to do some trigonometry. And then we might, at the end of it, after all the dust settles, we might combine the new method, the new integral that we have. And we might have to use one of these techniques, either u-substitution or integration by parts. But again, these are the only two actual integration techniques. Everything else is algebra and or trigonometry. And a trigonometric substitution is a special case of a u-substitution based on, I'm guessing it's actually going to be based on trigonometry. So we do need to have a quick review of some of the key elements of trigonometry. So let's take a look at that. Two important things to remember. We have the Pythagorean identities, sine squared plus cosine squared is equal to one. Of course, everybody remembers that one. But then the other one that's useful is that if I divide everything by cosine squared, then what I end up with is my second identity, tangent squared plus one equals secant squared. So dividing this by cosine squared gives me sine over cosine squared, that's tangent squared. Dividing this by cosine squared gives me one. Dividing this by cosine squared, one over cosine squared is our secant squared. So there's our second Pythagorean identity. And the other thing that's going to be really helpful here is to keep in mind what our values, the limiting values of these trigonometric functions are. So for sine and cosine, we know that these are always bounded by plus or minus one, and then for tangent can be anything, and secant always has to be either greater than or equal to one or less than or equal to one. And the thing to remember is that this is because secant is one over cosine, and if cosine is staying in this interval minus one to one, one over is going to be outside that interval greater than or equal to one or less than or equal to one. So for example, let's take a look at a nice tame integral, integral of one over square root one minus x squared dx. And so it would be nice if the universe told us how to solve this problem. But in general, the universe isn't so kind. And so what we have to do is we have to look at a problem like this and figure out the best way to approach it. And in general, if you're trying to find the antiderivative of some function, you should always begin with the hardest and most difficult technique you can possibly think, no, actually you should probably begin with the easy things. Good idea to try the easy things first, because if they work out, then you'll have solved the problem. And if they don't work out, you won't have spent a lot of time on something. So the easiest thing to do here is you might actually recognize that this integrand is the derivative of a familiar function. So maybe you remember that the derivative of inverse sine is one over square root one minus x squared. And if you do, you can find the antiderivative immediately without having to do any extra work. On the other hand, let's say you don't recognize that. Turned out that with a little bit of analysis, we can go quite a ways with our trigonometric integration. So what can we do? Well, notice that the integrand has this expression square root one minus x squared. And because our expression looks like that, x has to be between minus one and one. It's a square root. If x is outside these limits, then I'm going to be trying to take the square root of a negative number. And because the integrand looks like that, my x value has to be in this interval between minus one and one. And I might think back, well, what does that remind me of? That suggests that x is a lot like sine or cosine. And that's what suggests that we use the substitution x equals sine of theta. Now, in practice, we can use either sine or cosine. It doesn't make a difference. But because the derivative of sine is cosine and the derivative of cosine is negative sine, and we tend to drop or forget or lose the negatives, it's in practice easier if we use the substitution x equals sine rather than x equals cosine. Well, so we'll try that substitution x equals sine theta. Now, the differential, this is almost like a u substitution. My derivative is going to be cosine theta d theta. And I can now replace everything. So my original integral, x is sine theta. So every place I see an x, I'm going to get rid of it and replace it with a sine theta. Every place I see a dx, I can write cosine theta d theta. And there's my new integral. I can use my Pythagorean identity. One minus sine squared is cosine squared. I can use the fact that square root of a square drops it out. Cosine, cosine, there's an absolute value here we technically have to worry about, but we'll get to that later. And I have one of our cosine times cosine. I can do algebra. And I have this integral here. And this is not the world's easiest antiderivative, but it's close. Now, here's where we have to invoke the kindergarten rule. We have to put everything back to where we found it. We found an integral based on the derivative, based on the differential x as our variable. And we don't want to write our answer in terms of a different variable. So we need to replace this theta with some function of x. If only we had some idea of a relationship between x and theta. Oh, how about this? We know that x is equal to sine theta. And so what that tells us is that theta is the inverse sine of x. And so I can make my final replacement there. This integral is inverse sine of x plus my constant. Well, let's take a look at a different integral, antiderivative integral of one over one plus x squared dx. And again, the fastest way of doing this, the most efficient way of doing this is to remember that this integrand one over one plus x squared is actually what you get if you differentiate the inverse tangent function. On the other hand, if you don't remember that, then you can always do some algebra and trigonometry. This is really most of mathematics. You can remember stuff, but if you don't remember stuff, you can always do some algebra, some trigonometry, a little bit or later some higher order logic. You don't have to remember things in mathematics if you're willing to do a little bit of algebra, if you're willing to do a little bit of work in general. So here one plus x squared is in our denominator. And this value of x could be anything it wants to be. I don't really have any restrictions on the possibilities for x. And so what this suggests is that x is going to be like tangent, because tangent also has the possibility of being anything between plus or minus infinity. And what that leads to is that we may have the suggestion that we might use the substitution x equals tangent theta and differentiating the derivative c can squared theta d theta. And so that allows us to transform our original integral into a new integral. Every place I see x, I'll replace it with tangent. Every place I see dx, I'll replace it with c can squared theta. And so my old integral, my new integral, and again, I'll remember that Pythagorean identity that says one plus tangent squared is the same as c can squared. I'll do a little bit of algebra. This is the world's second easiest antiderivative. And again, I've got to put everything back where I found it. I started with an antiderivative in x. I want to make sure that I end with an antiderivative in x. So again, I rely on the fact that I have this beautiful relationship between theta and x. And so I know that theta is the inverse tangent of x, and there's my final answer.