I tried that, but it expands simple trig functions too, e.g. `cos(x)` to `exp(I*x)/2 + exp(-I*x)/2`.