Find $\int e^x \sin x \, dx$
Answer & explanation
Correct answer: option 2
The correct answer is Option (2) → $\frac{e^x}{2} (\sin x - \cos x) + C$
Take $e^x$ as the first function and $\sin x$ as second function. Then, integrating by parts, we have
$I = \int e^x \sin x \, dx = e^x (-\cos x) + \int e^x \cos x \, dx$
$= -e^x \cos x + I_1 \text{ (say)} \quad ... (1)$
Taking $e^x$ and $\cos x$ as the first and second functions, respectively, in $I_1$, we get
$I_1 = e^x \sin x - \int e^x \sin x \, dx$
Substituting the value of $I_1$ in $(1)$, we get
$I = -e^x \cos x + e^x \sin x - I \text{ or } 2I = e^x (\sin x - \cos x)$
Hence, $I = \int e^x \sin x \, dx = \frac{e^x}{2} (\sin x - \cos x) + C$