Determining the rule of a function