The phrase "teaching-based research" brings to mind research about teaching, though important, it is not what I mean. Unfortunately, I couldn't come up with a better phrase, thus please bear with me while I explain the intended meaning. 


I have taught multi-variable calculus several times. As usual of such repetition, I had the feeling that I know the concepts involved and how they are connected to each other and so on. But, when last week I was preparing for one of my sessions - in which I decided to use a bathymetric map (depth contours) rather than a topographic map (height contours) - a problem occurred to me for the first time. Imagining myself swimming to the shore while looking at the bathymetric map, it seemed "obvious" that if I wanted to take the shortest path the to shore (from where I was), moving in the opposite direction of the gradient would not be my choice! Prompted by my observation, I came to this quite "recent" paper "[When Does Water Find the Shortest Path Downhill? The Geometry of Steepest Descent Curves](http://www.maa.org/publications/periodicals/american-mathematical-monthly/american-mathematical-monthly-december-2003)" addressing the very same problem that whether gradient curves are geodesics. 


Now here is the question: Do you know any personal (or historical) examples of such "teaching-based research"? 


And, here is why I think the question is suitable for MO: 


Many mathematician friends of mine, for obvious reasons, prefer spending their time on research rather than teaching. Having a collection of such examples could be encouraging in particular for early career mathematicians. 


There is a recent movement to encourage "[teaching inquiry](http://www.tandf.co.uk/journals/cfp/upricfp2.pdf)" the point of which is to "teach students to ask and explore mathematical questions". For that aim, it seems that lecturers should be ready to be faced with some problems never posed before in the subjects that are too familiar to them, and better, be ready to pose such genuine questions in such contexts. 


Finally, it goes without saying that, it is a habit of mind to pose such questions in everyday research practice. It seems that what makes it difficult in teaching is rooted in an all-knowing feeling. If we know how to bypass such feeling, we could understand how students might develop such a habit beyond procedural fluency and conceptual understanding. 



Historical (personal) examples of teaching-based research
The first time I taught forcing, I wanted to mention, as motivation, the fact that the independence of the continuum hypothesis (CH) or even of the axiom of constructibility (V=L) cannot be proved by the method of inner models. That fact was proved in Cohen's book, "Set Theory and the Continuum Hypothesis" under the assumption that there is a standard model (i.e., a transitive set model with standard $\in$) of ZF, and Cohen mentions that one could prove the same fact under the strictly weaker assumption that ZF is consistent. So I wanted to show my class the proof under this weaker hypothesis, but I couldn't figure out how to do the proof. That's a good thing, because, in fact, the conclusion doesn't follow from that weaker hypothesis. Discovering that and analyzing the situation a little further, I found that the fact in question is equivalent to the $\omega$-consistency of ZF, which is strictly stronger than consistency and strictly weaker than existence of a standard model. This work was too complicated to present in that class, but it became one of my early papers, "On the inadequacy of inner models" [J Symbolic Logic 37 (1972) 569-571].


