There are two stages to this problem. I think you have done the first but I'll say anyway.

This is a product of two functions so use the product rule:

You can combine the trig functions into a single trig function using the compound angle formulas. You want a cosine so I'll use

To make the derivative look like the right hand side here:

Hope that helps,

Bob

]]>Want to exercise this type of question

Know simple derivation but want to get this answer that is

Derivative=re^x cos(x-a+thetha)

R=sqrt 2 thetha=pi/4]]>