So what was the Devil up to when he was chatting to Ivan in his fever-brained state? He was being silver-tongued and reasonable, maybe like the Devil when he was tempting Christ, as referred to earlier in the book. Maybe he was just being cheerful because the scientific rationalism was eating away religious faith.