Question about Pell's equation. Question. Suppose that $x,y,x',y'$ are positive integers satisfying $x^2-dy^2=\pm 1$ and $(x')^2-d(y')^2=\pm 1$ respectively. Assuming $x<x'$, prove that $y<y'$.
Not too sure where to begin. Firstly, by taking the positive solution, I factorised to $(x+\sqrt{d}y)(x-\sqrt{d}y)=1$ so we can have $y=0$ and $x=1$. But then I don't really know how that helps.
Any hints or paths of continuation would be greatly appreciated.
 A: Hm... isn't this trivial to prove?
First, it is easy to see that $d$ is positive.
Second, you can directly express $y$ and $y'$ as a function
(it's the same function) of $x$ and $x'$ respectively.
$$y = \sqrt{\frac{x^2-1}{d}}$$
$$y' = \sqrt{\frac{x'^2-1}{d}}$$
And then since this function
$$f(t) = \sqrt{\frac{t^2-1}{d}}$$
is increasing and $x \lt x'$, your statement $y \lt y'$ is obviously true.
A: You have
$$x^2-dy^2=\pm 1 \tag{1}\label{eq1A}$$
$$(x')^2-d(y')^2=\pm 1 \tag{2}\label{eq2A}$$
If $d \lt 0$, there are no solutions in only positive integers and, if $d = 0$, then both right sides must be $1$ with $x = x' = 1$, which is also not allowed. Thus, $d \gt 0$.
Next, not necessarily assuming the right side $\pm 1$ values are the same in the $2$ equations, \eqref{eq2A} minus \eqref{eq1A} gives
$$((x')^2 - x^2) - d((y')^2 - y^2) = z \tag{3}\label{eq3A}$$
where $z \in \{-2, 0, 2\}$, so $z \le 2$. Since $x \ge 1$, and $x' \gt x \implies x' \ge x + 1$, you get $(x')^2 - x^2 \ge (x + 1)^2 - x^2 = 2x + 1 \ge 3$. Thus, $- d((y')^2 - y^2) \le -1 \implies d((y')^2 - y^2) \ge 1$ and, since $d \gt 0$, you also have $(y')^2 - y^2 \gt 0 \implies y' \gt y$.
