I think I might have worked it out however any comments would be greatly appreciated:
Using the Composite rule I differentiated e^cosx to get -sinxe^cosx
I would then use the product rule now to differentiate (1-cosx)e^cosx?
I know if h(x)=f(x)g(x)
= (sinxe^cosx) + (-sinxe^cosx)(1-cosx)
= sinxe^cosx - sinxe^cosx + cosxsinxe^cosx
Does this seem the right way of working it?