Problem 168
Medium Hyperbolic Integrals and Integration by Parts

Evaluate the integral: I = integral e^-xsin x dx

Evaluate the integral: $$ I = \int e^{-x}\sin x\,dx. $$

Explanation of Method

Applying integration by parts twice to $\int e^{-x}\sin x\,dx$ returns the original integral, which can then be solved for algebraically rather than integrated a third time.

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

Step 1 · First integration by parts

Let:

$$ u = \sin x \quad \Rightarrow \quad du = \cos x\,dx, \qquad dv = e^{-x}\,dx \quad \Rightarrow \quad v = -e^{-x}. $$

Applying the formula:

$$ I = -e^{-x}\sin x + \int e^{-x}\cos x\,dx. $$

Step 2 · Second integration by parts

For $\displaystyle\int e^{-x}\cos x\,dx$, let $u=\cos x$, $dv=e^{-x}dx$, so $du=-\sin x\,dx$, $v=-e^{-x}$:

$$ \int e^{-x}\cos x\,dx = -e^{-x}\cos x - \int e^{-x}\sin x\,dx = -e^{-x}\cos x - I. $$

Note that the leftover integral here is subtracted, since both $v$ and $du$ carry a minus sign, and $(-1)\times(-1)=+1$ multiplying $\int e^{-x}\sin x\,dx$ inside $-\int v\,du$.

Step 3 · Solve for the integral

Substituting back:

$$ I = -e^{-x}\sin x + \left(-e^{-x}\cos x - I\right) \quad \Rightarrow \quad 2I = -e^{-x}(\sin x+\cos x). $$

So:

$$ I = -\frac12e^{-x}(\sin x+\cos x) + C. $$


Summary Table

Quantity Value
First IBP$-e^{-x}\sin x+\int e^{-x}\cos x\,dx$
$\int e^{-x}\cos x\,dx$$-e^{-x}\cos x - I$
Solving$2I=-e^{-x}(\sin x+\cos x)$

Additional Notes

Result

The solution to the integral is:

$$ I = -\frac12e^{-x}(\sin x+\cos x) + C. $$