Main content

### Course: Integral Calculus > Unit 1

Lesson 14: Integrating using long division and completing the square# Integration using completing the square and the derivative of arctan(x)

Sometimes we can integrate rational functions by using the method of completing the square in the denominator and then integrating using u-substitution and our knowledge about the derivative of arctan(x).

## Want to join the conversation?

- this was amazingly complicated compared to all the preceding videos(83 votes)
- I kind of agree; it seems complicated from the perspective of Sal not really discussing integrals of the inverse trig functions. When he said "... recognize arctan..." I was pretty sure I had not seen arctan in this context. If someone thinks I've missed something, please let me know.(47 votes)

- Why do they never give examples or questions using the anti-derivative or arccos(x) in the next skill?

I want to be prepared of that in case someone were to ask me, or if I were to ever need the information myself.

Thanks in advance,

- ncochran2(14 votes)- By "anti-derivative", I'm assuming you mean the antiderivative of the inverse trig functions? Well, here they are:
`∫ arcsin x dx = x arcsin x + √(1 - x²) + C`

`∫ arccos x dx = x arccos x - √(1 - x²) + C`

`∫ arctan x dx = x arctan x - ½ln(1 + x²) + C`

`∫ arccot x dx = x arccot x + ½ln(1 + x²) + C`

`∫ arcsec x dx = x arcsec x - ln(x + √(x² - 1)) + C`

`∫ arccsc x dx = x arccsc x + ln(x + √(x² - 1)) + C`

