# How can I get exact solutions of this system of equations?

I want to solve system of equations \begin{cases} 2 x^2-5 x y-y^2=y \left(\sqrt{x y-2 y^2}+\sqrt{4 y^2-x y}\right),\\ \sqrt{3 y}+\sqrt{x^2+2 x}-x-x \sqrt{2+9 y^2}=0. \end{cases} Where $x$, $y$ are two real numbers. I tried

Reduce[{2 x^2 - 5 x y - y^2 ==
y (Sqrt[x y - 2 y^2] + Sqrt[4 y^2 - x y]),
Sqrt[3 y] + Sqrt[x^2 + 2 x] - x - x  Sqrt[2 + 9 y^2] == 0}, {x,
y}, Reals]


I can't get solutions for a long time. I know that, the given system of equations has two solutions $(0,0)$ and $(1,1/3)$. If I use NSolve

NSolve[{2 x^2 - 5 x y - y^2 ==
y (Sqrt[x y - 2 y^2] + Sqrt[4 y^2 - x y]),
Sqrt[3 y] + Sqrt[x^2 + 2 x] - x - x Sqrt[2 + 9 y^2] == 0}, {x,
y}, Reals]


I only got

{{y -> 0.333333, x -> 1.}, {y -> 0.333333, x -> 1.}}

Lost solution $(0,0)$.

How can I get exact solutions of this system of equations?

• What you have above is invalid, generating a Reduce::ivar error. – John Doty Jun 26 '16 at 13:22
• Did you by any chance make a mistake in transcribing your code? Reduce should receive a single equation or a list of equations as its first argument, so you should wrap your equations in {}. – MarcoB Jun 26 '16 at 14:43
• You could try using GroebnerBasis[] as a preprocessor before feeding to Solve[]. – J. M.'s ennui Jun 26 '16 at 15:24
• Curiously, NSolve gives me an empty solution set, whereas FindInstance gives me only $\left( 0,0\right)$. – Feyre Jun 26 '16 at 15:44

Per @J.M. 's suggestion:

gb = GroebnerBasis[{Sqrt[3 y] + Sqrt[x^2 + 2 x] - x -
x Sqrt[2 + 9 y^2],
y (Sqrt[x y - 2 y^2] + Sqrt[4 y^2 - x y]) - (2 x^2 - 5 x y -
y^2)}, {x, y}];

eq = Thread[gb == ConstantArray[0, Length[gb]]];
Solve[eq, {x, y}, Reals]


{{x -> 0, y -> 0}, {x -> 1, y -> 1/3}}

• How about ClearAll gb = GroebnerBasis[{Sqrt[x + 3] + Sqrt[x y + x + 3 y + 3] + x + 1 == 2 y + Sqrt[ y + 1], (x - 3) (y + 1) == (y - 1) (x^2 - 2 x + 3) (Sqrt[ x + 1] - 2)}, {x, y}]; eq = Thread[gb == ConstantArray[0, Length[gb]]];; Solve[eq, {x, y}, Reals] – minhthien_2016 Jun 26 '16 at 23:29
• @toandhsp, one cannot just thoughtlessly apply GroebnerBasis[]; it is an aid, not a panacea. In that case, you pick out the entries that do not have a radical term, and feed those to Solve[]. In my trials, it was gb[] == 0 and gb[] == 0 that gave results. – J. M.'s ennui Jun 27 '16 at 3:05
• In the case of the original set, picking out the first and fourth elements of gb netted sixteen real solutions, apart from the two displayed in this answer. – J. M.'s ennui Jun 27 '16 at 3:14