How to use "unsuccessful" in a sentence

Sentences

One evening, when Marius was talking to Cosette and Jean Valjean about the mystery and his unsuccessful attempts to solve it, he became angry with Cosette's guardian's lack of interest in his story.