Now I don't know whether you're looking at the course from the general calculus page or the AP Calc AB / BC page, but I know that this content will not be on the AP Exam (if you're in the AP course).

As for arccos, arccsc, and arccot, I wondered about that myself previously, and I found that it was simply due to mathematicians choosing the convention that arcsin, arcsec, and arctan were to be used for the integrals, as the other three are simply the negative of arcsin, arcsec, and arctan respectively.

Hope that I helped.(15 votes)

- Is there a general pattern to look out for to know when completing the square will lead to an expression similar to trig derivatives?(13 votes)
- Only the arc trig functions' derivatives are numerical. To spot these within integrals, I look for the pattern a^2 + b^2 or a^2 - b^2. If there is a + sign between the terms, the integral is likely to evaluate to something with either arctan or arccot. If there is a - sign instead, the result of the integral is likely to involve arcsin or arccos.

Completing the square always results in one of those patterns.. so if there is something that resembles a quadratic in the denominator of your integral, then you end up with an integral that requires a process similar to that of the video's.(3 votes)

- Ive gone through all the Calc videos before this. Never once have we covered derivative of arctan(x).(11 votes)
- You don't need to know the derivative of
`arctan(x)`

. Just do a simple substitution`u = tan t`

`∫1/(u^2 + 1) du`

= ∫sec^2(t) dt/(1 + tan^2(t))

= ∫dt

= t + C

= arctan(u) + C(1 vote)

- You don't need all that extra stuff to get your u. Much simpler to simply say: at 1/(x-3)^2 + 2^2, make u = x - 3. Then, when you take your antiderivative, you would get 1/5 (1/2 arctan (u/2) + C); distribute and unsubstitute for: 1/10 arctan (x+3)/2 + C.(8 votes)
- wha just hapend at3:07? why do we get ∫1/((x-3)/2^2)+1dx(6 votes)
- Sal divided everything by 4, so naturally, the 2^2 will be 1.(3 votes)

- at4:10, why do we multiply the nominator by half?(3 votes)
- du=.5dx, so in order to substitute the existing 1dx with du we must first multiply it by .5 -> multiply the nominator by half.(2 votes)

- Is using ln(x) another option to integrate this rational function instead of using arctan(x)? And how would you differentiate between the two cases? Or are they just two ways to do the same problem?

For instance, with the problem Sal showed in the video, if you took the antiderivative as ln(x), you'd end up with ln(x^2-6x+13)/10(x-3), unless I'm mistaken. Is this equivalent to the result Sal got?(3 votes) - I tried to solve problems without watching the video, then the first question just killed me. 😂(1 vote)
- It happens to the best of us 😂 Sometimes, it's hard to know where to start on a question type you've never seen before!(4 votes)

- when taking out the 4, why do we multiply it by 1/5 if it being added in the equation.(2 votes)

## Video transcript

- [Instructor] All right, let's see if we can find the indefinite integral of one over five x squared
minus 30x plus 65 dx. Pause this video and see
if you can figure it out. All right, so this is going
to be an interesting one. And it'll be a little bit hairy, but we're gonna work through it together. So, immediately you might try multiple integration techniques
and be hitting some walls. And what we're going to
do here is actually try to complete the square in this
denominator right over here. And then by completing the
square, we're gonna get it in the form that it looks
like the derivative of arctan. And if that's a big
hint to you, once again pause the video and try to move forward. All right, now let's do this together. So I'm just gonna try to
simplify this denominator so that my coefficient on
my x squared term is a one. And so I could just factor a
five out of the denominator. If I did that, then this
integral will become 1/5 times the integral of one over, so I've factored a five
out of the denominator so it is x squared minus six x plus 13 dx. And then as I mentioned I'm gonna complete the square down here. So let me rewrite it,
so this is equal to 1/5 times the integral of one over, and so x squared minus six x is clearly not a perfect square the way it's written. Let me write this plus 13 out here. Now what could I add and then I'm gonna to have to subtract if I don't want to change the value of the denominator. In order to make, In order to make this part right over
here a perfect square. Well we've done this before, you take half of your coefficient here, which is negative three
and you square that. So you want to add a nine here. But if you add a nine then you have to subtract a nine as well. And so this part is going to be x minus three squared and then this part right over here is going to be equal to a positive four and we of course don't want to forget our dx out here. And so let me write it in this form. So this is going to be equal to 1/5 times the integral of one over, get myself some space,
x minus three squared plus four, which we could also
write as plus two squared. Actually let me do it that
way, plus two squared dx. Now many of y'all might already say hey this looks a lot like arc tangent, but I'm gonna to try to
simplify it even more so it becomes very clear that it looks like arc tangent
is going to be involved. I'm actually gonna do some u substitution in order to do it. So the first thing I'm going to do is let's factor a four out
of the denominator here. So if we do that, then this is going to become 1/5 times 1/4 which is going to be 1/20 times the integral of one over x minus three squared over two squared. And this is going to be a plus one, and of course we have our dx. And then we could write this as, and I'm trying to just do every step here. A lot of these you might have been able to do in your head. One over, and I'll just write this as, x minus three over two squared plus one. Plus one and then dx. And now the u substitution
is pretty clear. I'm just going to make the substitution that u is equal to x minus three over two. Or we could even say that's u is equal to one half x minus three halves, that's just x minus three over two. And du is going to be
equal to one half dx. And so what I can do here is, actually let me start to re-engineer
this integral a little bit so that we see a one half here. So if I make this a one half and then I multiply the outside by two. So I divide by two multiply by two. It's one way to think about it. This becomes 1/10 and so
doing my u substitution I get 1/10, that's the 1/10
there times the integral of. Well I have one half dx right over here which is the same thing as du. So I can put the du
either in the numerator or I could put it out here. And then I have one over, this is u squared, u squared plus one. Now you might immediately recognize, what's the derivative of arctan of u? Well that would be one
over u squared plus one. So this is going to be equal to 1/10 times the arc tangent of u, and of course we can't forget our big constant C because we're taking
an indefinite integral. And now we just want to do
the reverse substitution. We know that u is equal to
this business right over here. So we deserve a little bit of a drum roll. This is going to be equal to 1/10 times the arc tangent of u. Well u is just x minus three over two, which could also be written like this. So arctan of x minus three
over two and then plus C. And we are done.