In Maple, you might try the probabilistic equivalence-tester testeq. For example:
testeq(407-768cos(1/5Pi)-716cos(1/7Pi)-364cos(11/35Pi)-170cos(1/35Pi)+170cos(6/35Pi)+364cos(4/35Pi)-594cos(9/35Pi)+594cos(16/35Pi)+692cos(2/5Pi)+670cos(2/35Pi)+670cos(12/35Pi)-440cos(3/35Pi)-440cos(17/35Pi)+246cos(8/35Pi)-246cos(13/35Pi)-292cos(3/7Pi)+486cos(2/7Pi)=0);
true