I'm trying to learn about proofs and I'm stuck in Velleman's book "How to Prove it".
This is the question (ex.6 p.118):
Prove that for every real number $x$, if $x > 2$ then there is a real number $y$ such that $y+\frac{1}{y}= x$.
I couldn't do it so I went to see the answer, and it is written that we can assume that $y=(x+\sqrt{x^2-4})/2$.
How did the author get to this value for $y$?
Suppose that
$$y+\frac{1}{y}=x.$$
Then
$$y^2+1=xy,$$
and
$$y^2-xy+1=0.$$
It follows that
$$y=\frac{x\pm\sqrt{x^2-4}}{2}$$
either by completing the square, or by using the quadratic formula.