Problem 170
Medium Hyperbolic Integrals and Integration by Parts

Evaluate the integral: I = integral e^axcos bx dx

Evaluate the integral: $$ I = \int e^{ax}\cos bx\,dx. $$

Explanation of Method

Applying integration by parts twice to $\int e^{ax}\cos bx\,dx$ returns the original integral (times a constant), which can then be solved for algebraically — the companion to Problem 169's sine version.

  1. Apply integration by parts with $u=\cos bx$, $dv=e^{ax}dx$.
  2. Apply integration by parts again to the leftover $\int e^{ax}\sin bx\,dx$.
  3. Solve algebraically for the integral.

Step 1 · First integration by parts

Let:

$$ u = \cos bx \quad \Rightarrow \quad du = -b\sin bx\,dx, \qquad dv = e^{ax}\,dx \quad \Rightarrow \quad v = \frac{1}{a}e^{ax}. $$

Applying the formula:

$$ I = \frac{1}{a}e^{ax}\cos bx + \frac{b}{a}\int e^{ax}\sin bx\,dx. $$

Step 2 · Second integration by parts

For $\displaystyle\int e^{ax}\sin bx\,dx$, let $u=\sin bx$, $dv=e^{ax}dx$, so $du=b\cos bx\,dx$, $v=\tfrac1ae^{ax}$:

$$ \int e^{ax}\sin bx\,dx = \frac{1}{a}e^{ax}\sin bx - \frac{b}{a}\int e^{ax}\cos bx\,dx = \frac{1}{a}e^{ax}\sin bx - \frac{b}{a}I. $$

Step 3 · Solve for the integral

Substituting back:

$$ I = \frac{1}{a}e^{ax}\cos bx + \frac{b}{a}\left(\frac{1}{a}e^{ax}\sin bx - \frac{b}{a}I\right) = \frac{1}{a}e^{ax}\cos bx + \frac{b}{a^2}e^{ax}\sin bx - \frac{b^2}{a^2}I. $$

Collecting the $I$ terms:

$$ \frac{a^2+b^2}{a^2}I = \frac{1}{a}e^{ax}\cos bx + \frac{b}{a^2}e^{ax}\sin bx. $$

Step 4 · Solve and simplify

$$ I = \frac{1}{a^2+b^2}\left(ae^{ax}\cos bx + be^{ax}\sin bx\right) + C. $$


Summary Table

Quantity Value
First IBP$\tfrac1ae^{ax}\cos bx + \tfrac{b}{a}\int e^{ax}\sin bx\,dx$
$\int e^{ax}\sin bx\,dx$$\tfrac1ae^{ax}\sin bx-\tfrac{b}{a}I$
Solving$\tfrac{a^2+b^2}{a^2}I=\tfrac1ae^{ax}\cos bx+\tfrac{b}{a^2}e^{ax}\sin bx$

Additional Notes

Result

The solution to the integral is:

$$ I = \frac{1}{a^2+b^2}\left(ae^{ax}\cos bx + be^{ax}\sin bx\right) + C. $$