 The Pythagorean identities allow us to rewrite any even power of a trigonometric function in terms of an even power of a co-function. So sine squared is equal to 1 minus cosine squared, cosine squared is 1 minus sine squared, tangent squared is secant squared minus 1, and secant squared is 1 plus tangent squared, and we have similar relationships for the other functions. In addition, we can reduce powers of some trigonometric functions. So the half-angle identities give us cosine squared x equals 1 half plus 1 half cosine 2x, and sine squared x is 1 half minus 1 half cosine 2x, which reduces a power of sine or cosine, and integration itself gives us the integral of secant squared is equal to tangent, which reduces the integral of a power of secant. So if I want to integrate tangent to the fourth, secant to the fourth, there's a long series of rules for how to integrate powers and products of trigonometric functions, don't waste your time memorizing them, understand why they work instead. Remember, don't memorize procedures, understand concepts. So since the derivative of tangent equals secant squared, let's break off a factor of secant squared and see what happens. Now this will be useful if we can rewrite everything else in terms of tangent, and we have our Pythagorean identity, tangent squared plus 1 equals secant squared. And so this remaining factor of secant squared can be replaced. Now if we make the substitution u equals tangent x, then du equals secant squared x, and our integral becomes, which we can expand, and integrate. And then putting everything back where we found it gives us our final answer. Or if we have something like this, well, again, since the derivative of tangent equals secant squared, let's break off a factor of secant squared. However, secant x cannot be rewritten in terms of tangent x without introducing a square root. And remember, we don't really want to try and integrate a square root. And so we should try something else. So we also know that the derivative of secant is secant x tangent x, so let's split off a factor of secant x tangent x. And now we can see if we can rewrite everything else in terms of secant. So remember the Pythagorean identity is in terms of the square of a trigonometric function, so let's rewrite our integrand a little. So remember tangent squared x plus 1 equals secant squared, and so we can replace tangent squared x with, we can expand if we let u equals secant x, du equals secant x tangent x, and so we can get, which we can evaluate. Then putting everything back where we found it gives us our final answer.