In the play Hamlet by William Shakespeare, one of the most famous monologues occurs in Act 3, Scene 1, where Hamlet reflects on the nature of existence and his hesitation about life and death. This passage is often quoted and analyzed for its insight into the character's inner turmoil. The monologue begins with the words, 'To be, or not to be: that is the question.'
What is the primary purpose of Hamlet's soliloquy in this scene?