 If we can identify the terms of an expression with the hypotenuse and sides of a right triangle, we can find a trigonometric relationship between the terms. For example, let's consider the integral of x squared over x squared plus 4. Now in this particular integrand, this denominator of x squared plus 4 is problematic, so let's see if we can construct a right triangle where this expression x squared plus 4 comes up naturally. The fundamental relationship we have in right triangles is the Pythagorean theorem. In a right triangle, we have a squared plus b squared equals c squared, where a, b, and c are the lengths of the sides, and we'll want to identify our terms with the side of a triangle. And we might note that x squared is x squared and 4 is 2 squared, so we'll take a right triangle with sides x and 2. So let's see if we can draw a picture where two sides of a right triangle have lengths of x and 2. And since we have two sides of a right triangle, we'll be able to use the Pythagorean theorem to find a relationship between all three sides. There are many possibilities for such a triangle, but we'll want one that also leads to the expression x squared plus 4. So again, if you don't play, you can't win. So let's just put down x and 2 and our third side c and see what happens. Since we have three sides of a right triangle, we can use the Pythagorean theorem to write a relationship between the three sides, and we see that the expression x squared plus 4 comes up naturally if we make these choices for the sides of our triangle. Since we are interested in a trigonometric substitution, let's go ahead and find the actual length of that third side and then see what trigonometric relationships we can dig up. So we do need to designate a particular angle as our theta, so let's use this one. Now we have a right triangle where this expression x squared plus 4 comes up naturally. So let's see if we can use a trigonometric relationship. There are several trigonometric relationships we can use. We could look at the sine of theta, which will be the opposite over the hypotenuse, the cosine of theta, which will be the adjacent over the hypotenuse, or we could look at the tangent of theta, which will be the opposite over the adjacent. All three of these relationships must hold between x and theta. So we could use any one of these in our next step. We'll start with the simplest one. We'll let tangent of theta equal x over 2. At this point, we're going to do a lot of algebra and a lot of trigonometry and very little calculus. So hold on to your hats and here we go. If we let tangent of theta be x over 2, then we find x is equal to, and so x squared is. We also need to do something about this differential. So again, if tangent of theta is x over 2, then differentiating, which tells us that dx is going to be. So I'll make a bunch of substitutions here. Now, this rather horrible mess can be simplified because we have a couple of basic trigonometric identities that we could use. And because we have tangent and secant, we want to use the fundamental trigonometric identity that relates tangent and secant, tangent squared plus 1 equals secant squared. But I don't have tangent squared plus 1. I have 4 tangent squared plus 4. Well, that's okay. We can do a little bit of algebra. And that allows me to simplify the integrand. Now, if I knew what the antiderivative of tangent squared was, we'd be in great shape. Unfortunately, we don't. But we can use our fundamental Pythagorean identity for secant and tangent to rewrite that tangent squared. And that gives us a new integral. And what makes this useful is that secant squared is the derivative of a known function so we can find the antiderivative. Our last step is putting everything back into place. And because we started with an integral in terms of x, we need to end with an antiderivative in terms of x. Fortunately, we know something about tangent theta. Tangent theta is x over 2. And that means that theta itself is our tangent x over 2. And so that gives us our antiderivative. What about integral square root 9 minus x squared? So again, in the expression 9 minus x squared, the terms x squared and 9, which is 3 squared, can be identified with two of the sides of a right triangle. There are many possibilities, but we'll want one that naturally leads to the expression 9 minus x squared. Again, if you don't play, you can't win. So we'll throw down x and 3 and see if we get an expression that we want. So maybe we'll try this if we use the Pythagorean theorem. But that doesn't give us our 9 minus x squared. Well, as the saying goes, if at first you don't succeed, give up and join the circus. Possibly I misheard that. I would try again maybe changing where we put our 3. If we apply the Pythagorean theorem now and maybe do a little algebra, we do get this expression 9 minus x squared. And finally, since we are interested in finding the trigonometric relationships here, we'll need to throw in an angle theta. Again, there are many trigonometric relationships we can use. We could find the sine, cosine, or tangent of the angle theta. And because we seek to impress bands of wandering rogue mathematicians, we should pick the most complicated expression possible. But we'll start with the simplest one. And that seems to be sine of theta equals x over 3. So at this point, we have to do a lot of trigonometry, a lot of algebra, and a tiny bit of calculus. So let's get started. From sine theta equals x over 3, we have... We also need to do something with our differential. So from 3 sine theta equals x, we can differentiate both sides to get. We'll do a bunch of substitutions. So if I want to simplify this mess, we'll pull in the Pythagorean identity for sine and cosine. And since I want to say something about 9 sine squared, I'll multiply everything by 9 and do a little algebra. I'll do a little algebra. And we should be concerned that when we take this square root, we are going to have to worry about the S-I-G-N sign, but we'll take care of that later. We can use another trigonometric identity to reduce this product of cosines, and then finally do some final algebraic cleanup to give us a new integrand. That constant factor of 9 halves can be removed outside of the integral. And we can find the anti-derivative of cosine 2 theta plus 1, and we have our anti-derivative, except this is in terms of theta and not in terms of x. Since we started in x, we need to end in x. Now we do have a trigonometric identity for sine of 2 theta, so we can replace the sine of 2 theta in our integral. And from our initial triangle, we know sine of theta, cosine of theta, and theta itself must be the arc sine of x over 3.