What's happening in this derivative?

$\displaystyle -5e^{xcos(x)}$

Ends as:

$\displaystyle 5*x*e^{x*cos(x)}*sin(x)-5*cos(x)*e^{x*cos(x)}$

From what I know.

$\displaystyle -5e^u*u'$

Does not get me to that end result, where u equals (x*cos(x)). Is there a special rule in ending with derivatives like this?