Improvements to catching common syntax errors with trig functions, e.g. sin^-1(x) or cos[x]