<s>[INST] What is the integral of $\int e^x\,\sin x\,\,dx$? I'm trying to solve the integral of $\left(\int e^x\,\sin x\,\,dx\right)$ (My solution):
$\int e^x\sin\left(x\right)\,\,dx=$
$\int \sin\left(x\right) \,e^x\,\,dx=$
$\left(\sin(x)\,\int e^x\right)-\left(\int\sin^{'}(x)\,\left(\int e^x\right)\right)$
$\left(\sin(x)\,e^x\right)-\left(\int\cos(x)\,e^x\right)$
$\left(\sin(x)\,e^x\right)-\left(\cos(x)\,e^x-\left(\int-\sin\left(x\right)\,e^x\right)\right)$
$\left(\sin(x)\,e^x\right)-\left(\cos(x)\,e^x-\left(-\sin\left(x\right)\,e^x-\int-\cos\left(x\right)\,e^x\right)\right)$
I don't know how to complete because the solution gonna be very complicated.
 [/INST] Another way via leibniz theorem,
$$ \frac{d^4 (e^x \sin x)}{dx^4} =e^x \left[\binom{4}{0} \sin x+ \binom{4}{1} \cos x - \binom{4}{2} \sin x - \binom{4}{3} \cos x+ \binom{4}{4}  \sin x\right]$$
Or,
$$ \frac{1}{ \sum_{k=0}^2 \binom{4}{2k} } \frac{d^4 (e^x \sin x)}{dx^4} = e^x \sin x$$
Integrate both sides and apply leibniz for third derivative again,
$$ \int e^x \sin x dx =  \frac{1}{ \sum_{k=0}^2 (-1)^k \binom{4}{2k} } \int  \frac{d^4 (e^x \sin x)}{dx^4} dx=e^x \frac{\sum_{j=0}^3 \binom{3}{j} \sin( x + j \frac{\pi}{2})}{ \sum_{k=0}^2 (-1)^k \binom{4}{2k} }  $$
Since,
$$ \frac{d^i}{dx^i} \sin x = \sin( x +i \frac{\pi}{2} )$$
</s>