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.
- Apply integration by parts with $u=\sin x$, $dv=e^{-x}dx$.
- Apply integration by parts again to the leftover $\int e^{-x}\cos x\,dx$.
- 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
- The integrand is defined for all real $x$.
- Because $v=-e^{-x}$ carries a minus sign (unlike the $v=e^{ax}/a$ used in Problems 169–170 with a general positive-looking exponential), it's easy to lose track of a sign when substituting $\int e^{-x}\cos x\,dx$ back into the expression for $I$; matching against the general formula $\int e^{ax}\sin bx\,dx=\tfrac{e^{ax}(a\sin bx-b\cos bx)}{a^2+b^2}$ with $a=-1,\,b=1$ confirms the result.
- The result can be checked by differentiating $-\tfrac12e^{-x}(\sin x+\cos x)$: this gives $\tfrac12e^{-x}(\sin x+\cos x)-\tfrac12e^{-x}(\cos x-\sin x)=e^{-x}\sin x$, matching the integrand.
Result
The solution to the integral is: