Indefinite integral of $e^{-x} \sin x$

calculusindefinite-integralsintegration

I'm trying to solve this indefinite integral using the integration by parts
$$ \int e^{-x} \sin(x) \,dx$$

but I'm stuck on the second iteration, which takes me to:

$$\int e^{-x} \sin(x) \,dx = -e^{-x} \sin(x) -e^{-x} \cos(x)-\int e^{-x}\sin(x) \,dx$$

Given the integration by parts formula of $\int u\,dv = uv – \int v\,du$

Which I applied twice, once with $u=\sin(x)$ and $du=e^{-x}$, and once with $u=\cos(x)$ and $du=e^{-x}$.

At this point my only guess was to simplify, having as result:

$$1 = -e^{-x} \sin(x) -e^{-x} \cos(x)-1$$

$$ = -e^{-x} (\sin(x) + \cos(x) + 2) $$

Which however appears to be wrong, since the correct answer should be:

$$ -\frac{1}{2} e^{-x} (\cos(x) + \sin(x))$$

Thanks in advance for your help

Best Answer

I'm not sure what led you to suspect that $\int e^{-x}\sin x\,dx=1.$ Probably, as David points out in the comments, you were attempting to mimic an approach you'd seen before, but had thought the stand-in $I$ was a $1,$ instead. Also, there should always be something on both sides of an equation, so even if $\int e^{-x}\sin x\,dx=1$ were true, then you'd have $$0=-e^{-x}\sin x-e^{-x}\cos x-2,$$ or $$0=-e^{-x}(\sin x+\cos x)-2.$$ Do you see the differences between this and your last equation, and why this is "correct" under your misunderstanding?

A lot of times, as a space- and time-saving measure, we'll represent integrals as $I$ or $J$ while integrating by parts. We don't even need a stand-in, though, to solve it. Adding $\int e^{-x}\sin x\,dx$ to both sides of your equation, you get $$2\int e^{-x}\sin x\,dx=-e^{-x}\sin x-e^{-x}\cos x.$$ Pulling out the common factor of $-e^{-x}$ on the right-hand side, then multiplying both sides by $\frac12,$ we're done.

Related Question