Welcome to our community

Be a part of something great, join today!

max(xy) and min(xy)

Albert

Well-known member
Jan 25, 2013
1,225
x,y are integers and

$x^2-xy+2y^2=116$

find max(xy) and min(xy)
 

BAdhi

Active member
May 27, 2012
47
$$\begin{align*}
x^2-xy+2y^2&=116\\
x^2-2\sqrt{2}xy+(\sqrt{2}y)^2+2\sqrt{2}xy-xy&=116\\
(x-\sqrt{2}y)^2&=116+(1-2\sqrt{2})xy\\
\end{align*}$$

since, $(x-\sqrt{2}y)^2\geq 0$,
$$\begin{align*}
116+(1-2\sqrt 2)xy &\geq 0\\
(2\sqrt 2-1)xy &\leq 116\\
xy &\leq \frac{116}{2\sqrt 2 -1} \qquad (2\sqrt 2-1 > 0)
\end{align*}$$

also,
$$\begin{align*}
x^2-xy+2y^2&=116\\
x^2+2\sqrt{2}xy+(\sqrt{2}y)^2-2\sqrt{2}xy-xy&=116\\
(x+\sqrt{2}y)^2&=116+(1+2\sqrt{2})xy\\
\end{align*}$$

with, $(x+\sqrt{2}y)^2\geq 0$,

$$\begin{align*}
116+(1+2\sqrt 2)xy &\geq 0\\
(2\sqrt 2+1)xy &\geq -116\\
xy &\geq \frac{-116}{2\sqrt 2 +1}
\end{align*}$$

eventually we have,

$$\frac{-116}{2\sqrt 2 +1} \leq xy \leq \frac{116}{2\sqrt 2 -1}$$

$$-30.36 \leq xy \leq 63.73$$

but this is for $x,y \in R$ I cannot figure out it for integers
 
Last edited:

Opalg

MHB Oldtimer
Staff member
Feb 7, 2012
2,708
Continuing BAdhi's analysis, the max integer value is at most 63, and the min integer value is at least -30. But you can achieve each of those values, by taking $(x,y) = (9,7)$ or $(-9,-7)$ for the max, and $(x,y) = (6,-5)$ or $(-6,5)$ for the min.

I found those points by graphing, using MHB's Desmos grapher (click on it to see the detail):
[graph]35ihvotanp[/graph]​
It would be interesting to see a more analytical solution.​
 

Klaas van Aarsen

MHB Seeker
Staff member
Mar 5, 2012
8,780
I rewrote the problem with $w=xy \Rightarrow y=\frac w x$ to get:

$x^2-w+2\frac {w^2} {x^2}=116$

Feeding it to Wolfram gives a nice graph and all 12 integer solutions, with the minimum of -30 and the maximum of 63.

Likewise, it would be nice to see a more analytical solution.
 

Albert

Well-known member
Jan 25, 2013
1,225
I rewrote the problem with $w=xy \Rightarrow y=\frac w x$ to get:

$x^2-w+2\frac {w^2} {x^2}=116$

Feeding it to Wolfram gives a nice graph and all 12 integer solutions, with the minimum of -30 and the maximum of 63.

Likewise, it would be nice to see a more analytical solution.
yes, it could be solved to use a more analytical solution,try it ! it is not hard !

I will give the solution soon
 

Albert

Well-known member
Jan 25, 2013
1,225
$ x^2-xy+2y^2=116$
we rerrange it and get
$x^2-xy+2y^2-116=0----(1)$
solving for x ,since x,y are integers the determinant:
$7y^2-464 \leq 0$
ant it must be a perfect square
$ \therefore -8 \leq y\leq 8$
furthermore if we replace x , y with -x and -y the equation remain unchanged
so we only have to put y=0,1,2,3,4,5,6,7,8 to
(1) and get the corresponding x
by taking for (x,y)=(9,7) or (-9,-7) the max(xy)=63
(x,y)=(6,-5) or (-6,5) the min(xy)=-30
 

anemone

MHB POTW Director
Staff member
Feb 14, 2012
3,689
Since \(\displaystyle x^2-xy+2y^2-116=0\) are defined over the real integers, we know that the discriminant of the equation (if we solve it for x) will be greater than or equal to zero.

Thus,

\(\displaystyle (-y)^2-4(1)(2y^2-116) \ge 0\)

\(\displaystyle 464-7y^2 \ge 0\)

\(\displaystyle (\sqrt{464}+\sqrt{7}y)(\sqrt{464}-\sqrt{7}y) \ge 0\) \(\displaystyle \rightarrow {-8.1416 \le y \le 8.1416} \)

But y will be an integer, thus, we know that \(\displaystyle {-8 \le y \le 8} \) must be true.

From the given equation \(\displaystyle x^2-xy+2y^2=116\)

We know that we can manipulate the RHS of the equation by doing the following:
\(\displaystyle x^2-xy+2y^2=114+2(1)\) which implies \(\displaystyle y=\pm1\)

This gives \(\displaystyle x^2-x(\pm 1)=114\) but this leads to non-integer solutions for x.

We repeat the process from \(\displaystyle y=2\) to \(\displaystyle y=8\) (we will cover the negative values of y as well because of the fact that \(\displaystyle y^2=1, 4, 9, 14, 25, 36, 49, 64\) would cover the y values from \(\displaystyle y=\pm1, \pm2, \pm3, \pm4, \pm5, \pm6, \pm7, \pm8\)) and we find that all of the integer solutions to the equations are \(\displaystyle (6, -5), (-11, -5), (11, 5), (-6, 5), (2, -7), (-9, -7), (9, 7), (-2, 7), (-2, -8), (-6, -8), (6, 8), \) and \(\displaystyle (2, 8)\) which gives us the range of \(\displaystyle xy\) as \(\displaystyle -30 \le xy \le 63\).

(Edit:I now notice that this solution is similar to that posted by Albert, which I did not see until after making my post....I am sorry!)
 
Last edited: