Let's say, you've asked a rather localized question of little general interest, like an exercise from a book, or a step in some proof. After some time, you figure out the answer on your own. Which action is most in the spirit of this site: posting an answer containing a full proof, posting an answer or comment containing some hints or a sketch, posting a comment merely stating you have the answer, or even doing nothing at all?
9$\begingroup$ You can post an answer to your own question, in the same spirit as you original question (if you asked for a hint, give a hint; if you asked for a full solution, give a full solution) and eventually accept it. $\endgroup$– Arturo MagidinDec 19, 2010 at 19:16
1$\begingroup$ See also blog.stackoverflow.com/2011/07/… $\endgroup$– jorikiOct 12, 2011 at 18:15
3$\begingroup$ Just don't write "but this margin is too small to contain it." $\endgroup$– LarsHApr 1, 2012 at 9:58
I agree with Arturo. If you figured out the answer after you asked the question, you should answer it as if it was someone else who asked the question -- so also observing any requests you made originally (if you only asked for a hint...).
Please don't "do nothing at all". One of the reason that Q&A websites such as this one is useful is precisely that people can search through old questions and see what has been asked and what has been answered. So providing an answer to the question is definitely preferable to not doing so.
$\begingroup$ "Please don't 'do nothing at all'." - I gave a +1 just for this. $\endgroup$ Dec 20, 2010 at 2:37
8$\begingroup$ ...but if you figure out an answer 10 seconds after posting, perhaps it's polite to wait for a bit until adding your own answer so others get a chance. $\endgroup$ Dec 20, 2010 at 4:29
Just thought I would add that the site actually supports people answering their own questions in the form of the "Self-Learner" badge:
Self Learner: Answered your own question with at least 3 up votes