# Solve the system of equations for $\sqrt{xy}$

$$x + y\sqrt{x} = \frac{95}{8}$$ $$y + x\sqrt{y} = \frac{93}{8}$$ $$x, y \in \mathbb{R}$$

I can't solve this system of equations I got asked in a group. I added and substracted them to find the following equations but I don't really know what to do with them.

$$\left(\sqrt{x}-\sqrt{y}\right)\left(\sqrt{x}+\sqrt{y}-\sqrt{xy}\right) = \frac{1}{4}$$

$$\left(\sqrt{x}+\sqrt{y}\right)\left(\sqrt{x}+\sqrt{y}+\sqrt{xy}\right) - 2\sqrt{xy} = \frac{47}{2}$$

This is all I have. I checked the answer using Wolframalpha and it was $$\frac{15}{4}$$ for $$\sqrt{xy}$$.

I have been looking for this question's solution but didn't find any related question/solution on Stack Exchange or Web. Sorry if it is duplicate, thank you in advance.

• Math never ceases to amaze me! The pair of equations has exactly one real solution, for which $x$ and $y$ are simple rational numbers, and Mathematica can solve it instantly using Reduce[(equations),Reals]. Yet I have no idea how to find the answer by hand! Mathematica seems to be using Groebner bases (and hence classical elimination theory?). Jan 3, 2021 at 1:04
• @GregMartin take $x = s^2$ and $y=t^2,$ we get three real points. One is at $(\frac{5}{2}, \frac{3}{2},$ the other two have either $s$ or $t$ negative so does not come from real $x,y$ Jan 3, 2021 at 5:49
• @WillJagy Wow, you should post an answer of that, that makes everything nice and concise (solving for a cubic if I’m correct?) Jan 3, 2021 at 9:08

$$x + y\sqrt{x} = \frac{95}{8} \tag 1$$ $$y + x\sqrt{y} = \frac{93}{8} \tag 2$$

From $$(1)$$, you have $$y=\frac{95-8 x}{8 \sqrt{x}}$$. Plug it in $$(2)$$ and you need to find the zero of function $$f(x)=\frac{\sqrt{\frac{95-8 x}{\sqrt{x}}} x}{2 \sqrt{2}}-\sqrt{x}+\frac{95}{8 \sqrt{x}}-\frac{93}{8}\tag 3$$ which, I agree, is quite ugly.

If you can see is that if $$x \to 0^+$$, $$f(x)\to +\infty$$.

Tring for a few values of $$x$$ you would have the following results $$\left( \begin{array}{cc} 1 & 2.54773 \\ 2 & 0.642631 \\ 3 & 0.289849 \\ 4 & 0.249754 \\ 5 & 0.216853 \\ 6 & 0.0656336 \\ 7 & -0.280515 \end{array} \right)$$ So, the solution is "close" to $$x=6$$.

To polish the root, using Newton method with $$x_0=6$$, we should have the following iterates $$\left( \begin{array}{cc} n & x_n \\ 0 & 6.00000 \\ 1 & 6.27644 \\ 2 & 6.25025 \\ 3 & 6.25000 \end{array} \right)$$ that is to say $$x=\frac {25}4$$.

Back to $$y=\frac{95-8 x}{8 \sqrt{x}}$$, this gives $$y=\frac 94$$.

I apologize for the typos : I used $$938$$ instead of $$\frac{93}8$$

• There appears to be a simple typo in your equation $(3)$ which renders the rest of the computations wrong: the last term should be $-93/8$ instead of $-938$, so $f(1) \approx 2.548$. Jan 3, 2021 at 4:02
• @Pillsy. Thanks for pointing. I shall edit. Jan 3, 2021 at 4:15
• Thank you for this nice solution. Do you think there might be a different approach other than using a root-finding algorithm to solve the question? The answer seems to be no to me looking at the answer of Zalnd but I really would like to hear your opinion. Jan 3, 2021 at 11:50
• @LarsSmith. You are welcome ! I am still working the problem. It is strange that a "so simple" system requires so much work. If I find another way, I shall let you know. Cheers :-) Jan 3, 2021 at 14:38

