Integrate $\int x e^{x} \sin x dx$ 
Evaluate:
$$\int x e^{x} \sin x dx$$

Have you ever come across such an integral? I have no idea how to start with the calculation.

By indeterminate coefficients:
A term like $xe^x\sin x$ can be generated by the derivative of itself (due to $e^x$), which will also generate $xe^x\cos x$ and $e^x\sin x$.
Then we are tempted to try
$$f(x)=e^x(x(A\sin x+B\cos x)+(C\sin x+D\cos x)),$$
and
$$f'(x)=e^x(x(A\sin x+B\cos x)+(C\sin x+D\cos x)+(A\sin x+B\cos x)+x(A\cos x-B\sin x)+(C\cos x-D\sin x)).$$
We identify,
$$A-B=1,\\A+B=0,\\C+A-D=0,\\D+B+C=0$$
and obtain
$$\frac12xe^x(\sin x-\cos x)+\frac12\cos x.$$
