# Question Video: Finding the Integral of the Product between an Exponential Function and a Trigonometric Function Mathematics • Higher Education

By setting 𝑢 = 𝑒^𝑥 and d𝑣 = cos 𝑥 d𝑥, evaluate ∫𝑒^𝑥 cos 𝑥 d𝑥 by integrating by parts.

06:13

### Video Transcript

By setting 𝑢 equal to 𝑒 to the power of 𝑥 and d𝑣 equal to the cos of 𝑥 d𝑥, evaluate the integral of 𝑒 to the power of 𝑥 multiplied by the cos of 𝑥 with respect to 𝑥 by integrating by parts.

We’re given an integral to evaluate, and we can see that our integrand is the product of two functions. It’s 𝑒 to the power of 𝑥 multiplied by the cos of 𝑥. And we know a few different ways of evaluating an integral which is the product of two functions. In this question, we’re asked to use integration by parts. Let’s start by recalling what we mean by integration by parts. This tells us the integral of 𝑢 times d𝑣 by d𝑥 with respect to 𝑥 is equal to 𝑢 times 𝑣 minus the integral of 𝑣 multiplied by d𝑢 by d𝑥 with respect to 𝑥.

In other words, this gives us a method of integrating the product of two functions 𝑢 and d𝑣 by d𝑥. And in fact, in the question, we can see we’re told what to set our functions 𝑢 and 𝑣 equal to. We’re told to set 𝑢 to be 𝑒 to the power of 𝑥. And saying d𝑣 is equal to the cos of 𝑥 d𝑥 is differential notation to say d𝑣 by d𝑥 is equal to the cos of 𝑥. So we’ll set 𝑢 equal to 𝑒 to the power of 𝑥 and d𝑣 by d𝑥 to equal the cos of 𝑥.

Now, to use integration by parts, we see we need expressions for 𝑣 and d𝑢 by d𝑥. Let’s start with d𝑢 by d𝑥. That’s the derivative of the exponential function 𝑒 to the power of 𝑥 with respect to 𝑥. But we know the derivative of the exponential function with respect to 𝑥 is just the exponential function. So d𝑢 by d𝑥 is 𝑒 to the power of 𝑥. Now, let’s find an expression for 𝑣. 𝑣 will be an antiderivative of the cos of 𝑥. One way of finding this is integrating the cos of 𝑥 with respect to 𝑥. We know this will give us the sin of 𝑥 plus a constant of integration 𝐶. But we just need any antiderivative, so we’ll just use the sin of 𝑥.

We’re now ready to evaluate the integral of 𝑒 to the power of 𝑥 times the cos of 𝑥 with respect to 𝑥 by using integration by parts. Substituting in our expressions for 𝑢, 𝑣, d𝑢 by d𝑥, and d𝑣 by d𝑥 into our formula for integration by parts, we get 𝑒 to the power of 𝑥 times the sin of 𝑥 minus the integral of the sin of 𝑥 multiplied by 𝑒 to the power of 𝑥 with respect to 𝑥. And now we can see a problem. We don’t know how to evaluate the integral of the sin of 𝑥 times 𝑒 to the power of 𝑥 with respect to 𝑥. It has the same problems as our original integral.

Our integrand is the product of two functions. However, this time, we can notice something interesting. If we were to apply this integration-by-parts process one more time, we would integrate the sin of 𝑥, giving us negative the cos of 𝑥. So, in our integration-by-parts formula, since when we differentiate the exponential function we just get the exponential function, we would end up with the integral of negative the cos of 𝑥 times 𝑒 to the power of 𝑥 with respect to 𝑥. But this is exactly the integral we’re trying to calculate. So we could rearrange and solve for the value of this integral.

So let’s try applying integration by parts one more time. This time, we’ll use this to evaluate the integral of the sin of 𝑥 times 𝑒 to the power of 𝑥 with respect to 𝑥. We’ll set 𝑢 to be the exponential function 𝑒 to the power of 𝑥 and d𝑣 by d𝑥 to be the sin of 𝑥. By differentiating 𝑢 with respect to 𝑥, we get d𝑢 by d𝑥 is equal to 𝑒 to the power of 𝑥. And by integrating the sin of 𝑥 with respect to 𝑥, we get that 𝑣 is equal to negative the cos of 𝑥. Substituting in our expressions for 𝑢, 𝑣, d𝑢 by d𝑥, and d𝑣 by d𝑥 into our formula for integration by parts, we get 𝑒 to the power of 𝑥 times negative the cos of 𝑥 minus the integral of negative the cos of 𝑥 times 𝑒 to the power of 𝑥 with respect to 𝑥.

And we can simplify this expression. First, we can write 𝑒 to the power of 𝑥 multiplied by negative the cos of 𝑥 as negative 𝑒 to the power of 𝑥 times the cos of 𝑥. Similarly, we can simplify our integral. We have a factor of negative one inside of our integrand. We can take this outside of our integral, so we’re just instead adding the integral. Then, we can just rewrite our integrand as 𝑒 to the power of 𝑥 multiplied by the cos of 𝑥. So we’ve now shown the integral of the sin of 𝑥 times 𝑒 to the power of 𝑥 with respect to 𝑥 is equal to negative 𝑒 to the power of 𝑥 times the cos of 𝑥 plus the integral of 𝑒 to the power of 𝑥 multiplied by the cos of 𝑥 with respect to 𝑥.

Now, all we need to do is substitute this expression for the integral of the sin of 𝑥 times 𝑒 to the power of 𝑥 with respect to 𝑥 into our formula for our original integral. Substituting this expression in, we get 𝑒 to the power of 𝑥 times the sin of 𝑥 minus negative 𝑒 to the power of 𝑥 multiplied by the cos of 𝑥 plus the integral of 𝑒 to the power of 𝑥 times the cos of 𝑥 with respect to 𝑥. And now we can start simplifying this expression. We’ll start by distributing negative one over our parentheses. This gives us 𝑒 to the power of 𝑥 sin 𝑥 plus 𝑒 to the power of 𝑥 cos 𝑥 minus the integral of 𝑒 to the power of 𝑥 cos of 𝑥 with respect to 𝑥.

And remember, this is equal to the integral of 𝑒 to the power of 𝑥 cos of 𝑥 with respect to 𝑥. And we can see this expression appears on both sides of our equation. So we can solve for this by adding the integral of 𝑒 to the power of 𝑥 cos of 𝑥 with respect to 𝑥 to both sides of this equation. Adding this to both sides of our equation, on the left-hand side, we’ll now have two times the integral of 𝑒 to the power of 𝑥 times the cos of 𝑥 with respect to 𝑥. And on the right-hand side of this equation, our third term is canceled out. This gives us 𝑒 to the power of 𝑥 times the sin of 𝑥 plus 𝑒 to the power of 𝑥 times the cos of 𝑥.

Now we’ll divide both sides of our equation through by two. And remember, since we’re calculating a definite integral, we’ll need a constant of integration. We’ll call this 𝐶. The last thing we’ll do is rearrange this expression and take out the common factor of 𝑒 to the power of 𝑥. And this gives us one-half 𝑒 to the power of 𝑥 multiplied by the sin of 𝑥 plus the cos of 𝑥 plus our constant of integration 𝐶.

Therefore, by using integration by parts twice, we were able to show that the integral of 𝑒 to the power of 𝑥 times the cos of 𝑥 with respect to 𝑥 is equal to one-half 𝑒 to the power of 𝑥 multiplied by the sin of 𝑥 plus the cos of 𝑥 plus the constant of integration 𝐶.