# Roots, multivariable functions and Mathematica [closed]

Let

$$f(x,y)=(10 x^2 + 4 x y - 2 x + 4 y^2 - 4 y + 1)^2 (32 x^2 - 64 x y + 24 x + 40 y^2 - 28 y + 5)^2$$

(10 x^2 + 4 x y - 2 x + 4 y^2 - 4 y + 1)^2 *
(32 x^2 - 64 x y + 24 x + 40 y^2 - 28 y + 5)^2


be a multivariable function with two different real solutions $$\displaystyle \left(x_{1},x_{2}\right)=(\frac{-1}{8},\frac{1}{4})$$ and $$\displaystyle(x_{1},x_{2})=(0,\frac{1}{2})$$.

How may I obtain the same solutions by employing Mathematica?

• Doesn't your polynomial have infinitely many solutions? (Assuming "solution" = root) Feb 8 at 18:03

Perhaps you mean real roots?:

Reduce[(10 x^2 + 4 x y - 2 x + 4 y^2 - 4 y + 1)^2 (32 x^2 - 64 x y +
24 x + 40 y^2 - 28 y + 5)^2 == 0, {x, y}, Reals]

(*  (x == -(1/8) && y == 1/4) || (x == 0 && y == 1/2)  *)


or

Solve[(10 x^2 + 4 x y - 2 x + 4 y^2 - 4 y + 1)^2 (32 x^2 - 64 x y +
24 x + 40 y^2 - 28 y + 5)^2 == 0, {x, y}, Reals]

(*  {{x -> -(1/8), y -> 1/4}, {x -> 0, y -> 1/2}}  *)

• Thanks, @Michael E2 for commenting. That is exactly what I was searching for. In order to find integer solutions, should I replace "Reals" for "Integers"? Feb 8 at 18:22
• @ViniciusHolmes Yes, replace Reals with Integers, but sometimes, if there are finitely many real solutions, it is quicker to find all of them and filter for the integer ones. One might also specify Solve[eq && Element[{x, y}, Integers], {x, y}, Reals]. The algorithms that may be applied when you change the domain (e.g. Reals) are different, and thus it is not always straightforward what to recommend. Feb 8 at 18:31
• Thanks a lot @Michael E2! Feb 8 at 18:32
• @ViniciusHolmes This works, too, on your problem: Solve[eq, {x, y}, Rationals] -- forgot to try it earlier :) Feb 8 at 18:35

The roots of a polynomial of 2 variables are a 1D region. That is, you will get equations as a result. E.g.:

f[X_, Y_] = (10 x^2 + 4 x y \[Minus] 2 x + 4 y^2 \[Minus] 4 y +
1)^2 (32 x^2 \[Minus] 64 x y + 24 x + 40 y^2 \[Minus] 28 y +
5)^2;
sol=Reduce[f[x, y] == 0, {x, y}]


()

We get 4 different solutions.

If we restrict x to the region: -1..1 we may plot y[x] as complex functions with real and imaginary parts:

ReImPlot[Evaluate[{y /. #}], {x, -1, 1}] & /@ {ToRules[sol]}