 Let us do one concluding example as we finish up lecture 13 on trigonometric substitution. Now this one's a bit of a doozy, so bring some popcorn with you for this ride. Let's evaluate the integral of x dx over the square root of three minus two x minus x squared. Now the reason I say this is a doozy that in the last example, we can still use, we saw that you can still use trigonometric substitution even if the polynomial is not of the form x squared plus or minus a squared or something like that. That's to say that the x squared could have a coefficient into it. But it turns out that things can be a little bit more complicated. As you can see in this example, we do have a square root and inside that square root is a quadratic polynomial three minus two x minus x squared. But unlike previous examples, we don't have any sum or difference of squares going on here. Now as it might not be the most desirable thing, but it turns out that's not an obstacle that necessarily stops us here because this quadratic polynomial, we can complete the square which would turn this quadratic polynomial into a polynomial of the form plus the difference or sum of squares. And so just as a reminder, how does one complete the square? So take the polynomial as it is, right? Sometimes when we wish in life, people will just take us as we are. Just take the polynomial as it is. And what we're gonna do is then we're gonna separate the constant term three from the variables. So I'm gonna factor out the leading coefficient of the x which is a negative sign. So we have three minus x squared plus two x. And then I'm gonna leave sort of like a space. It's somewhat suggestive that there's someone who's supposed to go right here. So we get this three minus x squared plus two x. And so we have to identify who's our guest of honor, who is gonna go into this luxurious seat at the table. So to identify that, we look at this middle coefficient and we're gonna take half of that. So one half of two gives us a one. And then taking this number that we just got which is a one, we're gonna square it. One squared which itself is one. That's our guest of honor which we're gonna add in there. So we get x squared plus two x plus one which is a perfect square trinomial. We're trying to utilize this fact that x plus a quantity squared is the same thing as x squared plus two a, two a x plus a squared. So that's what we did here. We took this coefficient, took half of it, that gave us a and then we square it. And that's what we're gonna add right here. So we add a one, but whatever we do we have to undo so that equality is still balanced. And so since we added a one, well, J.K. on that one, we actually subtracted a one. So what we need to do is we need to subtract, we need to add the opposite of what we did. So since we subtracted one, we actually need to add a one to compensate for that. Or if you don't like that, really we need to subtract a negative one times one. If this coefficient was a little bit more complicated, whatever coefficient you see here is what you would put right here as well in front of that a squared. And so factoring this thing, we now have three plus, so we have the three plus one which is a four and then minus the x squared plus two x plus one. But now this trinomial here were factor and it factors as four minus x plus one quantity squared like so. And so we're able to complete the square and using this completed square, we can actually do our trigonometric substitution. Now again, bear with me here, how does the trig sub gonna work here? We'll notice we have a constant squared minus our function, our variable squared. And so when you have a constant squared minus variable squared, that indicates we're gonna do a sine substitution. All right? And so what we're gonna do is we take whatever the variable squared is, in this case it's x plus one. We're gonna take x plus one and we're gonna equal it to, we'll take the square root of this constant which is two and that equals sine theta. So the right hand side should always look like a two sine, a two tangent, a two secant based upon whether we're doing a difference of squares or sum of squares, things like that. And then whatever the variable is being squared, it's gonna be a function expression. You're gonna write that on the left hand side. So we get x plus one is equal to two sine theta. And this is gonna be the substitution, the equation for which everything else is derived. So some things to be aware of, what's dx? Well, if we take the derivative of that boxed equation implicitly, the left hand side just becomes a dx. The right hand side becomes a two cosine theta d theta. We're gonna need that for our substitution. If we start solving for theta, notice that sine theta is gonna equal x plus one over two. And using this observation, we can construct our right triangle. Let me draw that real quick. We get our right triangle like so. Associate to the angle theta here. Sine has the ratio of opposite over hypotenuse, x plus one over two. And then we need to identify the other side of this equation. Using the Pythagorean equation, we're gonna get two squared, which is four. You see that this guy right here. Then subtract from it x plus one squared. And then you're gonna take the square root of that. So we get the square root of four minus x plus one squared. This was the square root that activated this whole process. Now, we only need to complete the square at the beginning to know what the right trig identity is. If you want, you can write the expanded form. We can instead use the square root of three minus two x minus x squared. There's not gonna be any benefit of having the square completed for the rest of the problem. We just needed to know how to complete the square so that we could get this appropriate substitution going on there. So notice using this triangle, if we combine together the square root side with the constant side, that's an adjacent over hypotenuse. We can use cosine, in which case we then see that the square root of three minus two x minus x squared is gonna equal two cosine theta. So like we've seen many times, whatever the original substitution is, in this case, two sine, the square root is gonna equal that same constant times the BFF, the best friend forever of our function. Sine's friend is cosine, tangent's friend secant, secant's friend is tangent. You're gonna see that each and every time. And so now with all these ingredients we're ready to do our integral. Now as a reminder, what was the original problem? We have to take the integral of x over the square root dx. So x remember, now we have an x plus one equals two sine. We can replace x, then if you just track one, you get x is equal to two sine theta minus one. So that's what goes in our numerator, two sine theta minus one. The dx, like we saw earlier, was a two cosine theta d theta. And then the square root on the bottom wasn't also a two cosine theta. So simplifying the two cosines from the top and bottom cancel out. And I'm gonna bring this to the bottom. Turns out the spike completing the square, I actually got a quite a benign integral here. We just have to integrate two sine theta minus one d theta. Which by its typical use rules of antiderivatives, antiderivative of two sine theta will be a negative two cosine theta. Antiderivative of negative one is a negative theta. We get plus a constant there. So let's identify, well let's translate these things back into terms of x. We already know about two cosine. That's four two is. Two cosine is the same thing as the square root. So we're gonna get negative the square root of three minus two x minus x squared. And again, like I keep on saying, I actually prefer to have the expanded out quadratic instead of the completed square with exception of finding the original substitution. That way the square root resembles the original square root we had. But then we have this negative theta we have to deal with. And as we've seen many times, we can work by this using the original substitution, which was in our box right here. So we saw earlier that sine theta equals x plus one over two. So take arc sine of that. So we're gonna get arc sine of x plus one over two and then throw in your arbitrary constant. And that gives us the antiderivative we find right here. And so the treatment, the technique of trigonometric substitution is quite versatile. It could be used in a variety of locations. What makes us want to do a trigonometric substitution is whenever you take the square root of a quadratic polynomial, by using techniques like completing the square or some other type of substitution, you can actually always find the correct trigonometric substitution, either using sine, tangent or secant to convert your integral into a trigonometric integral. Using techniques we developed in section 7.2 like trig substitutions and the like, we can calculate the antiderivative of that trig integral and therefore we can get an antiderivative of our function, which we can use to find area in the curve or various other things. So one thing I like to mention at the end of this trigonometric substitution section is that we spend so much time trying to compute trigonometric integrals and the question was why are we really gonna see trigonometric integrals that often? Well, it turns out that examples like this one and other ones we've seen in this section is that even if you have a perfectly natural algebraic function, trigonometric substitution might be necessary to find its antiderivative for which case you're then turning an algebraic function into a trigonometric one and we have to be able to compute trigonometric integrals in order to help us out there. And so like I said, that brings us to the end of lecture 13 on trigonometric substitution. Thanks for watching everyone. If you do like these videos and like to see more of them in the future, feel free to click the subscribe button and click the like button for these videos here. If you have any questions, please post those in the comments below and I'll be happy to answer them. If you would like a full transcript of these lecture videos, you can click on the links below and you can actually get a printed version for which these lecture notes are based upon. And with that, I'll sign out. I will see you all next time which we will talk about the technique of partial fraction, partial fraction decomposition and how that's relevant for integration. See you then. Bye everyone.