$$ \int x\cos(x) dx $$
So I just the integration by parts: $\int f(x) \cdot g'(x) dx = f(x)g(x) - \int f'(x) \cdot g(x) dx $
$f(x) = x$ and $g'(x) = \cos(x)$, we get:
$$ x \cos(x) dx = x\sin(x) - \int 1 \cdot \sin(x)dx$$
Here is where the problem starts. I am in doubt as to whether which of the following answer (if any) are correct:
$ x \cos(x) dx = x\sin(x) - -x\cos(x)dx$ (does $1$ turn into $x$?, and if not, why not?)
or
$ x \cos(x) dx = x\sin(x) - - \cos(x)dx$
$ x \cos(x) dx = x\sin(x) + \cos(x)dx$
$ x\sin(x) = 0$? Which must be totally incorrect. Please help me out.