kill(all)$

van=facebook.com/LearningCalculus$

f(x):=x^2-sqrt(3)*x+1;

g(x):= (3+sqrt(12))*(x^5+1)^2/(x^10+1);

s:solve(f(x),x);

xi:[rhs(s[1]), rhs(s[2])];

S:[g(xi[1]), g(xi[2])];

fullratsimp(S);