Finding the inverse of a function.