# With the next equation system, find possible values for $\frac{x}{y}$

Let $x,y,z,w$ $\in$ $\mathbb R^+$ such that:

$\left\{\begin{array}{l}x+y=z+w\\2xy=zw\end{array}\right.$

Find possible values of $\frac{x}{y}$

I can't see a way to start this problem, i played a lot with the equations, squaring the first equation and putting the second in it:

$x^2+y^2= z^2+zw+w^2$

But nothing more than that. Maybe the solution is to get values of $\frac{x}{y}$ directly and not try to get the possible values of $x,y$

Suppose $z = w$ this will maximize $zw$ (relative to $xy$)

$z = w = \frac {x+y}{2}$

$zw = \frac {x^2 + y^2 + 2xy}{4} = 2xy\\ x^2 + y^2 - 6xy = 0$

divide through by $y$

$(\frac {x}{y})^2 - 6\frac {x}{y} + 1 = 0$

$\frac {x}{y} = 3 \pm\sqrt {8}$

When we relax the constraint $z = w$ we force $\frac {x}{y}$ away from the moderate values.

$\frac {x}{y} \ge 3 + \sqrt {8}$ or $\frac {x}{y} \le 3 - \sqrt {8}$

Set $\frac{x}{y}=t$. We have $x=ty$, and then, by Vieta formulas, $z$ and $w$ are the roots of:

$$\xi^2-(t+1)y\xi+2ty^2=0$$

(as $z+w=x+y=(t+1)y, zw=2xy=2ty^2$). This has solutions if and only if the discriminant is $\ge 0$, i.e.

$$y^2((t+1)^2-8t)\ge 0$$

Cancelling (positive) $y^2$ and solving for positive $t$ yields:

$$t=\frac{x}{y}\in(0,3-2\sqrt 2]\cup[3+2\sqrt 2,\infty)$$

Yes indeed it is easier to find the values of $x/y$. Let $\tilde x=x/y,\tilde w=w/y,\tilde z=z/y$, Noe this is possible since $y\neq 0$. Then both equations become $$\tilde x+1=\tilde z+\tilde w,\quad 2\tilde x=\tilde z\tilde w$$

You may solve for $\tilde z=\tilde x+1-\tilde w$ in the first one and put it in the second one to get

$$\tilde x(2-\tilde w)=\tilde w(1-\tilde w).$$

As $\tilde w=2$ yields $0$ on the left hand side and $-2$ on the right hand side it is not a solution and we can divide by $2-\tilde w$. Then

$$\frac{x}{y}=\tilde x=\tilde w\frac{1-\tilde w}{2-\tilde w}$$

As $\tilde w$ runs from $0$ to $1$, $\tilde x$ goes from $0$ to a local maximum $M$ (that I am confident you can find, let me know if not) and back to $0$. From $\tilde w=1$ to $\tilde \omega=2$, $\tilde x$ is negative hence we don't want that solution. And from $\tilde w=2$ to $\tilde w\to \infty$, $\tilde x$ goes from $\infty$ to a local minimum $m$ and back to $\infty$.

Moreover $m>M$ then the posible values for $\tilde x$ are $(0,M)\cup[m,\infty)$