Consider a MWE, expr = Sin[a] (-I Cos[b] + Sin[b]), is there some way to only apply TrigToExp[] for terms containing b, (for MWE, output:=-I E^(I b) Sin[a]) leaving other terms untouched? In my actual problem, the expression may be much more complex. I could, for example, apply expr /. {Cos[b] -> TrigToExp[Cos[b]], Sin[b] ->Read more