kill(all)$

van = facebook.com/LearningCalculus;

f(x):=sqrt(x-2);

g(x):=x^2+2;

f(g(x));g(f(x));

domainAndRange:["  f(x) ",['domain,    2, inf],[range, sqrt(2),inf]];
domainAndRange:["  g(x) ",['domain, minf, inf],[range,    minf,inf]];
domainAndRange:["f(g(x))",['domain, minf, inf],[range,       0,inf]];
domainAndRange:["g(f(x))",['domain, minf, inf],[range,    minf,inf]];