Let $\displaystyle A $ be the set of all positive rationals $\displaystyle p $ such that $\displaystyle p^2 < 2 $ and let $\displaystyle B $ consist of all positive rationals $\displaystyle p $ such that $\displaystyle p^2 > 2 $. We want to show that there is no maximum element in $\displaystyle A $ and no minimum element in $\displaystyle B $. So:

$\displaystyle q = p - \frac{p^{2}-2}{p+2} = \frac{2p+2}{p+2} $. Then $\displaystyle q^{2} -2 = \frac{2(p^{2}-2)}{(p+2)^{2}} $.

First of all, how do we even know to do this? Just by intuition? Why did we set $\displaystyle q = p - \frac{p^{2}-2}{p+2} = \frac{2p+2}{p+2} $? Could we have set it to something else? So we basically have shown that $\displaystyle p < q $ for every $\displaystyle p $ in $\displaystyle A $, and $\displaystyle q < p $ for every $\displaystyle p $ in $\displaystyle B $. By the way, this is from Rudin's "Principles of Mathematical Analysis."