# Solving a system of equation

Solve the following system of equations:
\left\{ \begin{align} & 2{{x}^{2}}-5xy-5{{y}^{2}}+x+10y-35=0 \\ & {{x}^{3}}+5x{{y}^{2}}+42=0 \\ \end{align} \right.

By using a computer, I have solutions: $x=-3$,$y=1$, but I cannot seem to do it by hand. Please help me solve it. Thanks.

• since both equations $= 0$ it follows that $2x^2−5xy−5y^2+x+10y−35 = x3+5xy^2+42$ gives the solutions $\{x = -1, y = 5\}, \{x = -4, y = 3\},$ and $\{x = -3, y = 1\}$ – JohnWO Nov 4 '13 at 15:03
• Thanks, I checked it and {$x=-4,y=3$} is not a solution. But, can you explained to me some steps to have solution of equation $2x^2−5xy−5y^2+x+10y−35=x^3+5xy^2+42$? – user97277 Nov 4 '13 at 15:12
• Yeah, $\{x = -4, y = 3\}$ is WRONG. It should be $\{x = -4, y = -1\}$. – JohnWO Nov 4 '13 at 15:17

Since $x\neq 0$ by the second equation we have $y^2=-(x^3+42)/(5x)$. Substitute this to the first equation to obtain $$y(5x)(x-2)=(3x^2 + 7x - 21)(x - 2).$$ For $x=2$ we obtain $y^2=-5$. Otherwise we can divide by $5x(x-2)$ to obtain $y$. This leads by the second euqation to $(2x^2 - 6x + 7)(x + 3)=0$, so we obtain altogether four solutions for $x$, i.e., $x=2,x=-3,x=( \pm \sqrt{-5} + 3)/2$.

• That is a good idea. Thank you very much. – user97277 Nov 5 '13 at 15:03

If you care about all solutions and not just some nice ones, especially if you are using a computer to do the grunt work, fire up any CAS (computer algebra system) at your disposal. Any self-respecting CAS has an implementation of groebner basis algorithms (to use for problems like this under the hood!) - but try sympy! The lex order groebner basis of your system is

$$52704x - 6250y^5 + 27700y^4 - 90775y^3 + 220495y^2 - 297625y + 304567=0$$ $$10y^6 - 30y^5 + 123y^4 - 246y^3 + 408y^2 - 480y + 215=0$$ The last equation is a univariate six-degree polynomial that factors into

$$(y-1)(y+i\sqrt5)(y-i\sqrt5)(y-1/2 + 9i/10\sqrt5)(y-1/2 - 9i/10\sqrt5)$$

So like your solution we have $y=1$ as well. Backsubtition into the first equation (of the groebner basis) gives $$52704x + 158112=0$$ but $-158112/52704=-3$. So indeed $y=1$ and $x=-3$ is a solution...

This fits nicely with what Dietrich posted: As he points out if $x=2$ then $y$ is a solution to $y^2=-5$ both of these solutions (the positive and negative solution of that quadratic) also solve the equation in the groebner basis that only contains $y$ (and not $x$). Which you also see from the factorization. Substituting $y=i\sqrt5$ into the first equation gives $$52704x - 105408=0$$ and we have $105408/52704=2$ so we have another nice solution of $y=i\sqrt5$ and $x=2$! The same for $y=-i\sqrt5$.