The version of the joke I'd heard doesn't include the waitress' attempt to meaninglessly memorize the answer. She simply nods when initially tutored, then later surprises both mathematicians that "an average person" knows how to properly solve an integration problem without any help.