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)

f(x)=(1-cosx)

g(x)=e^cosx

f’(x)=-(-sinx)

g’(x)=-sinxe^cosx

So h’(x)=f’(x)g(x)+g’(x)f(x)

= (sinxe^cosx) + (-sinxe^cosx)(1-cosx)

= sinxe^cosx - sinxe^cosx + cosxsinxe^cosx

= cosxsinxe^cosx

Does this seem the right way of working it?