Integrals Involving sin x , cos x and Exponential Functions

Tutorial to find integrals involving the product of   sin x   or   cos x   with exponential functions. Exercises with answers are at the bottom of the page.
All the integrals included in the examples belo are evaluated using Integration by Parts given by: \[ \int U \dfrac{dV}{dx} \, dx = UV - \int \dfrac{dU}{dx} V \, dx \] The integration by parts helps in evaluating integral of product of functions of the form U dV/dx .

Examples

In what follows, C is the constant of integration.

Example 1

Evaluate the integral \[ \int \sin(x) e^x \, dx \] Solution to Example 1:
Let \( u = \sin(x) \) and \( \dfrac{dv}{dx} = e^x \) which gives \( u' = \cos(x) \) and \( v = \displaystyle \int e^x \, dx = e^x \).
Use the integration by parts \[ \int U \dfrac{dV}{dx} \, dx = UV - \int \dfrac{dU}{dx} V \, dx \] as follows \[ \int \sin(x)e^x \, dx = \sin(x)e^x - \int \cos(x)e^x \, dx \] We apply the integration by parts (one more time) to the term \( \displaystyle \int \cos(x)e^x \, dx \) in the expression above, hence \[ \int \sin(x)e^x \, dx = \sin(x)e^x - \cos(x)e^x - \int \sin(x)e^x \, dx \] Note that the term on the right is the integral we are trying to evaluate, hence the above may be written as follows \[ 2 \int \sin(x)e^x \, dx = \sin(x)e^x - \cos(x)e^x \] Hence the integral is given by \[ \int \sin(x)e^x \, dx = \dfrac{1}{2} e^x (\sin(x) - \cos(x)) + C \]

Example 2

Evaluate the integral

\[ \int \cos(2x) \, e^x \, dx \] Solution to Example 2:
Substitution: Let \( u = \cos(2x) \) and \( \dfrac{dv}{dx} = e^x \) which gives \( u' = - 2 \sin(2x) \) and \( v = \displaystyle \int e^x \, dx = e^x \) :
Apply the integration by parts: \[ \int U \dfrac{dV}{dx} \, dx = UV - \int \dfrac{dU}{dx} V \, dx \] as follows \[ \begin{align*} \int \cos(2x)e^x \, dx &= \cos(2x)e^x - \int e^x \, \dfrac{d}{dx}[\cos(2x)] \, dx \\[6pt] &= \cos(2x)e^x - \int e^x (-2\sin(2x)) \, dx \\[6pt] &= \cos(2x)e^x + 2 \int e^x \sin(2x) \, dx \end{align*} \] Apply integration by parts to the term on the right \[ \begin{align*} \int \cos(2x)e^x \, dx &= \cos(2x)e^x + 2 \left( \sin(2x)e^x - 2 \int \cos(2x)e^x \, dx \right) \\[6pt] &= \cos(2x)e^x + 2\sin(2x)e^x - 4 \int \cos(2x)e^x \, dx \end{align*} \] Note that the term on the right \( \int \cos(2x)e^x \, dx \) is related to the integral we are trying to evaluate, we group and write that \[ 5 \int \cos(2x)e^x \, dx = \cos(2x) \, e^x + 2 \sin(2x) \, e^x \] The given integral is evaluated as \[ \int \cos(2x) \, e^x \, dx = \dfrac{1}{5} e^x ( \cos(2x) + 2 \sin(2x) ) + C \]

Example 3

Evaluate the integral \[ \int \sin(3x + 2) \, e^{3x} \, dx \] Solution to Example 3:
Substitution: Let \( u = \sin(3x + 2) \) and \( \dfrac{dv}{dx} = e^{3x} \) which gives \( u' = 3 \cos(3x + 2) \) and \( v = \displaystyle \int e^{3x} \, dx = \dfrac{1}{3} e^{3x} \).
Apply the integration by parts \[ \int \sin(3x + 2) \, e^{3x} \, dx = \sin(3x + 2) \dfrac{1}{3} e^{3x} - \int \cos(3x + 2) \dfrac{1}{3} e^{3x} \, dx \] Apply the integration by parts one more time to the term \( \int \cos(3x + 2) e^{3x} \, dx \) \[ \displaystyle \int \sin(3x + 2) e^{3x} \, dx = \dfrac{1}{3} \sin(3x + 2) e^{3x} - ( \cos(3x + 2) \dfrac{1}{3} e^{3x} + \int \sin(3x + 2) e^{3x} \, dx ) \] Note that the term on the right is the integral to be evaluated, hence the above may be written as \[ 2 \displaystyle \int \sin(3x + 2) e^{3x} \, dx = \dfrac{1}{3} \sin(3x + 2) e^{3x} = \dfrac{1}{3} \sin(3x + 2) e^{3x} - ( \cos(3x + 2)\dfrac{1}{3} e^{3x} \] Divide all terms by 2 and simplify \[ \int \sin(3x + 2) e^{3x} \, dx = \dfrac{1}{6} e^{3x} ( \sin(3x + 2) - \cos(3x + 2) ) + C \]

Example 4

Evaluate the integral \[ \int \cos(4x) \, e^{2x + 5} \, dx \] Solution to Example 4:
Substitution: Let \( u = \cos(4x) \) and \( \dfrac{dv}{dx} = e^{2x + 5} \) and apply the integration by parts twice \[ \begin{align*} \int \cos(4x)e^{2x + 5} \, dx &= \tfrac{1}{2} e^{2x + 5} \cos(4x) + 2 \int e^{2x + 5} \sin(4x) \, dx \\[6pt] &= \tfrac{1}{2} e^{2x + 5} \cos(4x) + 2 \left( \tfrac{1}{2} e^{2x + 5} \sin(4x) - 2 \int e^{2x + 5} \cos(4x) \, dx \right) \end{align*} \] The term on the right \( \int e^{2x + 5} \cos(4x) \, dx \) is the integral to be evaluated, hence \[ \int \cos(4x) \, e^{2x + 5} \, dx = \dfrac{1}{10} e^{2x + 5} ( \cos(4x) + 2 \sin(4x) ) + C \]

Exercises

Evaluate the following integrals.
1. \( \quad \displaystyle\int \cos(x) \, e^x \, dx \)
2. \( \quad \displaystyle \int \sin(2x) \, e^{3x} \, dx \)
3. \( \quad \displaystyle \int \cos(-3x + 5) \, e^{5x} \, dx \)
4. \( \quad \displaystyle \int \sin(-4x + 3) \, e^{-2x + 1} \, dx \)


Answers to Above Exercises

1. \( \quad \dfrac{1}{2} e^x ( \cos(x) + \sin(x) ) + C \)
2. \( \quad \dfrac{1}{13} e^{3x} ( 3 \sin(2x) - 2 \cos(2x)) + C \)
3. \( \quad \dfrac{1}{34} e^{5x} ( 5 \cos(-3x + 5) - 3 \sin(-3x + 5) ) + C \)
4. \( \quad \dfrac{1}{10} e^{-2x + 1} ( 2 \cos(-4x + 3) - \sin(-4x + 3) ) + C \)

More References and links