finding intercepts of functions