5
$\begingroup$

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?

$\endgroup$
4
  • $\begingroup$ What you have above is invalid, generating a Reduce::ivar error. $\endgroup$
    – John Doty
    Jun 26, 2016 at 13:22
  • $\begingroup$ 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 {}. $\endgroup$
    – MarcoB
    Jun 26, 2016 at 14:43
  • 2
    $\begingroup$ You could try using GroebnerBasis[] as a preprocessor before feeding to Solve[]. $\endgroup$ Jun 26, 2016 at 15:24
  • $\begingroup$ Curiously, NSolve gives me an empty solution set, whereas FindInstance gives me only $\left( 0,0\right)$. $\endgroup$
    – Feyre
    Jun 26, 2016 at 15:44

1 Answer 1

9
$\begingroup$

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}}

$\endgroup$
3
  • $\begingroup$ 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] $\endgroup$ Jun 26, 2016 at 23:29
  • 1
    $\begingroup$ @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[[1]] == 0 and gb[[3]] == 0 that gave results. $\endgroup$ Jun 27, 2016 at 3:05
  • $\begingroup$ 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. $\endgroup$ Jun 27, 2016 at 3:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.