Who tells the king and queen that they have been unable to find the cause of Hamlet's madness?
Have I, my lord? Assure you, my good liege,
I hold my duty as I hold my soul,
Both to my God and to my gracious King.
And I do think, or else this brain of mine
Hunts not the trail of policy so sure
As it hath used to do, that I have found
The very cause of Hamlet's lunacy.
Polonius tells the King and Queen that he's actually found the cause of Hamlet's madness, and that the cause is that he's in love with Ophelia. This is tested out by putting Ophelia where Hamlet will meet her, Claudius and Polonius hiding and watching unseen, and watching what happens.
And the conclusion? Here's Claudius, straight afterward:
Love? His affections do not that way tend;
Nor what he spake, though it lack'd form a little,
Was not like madness.
And so Polonius has to accept that love probably isn't the cause. But the two of them resolve to let Polonius watch Hamlet talk to his mother. And - of course - that's when Polonius ends up killed. So he never finds out why Hamlet is mad.
The bringers of this unfortunate news are the two hired "friends" of Hamlet's from school: Rosencrantz and Guildenstern. They have been called to Denmark for the purpose of ferreting out the cause of Hamlet's depression and strange moods. Gertrude, however, believes the cause is Hamlet's father's death and her "too soon" marriage. Claudius, her new hubby, fears that Hamlet knows the King did not pass away from natural causes.
At any rate, Hamlet is too keen for the witless duo to discern the truth of the matter. Hamlet confides only in his closest friend, Horatio, telling him that Hamlet will "act" mad in order to find out what Claudius has done before Hamlet decides on the how and when of revenge.