Let's do the substitution that Will suggests, $$x=s^2$$,$$y=t^2$$ and let's save writing those fractions $$a=95/8,b=93/8$$. Thus we have $$\begin{eqnarray*} s^2+st^2=a \\ t^2+ts^2=b. \end{eqnarray*}$$ How do we solve these (for $$(s,t)$$ in terms of $$a,b$$) ? Rearrange the first equation to $$s^2-a=s t^2$$ and square this $$\begin{eqnarray*} s^4-2as^2+a^2=t^4s^2. \end{eqnarray*}$$ Now multiply this by $$t^2$$ and use the second equation $$\begin{eqnarray*} (b-t^2)^2-2at(b-t^2)+a^2t^2=t^5(b-t^2). \end{eqnarray*}$$ This shows how to solve these equations (in principle). So we just need to solve an equation of order $$7$$ ... Let's see what CAS says ... So this gives the solution that Will mentions ... $$t=5/2$$ ... What about the order $$6$$ part ? Well have a look at the graph, https://www.desmos.com/calculator/xsj6mrglur there are two real roots but they give negative values for $$t^2$$ or $$s^2$$.

• good...................... Jan 3, 2021 at 17:49

Some curiosities:

(a) the polynomial in $$u=\sqrt x$$ is

$$( 2u - 5 ) ( 32u^6 + 80u^5 - 180u^4 - 418u^3 - 301u^2 + 2812u - 1805 )$$

(b) the polynomial in $$v=\sqrt y$$ is

$$( 2v - 3 ) ( 32v^6 + 48v^5 - 300v^4 - 418v^3 + 133v^2 + 3968v - 2883 )$$

(c) the polynomial in $$w=\sqrt{xy}$$ is

$$( 4w - 15 ) ( 1024 w^6 + 768 w^5 + 5952 w^4 - 120064 w^3 - 591600 w^2 + 1387684 w + 5203815 )$$

I'm quite convinced there is no elegant way to find them. But I hope someone here will prove I'm wrong.

[EDIT]

John, it's not difficult (for a computer) to solve the system

$$u^2+u\,v^2-95/8$$ $$v^2+v\,u^2-93/8$$ $$w-u\,v$$

using elimination technics based on resultants or Gröbner basis. But if you want to know exactly what I did:

(a) is the Sylvester's Resultant of

$$(u) \, v^2 + (0) \,v + (u^2-95/8)$$ $$(1) \, v^2 + (u^2)\,v + (-93/8)$$

(b) is the Sylvester's Resultant of

$$(1) \, u^2 + (v^2)\,u + (-95/8)$$ $$(v) \, u^2 + (0) \,u + (v^2-93/8)$$

(c) is the Sylvester's Resultant of

$$(w) \, v^3 + (-95/8) \,v^2 + (0) \,v + (w^2)$$ $$(1) \, v^3 + (0)\,v^2 + (-93/8)\,v + (w^2)$$

I don't consider those as valid answers because I think everyone (including me) is expecting a solution that only relies on elementary algebra. I mean we are dealing with a system that is supposedly simple.

• Well, $(4w-15)$ is a factor, so if $w=15/4$ you win?
– John
Jan 3, 2021 at 4:32
• The Rational Root Theorem gives you $720$ possible rational roots to try but it seems like factoring out the $4w-15$ like you did is the key?
– John
Jan 3, 2021 at 4:42
• The polynomial can have irrational real roots that aren't detected by the rational root theorem. Jan 3, 2021 at 6:13
• I'm curious how you picked out the linear factors from the polynomials in $u$, $v$, and $w$. Jan 3, 2021 at 20:18
• Pillsy, I cheated. There are a lot of numerical root finding algorithms nowadays. =) Talking specifically about Octave, I think its polynomial root function calculates all roots by finding the eigenvalues of the companion matrix of the polynomial. Jan 4, 2021 at 18:46

Building and expanding on Zaind and Lars Smith's answers, we start by substituting

$$\sqrt{x} = u \tag 1$$ $$\sqrt{y} = v \tag 2$$

to give

$$u^2+u v^2=\frac{95}{8} \tag 3$$ $$u^2 v+v^2=\frac{93}{8} \tag 4$$

