$\displaystyle \int xe^{-x} dx$

$\displaystyle u=x$

$\displaystyle du=dx$

$\displaystyle v=e^x$

$\displaystyle dv=e^{-x}dx$

$\displaystyle \int xe^{-x} dx=xe^{-x} - \int e^{-x} dx = xe^{-x}-e^{-x}+C$

mathbook gives: $\displaystyle -xe^{-x}-e^{-x}+C$

where does that minus come from ?