Main content

### Course: AP®︎/College Calculus BC > Unit 6

Lesson 13: Using integration by parts- Integration by parts intro
- Integration by parts: ∫x⋅cos(x)dx
- Integration by parts: ∫ln(x)dx
- Integration by parts: ∫x²⋅𝑒ˣdx
- Integration by parts: ∫𝑒ˣ⋅cos(x)dx
- Integration by parts
- Integration by parts: definite integrals
- Integration by parts: definite integrals
- Integration by parts challenge
- Integration by parts review

© 2024 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Integration by parts: ∫𝑒ˣ⋅cos(x)dx

In the video, we learn about integration by parts to find the antiderivative of e^x * cos(x). We assign f(x) = e^x and g'(x) = cos(x), then apply integration by parts twice. The result is the antiderivative e^x * sin(x) + e^x * cos(x) / 2 + C. Created by Sal Khan.

## Want to join the conversation?

- Could the answer be simplified to e^x/2, due to sin x + cos x = 1?(2 votes)
- careful, sin x + cos x does not equal 1. sin^2(x) + cos^2(x) = 1(124 votes)

- Is the word integration means the same as antiderivatives ?(11 votes)
- Simon, you're correct, but I think your explanation is far too cumbersome to be of any help the person who may ask this kind of question.

Simply put, yes. Integrating and finding the anti-derivative mean the same thing.(13 votes)

- So taking derivatives of sin and cosine would end up in an infinite loop? i.e.
`Each entry is the derivative of the last.`

sinx , cosx, -sinx, - cosx , sinx ... until ∞(6 votes)- Yes, exactly.
`sin(x)`

cos(x)

-sin(x)

-cos(x)

The interesting part about taking the derivative of`sin(x)`

over and over and over is when you begin to have to solve dy^941/d^941x sin(x) = ?.

(Also, a personal milestone, this is my 800th answer! Yay!)(24 votes)

- Is there a way to solve this problem with the tabular method?(7 votes)
- I'm just learning this stuff myself, but I believe you have to be able to differentiate something down to zero in order to use the tabular method.(9 votes)

- This feels like integration by trickery(10 votes)
- Can anybody please tell me why whenever I try to change which is f(x) and g'(x), the answer is different?(6 votes)
- In this case the answer is the same, but in many cases one choice will make things more complicated and you will only get an answer by making a mistake!

ADDENDUM: It is also important to note that the substitution that works for the second integration depends on what substitution you did in the first integration.(4 votes)

- I am confused that why this question can't just leave it at integral by parts once, why need it twice? I mean, isn't the first time clear enough?(2 votes)
- After the first time we apply the integration by parts method to this expression we get an answer that includes another integral. We haven't solved the problem until we have an answer that doesn't include an integral.(8 votes)

- How would you integrate by parts for lets say, arc-cosine or arc-tangent?(2 votes)
- you would use the identity property of multiplication to make arccos into 1•arccos, then use integration by parts.

⌠arccosx dx=x•arccosx +⌠x/√(1-x²) dx (u=1-x²) = x•arccosx +(1/4)√(1-x²) + C

⌠arctanx dx=x•arctanx +⌠x/(1+x²) dx (u=1+x²) = x•arctanx + (1/2)ln|1+x²| + C

or x•arctanx + ln|√(1+x²)| + C(7 votes)

- Does anyone know a website with exercises of this topic?(2 votes)
- This site has some nice limit and calculus problems with detailed solutions: https://www.math.ucdavis.edu/~kouba/ProblemsList.html

Take a look in the integration by parts section.(7 votes)

- Mathematica gives the answer as
`(e^x * cos(x))/(ln x)`

. Is this correct (it probably is) and if so, how complicated is the simplification?(2 votes)- I plotted them both and this is not correct (try x=8),

f(8)=e^8*(sin(8)+cos(8))/2=1257. ....

g(8)=(e^8 * cos(8))/(ln 8)=-208. ....

