 Let's take a look at an example of computing an anti-derivative using this technique of trigonometric substitution. So let's evaluate the integral of the function, the square root of nine minus x squared divided by x squared and find its anti-derivative respect to x. Now this square root right here is gonna be indicative to us that we should be using that trigonometric substitution. The reason is that you see a square root, but inside the square root, we see this difference of squares nine minus x squared. Now we saw previously our ancient codex. There's three types of trigonometric substitutions we should be using. And the first type is actually the type that appears in our situation. Here if we take a to be three, notice that a squared is equal to nine. And that's exactly what we have here, the square root of nine minus x squared, all right? And so our codex is telling us that we should take the substitution x equals three sine theta. And we're gonna be wanting to use this Pythagorean identity. So let's go back to this situation here. So let me get rid of this squiggle right there. So let's use the substitution that was suggested. We're gonna take x is equal to three sine theta. Now, as this is gonna be a substitution, we do also have to deal with the dx. Taking the derivative of x here with respect to theta, we'll get three cosine theta d theta, okay? And so we're gonna make some substitutions going into this expression. But before we go any further, it is often useful to consider the following right triangle diagram. So the reason we're introducing, of course, these trigonometric substitutions in the first place is we're trying to utilize right triangle trigonometry to help us out here. That's what we mean by this Pythagorean identity. Now, some people prefer just to use the algebraic identity we saw on the previous screen. But honestly here, I like to think of it in terms of this diagram right here. We have this right triangle with respect to the angle theta. Okay? What do we know about theta here? Well, it really comes down to this identification we did, x equals three sine theta. If I divide both sides by three, I get sine theta is equal to x over three. And so what we know about theta is we know it's sine ratio. The sine of theta will be x over three. So if we have a right triangle whose interior angle is theta, then we know that the sine, which is opposite over hypotenuse, would look like x thirds. So we could take the triangle whose opposite side is x and whose hypotenuse is three. Well, how do we find the adjacent side of said triangle right here, right? Well, it would really come down to the Pythagorean equation. We know whatever this side is, the adjacent side, if we square it and add it to the opposite side, squared, this will equal the hypotenuse squared. Now solving for the adjacent side, we see that the adjacent side squared would equal the hypotenuse squared, which is three squared, minus the opposite side squared, which is an x squared. We see that the adjacent side is none other than the square root of nine minus x squared. Now, if that looks familiar to you, that means you've been paying attention here, right? The square root of nine minus x squared was the indicator that I got this whole trigonometric substitution started in the first place. So it should hopefully come as no surprise that the third side of this triangle is none other than the square root that got this thing activated. And so that's an important thing to notice here. And we're gonna see this in future examples as well, as we do these triangle diagrams. The third side will be the square root that made us think we wanted to do a trig substitution in the first place. All right, so with that said, we're in a position where we can start to simplify these things. Well, that is to say, when I say simplify, I mean, let's take the integral that's on the top here and start writing in terms of theta, instead of x anymore. Well, let's do the easy parts first. There's an x squared on the bottom. X is three sine theta. So we're gonna get a nine sine squared in the denominator. Likewise, the dx is part of the integral. Sometimes we leave it off, which is really unfortunate because it's a geometric part of these rectangles. It's the thickness of the rectangle here. The dx itself is three cosine d theta. So we're gonna put that in as well. Don't forget the d theta or the dx part. That's probably one of the most common mistakes with these trigometric substitutions. Now, what do we do with this square root of nine minus x squared? Well, there's two ways we can kind of approach this. One of them is just to take the nine, the square root of nine minus x squared and replace the x with a three sine theta. And you can do that, right? Of course, you'll get the square root of nine minus nine sine squared theta. Factor out the nine, you get the square root of nine, the square root of one minus sine theta, sine squared theta. Now, using the trigometric identity, one minus sine squared is equal to cosine squared. This becomes a three cosine. So that is of course why this identity is being used right here, right? But on the other hand, we made some statements about the domain I didn't really talk about. The reason we made those statements about the domain is because we're referring to this angle right here. If we restrict the angle theta, we have a genuine triangle and instead of using identities, you could actually use the geometric intuition of the triangle. Notice if you take this square root right here, this is the adjacent side. If you take the constant side, which is the hypotenuse, what we can say is the square root of nine minus x squared over three is equal to cosine theta. Times in both sides by three, we get that the square root of nine minus x squared is equal to three cosine theta. So something that I often do is when I do a trigonometric substitution, I talk about what is x? So what's the substitution there? What's a dx? But I also wanna say what is the square root that made me wanna do a trig sub in the first place? And so using either this identity approach or using this triangle approach, I'll be using the triangle approach for the most part. We see that the square root of nine minus x squared is the same thing as three cosine theta. And so if we make that substitution into the integral here, we get a three cosine theta. And so then we try to make some substitutions here, the sub substitutions, sorry, we try to calculate this integral. Now some simplification, of course, there's three times three on top, they cancel the nine on the bottom. We have two cosines on the top, we have two signs on the bottom in which case we then get the integral of cosine squared theta d theta over sine squared. And so what we've done is we've now turned our algebraic integral into a purely trigonometric one. And then how we proceed to compute this anti-derivative, it depends a lot on the nature of the trigonometric integral. There's a couple of approaches you could try to take here. You could probably do a u-substitution, maybe integration of parts. Some trig identity will probably be necessary here at some point. Now the approach I'm gonna take is the following, cosine over sine is the same thing as cotangent. So this is actually just a cotangent squared d theta. And so what do you do with a cotangent? Well, cotangent by itself might not be the best one to integrate, but using the identity that one plus cotangent squared is cosecant squared, I could rewrite this as cosecant squared theta minus one, d theta. Now the reason this identity here is preferable or replacing cotangent squared with cosecant squared minus one is that cosecant squared is an sort of obvious derivative. That is, remember that the derivative of cotangent is negative cosecant squared. So as we break this thing up, we take the integral of cosecant squared theta d theta minus the integral of d theta. Well, here I'm gonna take a negative cosecant, so a double negative. And so therefore the anti-derivative of negative cosecant squared is cotangent. So we get a negative cotangent theta. And then the anti-derivative of d theta is just theta. So we get a negative theta plus a constant. So this right here, we don't wanna get too excited because we just found an anti-derivative. So we think we're done. This of course is just the start, right? This found the anti-derivative in terms of theta. We didn't find the anti-derivative in terms of x. And so we might have to scroll back up the screen a little bit here. And we see that we can try to play around with this equation right at the top. And I will do that for a second, right? Because if you take this equation, this three equals three, this x equals three sine theta. Well, we said a moment ago, sine theta equals x over three. And this also gives us theta equals sine inverse of x over three. And we're gonna make that substitution in down below particularly right here. We're going to get, as our solution, we're gonna get a negative sine inverse. I guess I don't need to do this in blue, we'll do it in white. If we do sine inverse of x over three, that takes care of the theta. And admittedly, we could just plug that into the cotangent. We could take negative cotangent of sine inverse of x over three. That would be a correct answer. Now, this one right here, I'm not gonna be a big fan of having the inverse trigonometric function inside of the trigonometric function. We could try to simplify that, especially if we come back up to this triangle diagram right here. There's a lot of clutter going on here, so I'm gonna clean up some of this just to get it out of the way. Of course, what we saw, we know the three sides of this triangle. We know that adjacent side is the square root of nine minus x square. The opposite side is x. The hypotenuse is three. Well, what can we say about cotangent? Now, if you're not sure, remember cotangent, of course, is going to be the reciprocal of tangent. Tangent, we usually remember as opposite over adjacent. So cotangent's gonna be adjacent over hypotenuse. Sorry, adjacent over opposite. In which case, using this description, that would give us the square root of nine minus x squared over x. And that's actually what we're gonna use for cotangent of the angle. So coming down here, instead of taking cotangent of sine inverse of something, we write that as a negative square root of nine minus x squared over x. And this right here then gives us an antiderivative using the original variable x. We no longer using this intermediate variable theta that we introduced into it. And so some takeaways from this example right here is that use that codex we saw on the previous slide to help you identify what is the correct trigonometric substitution. That got us this part right here. This will be given to you by that codex in the square root that's in the problem. Once you have the right substitution, make sure you compute dx. Also figure out how does the square root translate into the trigonometry. I would recommend drawing your right triangle and using that to encode from the language of x to the language of theta. But then at the end of the problem, keep this handy because we can use the triangle to translate back from theta in terms of x giving us our antiderivative. We're gonna have to be able to calculate antiderivatives of trigonometric functions like we saw in the previous section. And so there's a lot going on here but with enough practice, we can get really good at this very useful technique known as trigonometric substitutions.