Finding the rule of a given function