Marius Delphus said:
A single wizard has the opportunity to learn so many more spells than a whole bushel of sorcerors will ever know... potentially every spell the DM permits... that IMHO it's no contest. Wizard, definitely.
Several posters have noted the versatility inherent in the wizard's spellbook, but I would argue that this is not as great an advantage as others are stating.
First, unless the GM throws in a lot of scrolls as loot, the PC wizard is going to have to buy these extra spells. That's money that he doesn't have for other things. Then he has to spend money to scribe them into his spellbook. Even less money available for other things. Once you start buying and scribing spells 3rd-level and up, the cost becomes huge.
Second, even assuming you've houseruled the costs way down (as I do), what happens when the wizard memorizes spells for the day? 4 times out of 5, he'll take the same spells. Depending on the situation, he might leave a few spell slots unfilled, but he can't do this too often, as wizards don't get that many spells per day.
Three, metamagic feats have to be memorized with the spell by a wizard. A sorcerer has much more flexibility in using them. If my sorcerer has Still Spell, he'll use the feat only when he's grappled or otherwise needs it. The wizard, OTOH, only gets the benefit of the feat if he guesses correctly which spells to memorize with the feat that day (which is almost certainly, none).
Instead of playing a wizard, try a sorcerer. Spend the same amount of money on scrolls, but for use in an emergency. So what if the character doesn't know
knock - he has a scroll of it! Much better than the wizard who knows
knock, but didn't memorize it that day, and used up his scroll of it to write it in his spellbook.
Note, all these things together don't make the sorcerer superior. I do think, however, that the choice is not so cut-and-dried as it seems. The sorcerer has his own flexibility which can sometimes trump that of the wizard.