(%i1) s : cot(x + %pi/3)/cos(3*y - 2*x)$
(%i2) trigrat(s);
(%o2) sqrt(3)/(cos(3*y-2*x)+cos(3*y-4*x)+cos(3*y))
-(2*sin(2*x))/(cos(3*y-2*x)+cos(3*y-4*x)+cos(3*y))
(%i3) trigrat([cos(y), s])[2];
(%o3) [very long result]
trigrat should process list elements independently from each other.
Diff: