If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

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

AP.CALC:
FUN‑6 (EU)
,
FUN‑6.E (LO)
,
FUN‑6.E.1 (EK)

## 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 would we r take a product of two of these which of these functions e to 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 its 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 is equal lling 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 that G of X is also or the antiderivative of cosine of X is just going to be equal to sine of X 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 times sine of X minus 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 sine of X DX D DX now it doesn't look like we've made a lot of progress now we have an indefinite integral that involves the sine of X so let's see if we can solve that that let's see if you can 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 is equal to e e to the X so 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 e to the X f of x is equal to 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 whoops there you go so we have G prime of X 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 let's let's apply integration by parts so we have we have f of X times G of X f of X times G of X is negative is up with a negative out front its negative e to the X negative e to the x times cosine of X times cosine of X minus minus the antiderivative of f prime of XG of X F prime of X is e to the X e to the 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 have we're subtracting a negative that becomes a positive and of course we have our we have our DX right over there and you might say sound 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 let's substitute back this or let me write it this way let's substitute back this thing this thing up here up here or actually let me write it a different way let's substitute this this for this in our original and 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 the X sine of X e to the X sine of X sine of X minus minus all of this business so let's just subtract all of this because 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 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 minus the antiderivative of e to the X e to the X cosine of X cosine of X DX DX now this is integrand just remember all we did is we took this part right over here we said we use 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 if we have essentially an equation where we have our expression our original expression twice we can 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 bat to both sides e to the X cosine of X DX and what do you get well on the left hand side you have 2 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 2 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 two 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
AP® is a registered trademark of the College Board, which has not reviewed this resource.