Integrating $\int_{-\infty}^0e^x\sin(x)dx$ I ask if anyone could solve the following:
$$\int_{-\infty}^0e^x\sin(x)dx=?$$
I can visually see that it will converge and that it should be less than $1$:
$$\int_{-\infty}^0e^x\sin(x)dx<\int_{-\infty}^0e^xdx=1$$
But I am unsure what its exact value is.
Trying to find the definite integral by integrating by parts 4 times only results in $e^x\sin(x)$, which got me nowhere.
How should I evaluate this?
 A: Integrating by parts two times you get
$$\begin{align}
\int e^x \cdot \sin x \quad dx & = e^x \cdot \sin x - \int e^x \cdot \cos x \quad dx\\
& = e^x \cdot \sin x - \left( \int e^x \cdot \cos x \quad dx \right)\\
& = e^x \cdot \sin x - \left( e^x\cdot \cos x +  \int e^x \cdot \sin x\quad dx\right)\\
& = e^x \cdot \sin x -  e^x\cdot \cos x -  \int e^x \cdot \sin x\quad dx\\
& = e^x \cdot \left( \sin x - \cos x\right)-  \int e^x \cdot \sin x\quad dx\\
\end{align}$$
hence
$$\int e^x \cdot \sin x \quad dx = e^x \cdot \left( \sin x - \cos x\right)-  \int e^x \cdot \sin x\quad dx\\
\Rightarrow \int e^x \cdot \sin x \quad dx = \frac{e^x \cdot \left( \sin x - \cos x\right)}{2}$$
Finally finding $\int_{-\infty}^0e^x\sin(x)dx$ it's just a matter of substitutions
$$
\begin{align}
\int_{-\infty}^0e^x\sin(x)dx &= \frac{e^x \cdot \left( \sin x - \cos x\right)}{2} \Big|_{-\infty} ^0\\
&= \frac{1 \cdot \left( 0 - 1\right)}{2} - \lim_{x \to -\infty} \frac{e^x \cdot \left( \sin x - \cos x\right)}{2}\\
&=-\frac{1}{2} - 0\\
&=-\frac{1}{2}
\end{align}$$
A: $$
\int_{-\infty}^0e^x\sin(x)dx = 
\mbox{Im}\int_{-\infty}^0 e^{x(1+i)}dx
=\mbox{Im}\left.\frac{1}{1+i}e^{x(1+i)}\right|_{-\infty}^0
=\mbox{Im}\frac{1}{1+i}=\mbox{Im}\frac{1-i}{2}=-\frac{1}{2}.
$$
A: It can easily be done by applying by parts twice:
Let
$$ I=\int e^x \cdot \sin x \quad dx = e^x\sin x-\int e^x\cos x\,dx$$
for the second one apply by parts,
$$\int e^x\cos x\,dx=e^x\cos x+I$$
so, $$I = \frac{1}{2} e^x (\sin x -\cos x)$$
A: In combination with yhhuang's answer, I think I have a similar explanation:
$$\int e^x\cdot\sin(x)dx=\int e^x\cdot\text{Im}(\cos(x)+i\sin(x))dx$$
$$=\int e^x\cdot\text{Im}(e^{xi})dx$$
$$=\text{Im}\int e^{x(1+i)}dx$$
I found this easier to understand.
