0

I am trying to solve the equation $937=x^2+24x+24y+y^2$, where x and y are integers. What I've tried is changing the right side of the equation to $$(x+y)^2-2xy+24x+24y$$ $$(x+y)^2-2(x+y)(-12)+xy$$ $$(x+y)((x+y)++24+x+y)$$ $$2(x+y)(x+12+y)$$

and then trying to find integers that fit into the equation but it doesn't seem like the most efficient or proper way to solve this equation. Any suggestions?

Jonathan
  • 514
  • 7
    Hint: $(x+12)^2 + (y+12)^2 = ???$ – achille hui Sep 14 '15 at 20:48
  • When I evaluate that I get $$x^2+24x+24y+y^2+288$$. I'm not sure how that would help me solve the equation. – Jonathan Sep 14 '15 at 20:53
  • 1
    "Borrow" the 288 from your goal number 937 and see what's left. Then you're looking for sum of two squares to equal that, and there are various techniques for solving $u^2+v^2=m$ when it can be solved. – coffeemath Sep 14 '15 at 20:56
  • 2
    $937+288 = 1225 = 35^2 = (5\times 7)^2$, this reduce to the well known problem of writing a number as sum of squares... – achille hui Sep 14 '15 at 20:58
  • I reduced it to $$649= (x+12)^2+(y+12)^2$$. How would I solve $$u^2 + v^2=m$$? – Jonathan Sep 14 '15 at 21:01
  • 2
    @coffeemath, I think you led OP astray. You should have told him to add $288$ to both sides of the equation. – Lubin Sep 14 '15 at 21:10
  • when I add 288 to both sides then I get $$1225=(x+12)^2+(y+12)^2$$ Do I then just guess integer solutions, or is there a better way to solve this? – Jonathan Sep 14 '15 at 21:18
  • Using the Brahmagupta–Fibonacci identity $(a^2 + b^2)(c^2+d^2) = (ac-bd)^2+(ad+bc)^2$, you can build up the solution (the non-trivial ones) you need from the little fact $5 = 2^2 + 1^2$. In the special case, $(a,b) = (c,d)$, the identity recues to $(a^2+b^2)^2 = (a^2-b^2)^2 + (2ab)^2$. This leads to $25 = (2^2-1)^2 + (2\cdot 2\cdot 1)^2 = 3^2 + 4^2$. – achille hui Sep 14 '15 at 21:25
  • I'm so lost. I've never even heard of the Brahmagupta-Fibonacci identity. Are there any easier ways to solve this? – Jonathan Sep 14 '15 at 21:36
  • Could "try everything," not bad. Or use the fact that if $u^2+v^2$ is divisible by $7$ then $u$ and $v$ both are. (This is because $7$ is of the shape $4k+3$. So $x+12=7s$, $y+12=7t$ where $s^2+t^2=25$. That has solutions $s=0$, $t=\pm 5$, $s=\pm 5$, $t=0$ and $s=\pm 3$, $t=\pm 4$, and the other way around in all combinations. – André Nicolas Sep 14 '15 at 22:11
  • @Lubin You're right, should have added the 288 to both sides, then the left side becomes the sum of squares. – coffeemath Sep 14 '15 at 23:02

1 Answers1

2

Complete the square in each of the $x$ and $y$ quadratics:

$$\begin{align} (x^2+24x+144)+(y^2+24y+144)=937+288&=1225 \\ (x+12)^2+(y+12)^2=35^2 \end{align}$$

So we are seeking Pythagorean triples where the triangle has two sides of length $x+12,y+12$ and a hypotenuse of $35$. Irreducible Pythagorean triples are of the form:

$$(m^2-n^2,2mn,m^2+n^2)$$

The only primitive triples relevant here are those with $m^2+n^2\in\{5,7,35\}$ because these are all the factors of $35$ larger than one, and so are the only ones that can be scaled up to obtain a triangle with hypotenuse $35$.

The only one with integer solutions is $m^2+n^2=5 \implies m=2,n=1$ ($7$ and $35$ are of the form $4k+3$ so cannot be a sum of two integer squares) from which we have the primitive triple $(3,4,5)$. So

$$\begin{align} &3^2+4^2=5^2 \\ &\implies 21^2+28^2=35^2 \\ &\implies (\pm21)^2+(\pm28)^2=35^2 \\ &\implies (x+12,y+12)\in\{(21,28),(-21,28),(21,-28),(-21,-28),(28,21),(-28,21),(28,-21),(-28,-21)\} \\ &\implies (x,y)\in\{(9,16),(-33,16),(9,-40),(-33,-40),(16,9),(-40,9),(16,-33),(-40,-33)\} \end{align}$$


[Update]

As $\color{blue}{\text{coffeemath}}$ has pointed out, there are also trivial solutions (not Pythagorean triples) to the original equation, i.e.

$$(x+12,y+12)\in\{(\pm35,0),(0,\pm35)\}$$

whence

$$(x,y)\in\{(-47,-12),(23,-12),(-12,-47),(-12,23)\}$$

are also solutions.

Marconius
  • 5,635