The wizard has been thinking about and doing research during his downtime, while sleeping in dreams, in the morning while the other chumps... er... party members are breaking camp, while riding or walking to a new area... that one time when the sun hit the medusa's eyes just right and he wrote a poem about it later that seemed to fit in this new spell idea well... etcetera.
How I handle it is the player picks two spells. If they're in core, they're automatically approved. (actually, I change some of those even), and he hands the spell choices to me, and I tell him if he can learn those or has to pick new ones.
I also rule that these spells are completely researched spells, even if they're core spells. Meaning that they don't HAVE to be core. He can come up with anything... and I'll look at it, tweak it so that I think it's within appropriate power levels and works well with my vision of the game, I return to him an altered approved spell... and he either likes that or askes for it to be altered slightly differently if he thought a point I removed was important and he'd prefer some different version.
And he don't have to pay to write it in his spellbook either. He spontaniously generates the expensive inks needed. I'm not sure how, but I am sure I couldn't write it down.