How to Integrate x(e^x)cos(x) and x(e^x)sin(x)

The method of integration by parts can be used to find the antiderivatives of two-product functions such as x*cos(x), x*e^x, and (e^x)cos(x), but what about the triple product of a polynomial, trig function and exponential function? How do you integrate function such as x*cos(x)*e^x and x*sin(x)*e^x? Is there an integration by parts formula for the product of three functions? In fact, there is. If you have the integral

∫ f(x)*g(x)*h'(x) dx

then you can reduce the integral to a simpler form with the reduction equation

∫ f(x)*g(x)*h'(x) dx = f(x)g(x)h(x) - ∫ f(x)*g'(x)*h(x) dx - ∫ f'(x)*g(x)*h(x) dx

With several applications of this integral reduction formula you can work out the antiderivative of the product of a linear function, trig function, and exponential function.

Integration by Parts Formula for Three Functions

Integrals of x*cos(x)*e^x and x*sin(x)*e^x : Circular Method

For the function y = x*cos(x)*e^x, we will use the assignment f(x) = x, g(x) = cos(x), and h'(x) = e^x. This gives us f'(x) = 1, g'(x) = -sin(x), and h(x) = e^x. Plugging these various pieces into the integration by parts formula gives us

∫ x*cos(x)*e^x dx
= x*cos(x)*e^x - ∫ cos(x)*e^x dx + ∫ x*sin(x)*e^x dx
= x*cos(x)*e^x - 0.5cos(x)*e^x - 0.5sin(x)*e^x + ∫ x*sin(x)*e^x dx

The integral of cos(x)e^x was worked out in a previous tutorial, linked above. The equation above gives the integral of x*cos(x)*e^x in terms of the integral of x*sin(x)*e^x. So now we must apply the triple integration by parts formula to the second one, which gives us

∫ x*sin(x)*e^x dx
= x*sin*e^x - ∫ sin(x)*e^x dx - ∫ x*cos(x)*e^x dx
= x*sin(x)*e^x + 0.5cos(x)*e^x - 0.5sin(x)*e^x - ∫ x*cos(x)*e^x dx

Again we get one integral in terms of the other, so it seems like we can only go around in circles. But let's see what happens when we substitute this expression in for the integral of x*sin(x)*e^x in the first equation. This gives us

∫ x*cos(x)*e^x dx =
x*cos(x)*e^x - 0.5cos(x)*e^x - 0.5sin(x)*e^x + x*sin(x)*e^x +
0.5cos(x)*e^x - 0.5sin(x)*e^x - ∫ x*cos(x)*e^x dx

If we bring the integral terms to one side of the equation and solve for the integral using simple algebra, we get

∫ x*cos(x)*e^x dx =
(1/2)[ x*sin(x)*e^x + x*cos(x)*e^x - sin(x)*e^x ] + c

Similarly, we can use simple algebra to solve for the complementary integral

∫ x*sin(x)*e^x dx =
(1/2)[ x*sin(x)*e^x - x*cos(x)*e^x + cos(x)*e^x ] + c

Related Integrals

You can use the method above to compute more general integrals of functions of the form

y = (ax + b)cos(kx)e^(rx)

y = (ax + b)sin(kx)e^(rx)

which are the products of a linear function, trigonometric function, and exponential function. You can also use the circular integration by parts trick to find the antiderivatives of similar functions involving higher degree polynomials, such as

y = (x^2)cos(x)e^x

y = (x^3)sin(x)e^x

In general, if P(x) is a polynomial function of x, then the antiderivative of P(x)cos(x)e^x and P(x)sin(x)e^x will be of the form

Q(x)cos(x)e^x + R(x)sin(x)e^x

where Q(x) and R(x) are polynomials of the same degree as P(x).

Integration Example

Find the exact area under the curve y = x*cos(x)*e^x from x = 0 to x = π/2, shown in the graph below.

Since the antiderivative of y = x*cos(x)*e^x is 0.5(e^x)[(x-1)sin(x) + x*cos(x)], we simply plug the endpoints x = 0 and x = π/2 into the antiderivative expression and subtract. This gives us

0.5(e^(π/2))[(π/2-1)*1 + (π/2)*0] - 0.5(e^0)[-1*0 + 0*1]

= [π/4 - 1/2]*e^(π/2)

≈ 1.3729.

More by this Author

Comments 2 comments

nick 22 months ago

How do you integrate ln(x)sin(x)x and ln(x)cos(x)x?

calculus-geometry profile image

calculus-geometry 22 months ago from Germany Author

Hi Nick, these are non-integrable functions, but you can express their antidiervatives in terms of Si(x) and Ci(x) using integration by parts with u = ln(x) and dv = x*sin(x) or x*cos(x). ( See )

To the Comcast customer in Georgia, there is no math text editor on this platform, but best of luck with your C!

    Sign in or sign up and post using a HubPages Network account.

    0 of 8192 characters used
    Post Comment

    No HTML is allowed in comments, but URLs will be hyperlinked. Comments are not for promoting your articles or other sites.

    calculus-geometry profile image

    TR Smith (calculus-geometry)213 Followers
    452 Articles

    TR Smith is a mathematician, programmer and product designer who has taught math for 30 years, and uses it every day!

    Click to Rate This Article