added support for transcendental/trig functions

because it replaces the string in general, does not work for cases like
cot(cot(x))