I tried to integrate $x e^x \sin x$, using integration by parts, and setting $\frac{\, \mathrm dv}{\, \mathrm dx} = e^x \sin x$. Even though I got really close, I kept getting it wrong. Can someone please solve it with working out? Thanks in advance.
**********EDIT***** I have found the answer, all thanks to those who contributed :) I don't know if I could of connected the answer here but I just posted it below, thank you all again!
$$\int e^x\sin(x)\ dx = \frac{1}{2}e^x(\sin x-\cos x) + C $$
$$ \int e^x\cos(x)\ dx = \frac{1}{2}e^x(\sin x +\cos x ) + C $$
$$ u = x \\ u'= 1\\\\v'=e^x\sin(x) \\v= \frac{1}{2}e^x(\sin x -\cos x) + C \\ I = \frac{xe^x}{2}(\sin x-\cos x )-\frac{1}{2} \int e^x(\sin x-\cos x) + C \\ \text{Let }Z^- = \sin x -\cos x \\ \text{and}\\ \text{Let }Z^+ = \sin x+\cos x \\ \frac {xe^x}{2}(Z^-) - \frac{1}{2}\left(\frac{1}{2}e^x(Z^- - Z^+)\right) +C\\ \frac {xe^x}{2}(\sin x-\cos x) - \frac{1}{2}\left(\frac{1}{2}e^x(-2\cos x )\right)+C\\ \frac {xe^x}{2}(\sin x-\cos x) + \frac{1}{2}e^x(\cos x) + C\\ \int xe^x\cos x\ dx = \frac{1}{2}e^x(x\sin x-x\cos x+\cos x) + C $$ Well. I told you guys I would do it, thank you all for your help, turn out I've been stuck on this bastard for 3 days not two, time flies when you're having fun! ;) - I entered most of the steps, you guys should see the gaps if there are any, and i'm sorry my MathJax isn't perfect, this is my first time using it for such a big equation, thank you all again! Next stop, five function ;) (I checked on wolframalpha.com, got the same answer!)