<s>[INST] 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?
 [/INST] 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}$$
</s>