Note that if we have $$x, y \in \mathbb{R}$$, we also have $$x \ge 0$$ and $$y \ge 0$$, so $$u \ge 0$$ and $$v \ge 0$$ as well.

Solving $$(3)$$ for $$v^2$$:

$$v^2 = \frac{95-8 u^2}{8 u}$$

This can be substituted into $$(4)$$ to give

$$u^2 v+\frac{95-8 u^2}{8 u}=\frac{93}{8} \tag 5$$

which allows solution for $$v$$:

$$v = \frac{8 u^2+93 u-95}{8 u^3} \tag 6$$

We close the circle by substituting $$(6)$$ into $$(3)$$ to get:

$$u^2+\frac{\left(8 u^2+93 u-95\right)^2}{64 u^5}=\frac{95}{8} \tag 7$$

Multiply by $$64 u^5$$ and expand to get:

$$64 u^7-760 u^5+64 u^4+1488 u^3+7129 u^2-17670 u+9025 = 0$$

Recall we are only interested in positive roots of $$u$$. Now let's see what we can find out about those roots. Wikipedia has a useful page on this subject, and gives the following upper bound on the absolute value of roots of a polynomial $$a_n u^n + a_{n-1} u^{n-1} + \ldots + a_0$$:

$$2 * \max \left\{ \left| \frac{a_{n-1}}{a_n} \right|, \left| \frac{a_{n-2}}{a_n} \right|^{1/2}, \ldots, \left| \frac{a_{1}}{a_n} \right|^{1/(n-1)}, \left| \frac{a_{n-1}}{a_n} \right|^{1/n} \right\}$$

In fact, if we're only interested in positive real roots, we can replace all the $$a_j$$s which are positive with 0, which means we have to select the maximum value out of:

$$\left\{\left(\frac{8835}{32}\right)^{1/6},\sqrt{\frac{95}{8}}\right\}$$

A minute with a calculator indicates that that the largest of these is $$\sqrt{\frac{95}{8}} \approx 3.446$$

Let's take a look at a plot of our polynomial from $$0$$ to $$3.5$$ to get a sense of where the roots might be:

It looks like one of those roots is very close to $$5/2$$. Plugging $$5/2$$ into the left hand side of $$(7)$$ (much easier than doing all the terms in the polynomial) gives exactly $$95/8$$, verifying that it is a solution. Plugging into $$(6)$$ gives $$v = 3/2$$, and together we have $$\sqrt{ x y } = u v = 15/4$$.

Now, however, we still have the possibility of a root near $$u = 0.8$$, but substituting $$0.8$$ into $$(6)$$ gives $$v \approx -3.78$$, which contradicts the assumption that $$v > 0$$, and we can discard it.

It is not very probable that being $$x$$ and $$y$$ not squared the two equations give a rational and besides they differ by $$\dfrac14$$ so we can put in a first try $$(x,y)=(\frac{t^2}{4},\frac{s^2}{4})$$ so we get the system $$t(2t+s^2)=95=5\cdot19\\s(2s+t^2)=93=3\cdot31$$ The solution $$(t,s)=(5,3)$$ comes out immediately. Thus $$\sqrt{xy}=\frac{15}{4}$$

This is an algebraic proof by a method which can be useful when there is a known solution and the task is to prove there are no further ones. Since finding the intersection of the two original curves is messy, use a suitable third curve through the same point.

Define a third, continuous curve to be $$\sqrt{x}+\sqrt{y} = \frac{143}{36}$$ for $$x\le \frac{20}{9}$$ and to be $$18\sqrt{x}+20\sqrt{y} = 75$$ for $$x\ge \frac{20}{9}.$$ Finding the intersection of this new curve with either of the original curves gives a cubic (in $$\sqrt{x}$$ and $$\sqrt{y}$$, respectively).

In each case, the only real solution gives the intersection point $$(\frac{25}{4},\frac{9}{4})$$. Thus the new curve separates the two original curves except at the given point and this is therefore the unique solution to the original problem.

• Not quite sure how the break $\frac{20}9$ is picked Jan 6, 2021 at 17:44
• It isn't the only number that could have been chosen. It's simply one which minimises the number of linear functions of root x and root y that are required.
– user502266
Jan 6, 2021 at 21:46