intermediate value theorem trig functions