So I was looking over a density that shows that the rational numbers are dense in the real numbers. If $0< a <b$, with with $a,b$ real numbers, then I understood why we can chose n such that:
$$ \frac{1}{n} < a- b $$
and m such that:
$$ m-1 \leq an < m $$
The reasons are pretty easy, so I won't state them because they're not bothering me at all, my question isn't about them. So, by choosing $m,n$ integers, that satisfy the two inequalites we can show that:
$$ a < \frac{m}{n} < b$$
Which proves that we can find a rational numbers between any two reals. Then we can prove the case where $ a < 0 $
My question is, how does one get the idea to choose the n and m that satisfy the above properties? How does one get the intuition necessary for this kind of proof? After we fixed $n,m$, the algebra it's pretty easy and it leads us easily to the conclusion. But again, how can you get such an inspiration for chosing $n,m$? I agree that with enough will and guesswork you can find them. But is there some more subtle reason that can lead us to this idea? Am I missing something?
The idea (assuming that $a > 0$) is to look at the sequence of fractions $\dfrac 1n, \dfrac 2n, \dfrac 3n, \dfrac 4n,\cdots$ and to try to show that at least one of these values lies in between $a$ and $b$. The problem is that if $a$ and $b$ are too close together, then both $a$ and $b$ could lie in between two adjacent terms of the sequence. However, if $\dfrac 1n$ is small enough (less than $b-a$) this can't happen--that is, if $\dfrac{m-1}{n} \le a$ but $\dfrac mn > a$, then in fact $\dfrac mn < b$.