Finding The Average Value Of A Function