Calculate Inverse Of A Function