The functions also behave differently at x=1, yours is very clearly 0 (due to the division by ln(0)=0, while Khans is very clearly about 1/2: (cos(1)*e^(1) / 2=0.5*2.7/2=0,7).

in mathematica, make sure to press 'esc' 'e' 'e' and again 'esc' to enter the 'e' function. For Cos use 'Cos[x]' (so capital letter, and those square brackets).(3 votes)

## Video transcript

Let's see if we can use
integration by parts to find the antiderivative of
e to the x cosine of x, dx. And whenever we talk about
integration by parts, we always say, well,
which of these functions-- we're taking a product
of two of these-- which of these functions, either the
x or cosine of x, that if I were to take its derivative,
becomes simpler. And in this case neither
of them become simpler. And neither of them become
dramatically more complicated when I take their
antiderivative. So here, it's kind of a
toss up which one I assign to f of x and which one
I assign to g prime of x. And actually, you can solve
this problem either way. So let's just assign this one. Let's assign f of x
equaling e to the x. And let's assign g prime of
x as equaling cosine of x. So let me write it down. We are saying f of x
is equal to e to the x, or f prime of x is
equal to e to the x. Derivative of e to the
x is just e to the x. And we can say that g-- we're
making the assignment-- g prime of x is equal
to cosine of x. And the antiderivative
of that g of x is also. Or the antiderivative
of cosine of x is just going to be
equal to sine of x. So now let's apply
integration by parts. So this thing is
going to be equal to f of x times g of x,
which is equal to e to the x times sine of x,
minus the antiderivative of f prime of x-- f prime
of x is e to the x. e to the x times g of x, which
is once again, sine of x. Now, it doesn't look like
we've made a lot of progress, now we have an
indefinite integral that involves a sine of x. So let's see if we can
solve that, let's see if we solve this one separately. So let's say if we were trying
to find the antiderivative. The antiderivative of e
to the x, sine of x dx. How could we do that? Well, similarly, we can set f
of x as equal to e to the x. So, and now this is
we're reassigning, although we're happening to make
the exact same reassignment. So we're saying f of x
is equal to e to the x. f prime of x is equal to
just the derivative of that, which is still e to the x. And then we could say
g of x, in this case, is equal to sine of x. We'll put these assignments in
the back of our brain for now. And then-- let me make this
clear-- g prime of x, let me, woops, there you go--
so we have g prime of x is equal to sine
of x, which means that its antiderivative
is negative cosine of x. Derivative of cosine
is negative sine, derivative of negative
cosine is positive sine. So once again, let's apply
integration by parts. So we have f of x times g of x. f of x times g of
x is negative-- is I'll put the negative
out front-- it's negative e to the x times cosine of x,
minus the antiderivative of f prime of xg of x. F prime of x is e to x. And then g of x is
negative cosine of x. So I'll put the cosine
of x right over here, and then the negative,
we can take it out of the integral sign. And so we're
subtracting a negative. That becomes a positive. And of course, we have
our dx right over there. And you might say, Sal, we're
not making any progress. This thing right
over here, we now expressed in terms
of an integral that was our original integral. We've come back full circle. But let's try to do
something interesting. Let's substitute back
this-- all right, let me write it this way. Let's substitute back
this thing up here. Or actually, let me
write it a different way. Let's substitute this for
this in our original equation. And let's see if we got
anything interesting. So what we'll get is
our original integral, on the left hand side here. The indefinite integral
or the antiderivative of e to the x cosine of
x dx is equal to e to the x sine of x, minus
all of this business. So let's just subtract
all of this business. We're subtracting all of this. So if you subtract negative
e to the x cosine of x, it's going to be positive. It's going to be positive
e to the x, cosine of x. And then remember, we're
subtracting all of this. So then we're going to subtract. So then we have minus the
antiderivative of e to the x, cosine of x,dx. Now this is interesting. Just remember all we did is, we
took this part right over here. We said, we used
integration by parts to figure out that it's
the same thing as this. So we substituted this back in. When you subtracted it. When you subtracted
this from this, we got this business
right over here. Now what's interesting
here is we have essentially an equation where we
have our expression, our original expression, twice. We could even assign
this to a variable and essentially solve
for that variable. So why don't we
just add this thing to both sides of the equation? Let me make it clear. Let's just add the integral
of e to the x cosine of x dx to both sides. e to the x, cosine of x, dx. And what do you get? Well, on the left
hand side, you have two times our original integral. e to the x, cosine of x, dx is
equal to all of this business. Is equal to this. I'll copy and paste it. So copy and paste. It's equal to all of that. And then this part, this part
right over here, cancels out. And now we can solve for
our original expression. The antiderivative of e
to the x cosine of x dx. We just have to divide
both sides of this, essentially an equation, by 2. So if you divide the
left hand side by two, you're left with our
original expression. The antiderivative of e
to the x cosine of x dx. And on the right hand side you
have what it must be equal to. e to the x sine of x, plus e
to the x cosine of x over 2. And now we want to be
careful because this is an antiderivative of
our original expression, but it's not the only one. We always have to remember,
even though we've worked hard and we've done-- we've used
integration by parts twice. And we've had to
back substitute in. We have to remember we should
still have a constant here. So if you take the
derivative of this business, regardless of what
the constant is, you will get e to
the x cosine of x. And it's actually a pretty
neat looking expression.