Question: how to tell convert to trig to only convert to sin/cosine and not to other trig functions?

I need to use convert of complex exponentials to trig, but only to convert exp(I*x) to cos/sin using Euler formula.

The problem is that, since this is done in code without looking at what is inside the exp(), Maple will also convert non complex exponentials as exp(x) to hyperpolic trig which I do not want.  An example will make this clear

For an example, given exp(3*I*x - x)  and applying convert/trig to this it gives 

             (cosh(x) - sinh(x))*(cos(3*x) + sin(3*x)*I)                       --(1)

But I only want to conver the exp(3*I*x) part of the of the above to obtain

          exp(-x) *  (cos(3*x) + sin(3*x)*I)                          ---(2)

I can break  exp(3*I*x - x) first using expand command and obtain  exp(-x) exp(3*I*x) and then parse this and filter out the complex exponentials (may be using select with has I) and then use convert on those terms only leaving the non-complex exponentials alone. But this gets messy for more complex exponentials.

Is there an easy way to tell Maple  to convert expression of the form exp(I*f(x) + g(x)) to trig but only to sin/cos, hence leaving the exp( g(x) ) as a factor? I looked at help but see nothing there so far.

Maple 2021.2

Please Wait...