Interesting discussion. I agree that gaining Experience equal to the casting difficulty of the spell is a bitt too fiddly.
And gaining Experience for failing spells is a very interesting idea, but counter-intuitive. Still, it's worth considering further.
My preferred option is you only gain Experience the FIRST time you cast a spell during a game. I.e., you can only gain Experience for each particular spell once per game, and if you want more Experience, you need to cast a different spell.
This encourages players to cast a variety of spells, and not just cast Bone Dart/Elemental Bolt over and over.
It requires a tiny bit of paper work or memory, but in practice I've found it very manageable. If you have your spells written on your wizard sheet, just put a check next to each one the first time you cast it, then count the Experience at the end of the game. Easy.