Opening the spellbook after just having started a new game, all the spells had their 'cast spell' button enabled, even those not yet researched. I was able to cast spells in this way, and casting a spell caused it to be added to my sovereign's spell panel.