His soliloquy in Act V explores the reach of magic. It reads (or plays) like a catalog of all the places magic can go, and all it can do.
It also recounts Prospero's powers. As such, the speech is at once a kind of nostalgic eulogy, a kind of farewell, and a kind of self-praise. He's talking about how great he was, and how powerful, and he's saying good-bye to it. The distance between book and staff are a good sign of how tempting he knows magic to be.