# convert to sin(x) or cos(x); totrig(e^(b_*x_)) := e^(re(b)*x)*(cos(im(b)*x)+i*sin(im(b)*x)); totrig(exp(x_)) := cos(i*x)-i*sin(i*x); totrig(e^(x_)) := cos(i*x)-i*sin(i*x); totrig(e^(-x_)) := cos(i*x)+i*sin(i*x); totrig(sinc(x_)):=sin(x)/x; totrig(sinh(x_)):= -i*sin(i*x); totrig(cosh(x_)):= cos(i*x); totrig(tanh(x_)):= -i*tan(i*x); totrig(coth(x_)):= i*cot(i*x); totrig(csch(x_)):= i*csc(i*x); totrig(sech(x_)):= sec(i*x); totrig(asinh(x_)):= -i*asin(i*x); totrig(acosh(x_)):= acos(i*x); totrig(atanh(x_)):= -i*atan(i*x); totrig(acoth(x_)):= i*acot(i*x); totrig(acsch(x_)):= i*acsc(i*x); totrig(asech(x_)):= asec(i*x); totrig(log(x_+sqrt(1+x_^2))):= -i*asin(i*x); totrig(log(x_+sqrt(x_^2-1))):= -i*acos(i*x); totrig(log((1+x_)/(1-x_))):= -i*atan(i*x); totrig(log((1+x_)/(x_-1))):= i*acot(i*x); totrig(log((1+sqrt(x_^2+1))/x_)):= i*acsc(i*x); totrig(log((1+sqrt(1-x_^2))/(1-(1-x_^2)^(1/2)))):= asec(i*x); totrig(log(i*x_+sqrt(1-x_^2))):= i*asin(x); totrig(log(i*x_+sqrt(x_^2-1))):= i*acos(x); totrig(log((1-i*x_)/(1+i*x_))):= 2i*atan(x); totrig(log((1+i*x_)/(i*x_-1))):= -2i*acot(x); totrig(log((1+sqrt(-x_^2+1))/x_/i)):= -2i*acsc(x); totrig(log((1+sqrt(1+x_^2))/(1-(1+x_^2)^(1/2)))):= 2asec(x);