Wikipedia:Reference desk/Archives/Mathematics/2013 October 23

= October 23 =

Is there any trick to solve this problem?
How many different possible values x,y can take if (x - y)2 + 2y2 = 27, where x,y are integers? The answer is 8 different values. Please, help me and this is not a homework problem. Scientist456 (talk) 12:18, 23 October 2013 (UTC)


 * It depends on what you are asking for a trick to. In the general case, no, see Matiyasevich's theorem. However, for this specific problem, there is a trick. You have an equation of the form a + b = 27, where a and b are positive; there are only finitely many cases where your a and b will have a + b < 27. Eybeballing it, x cannot be larger than 5 and y cannot be larger than 4, in absolute value. So, just test all the cases -5 <= x <= 5 and -4 <= y <= 4 (there's 99 of them, so I'm not doing it here). Edit: for the negative case, |x - y| < 6 must be true, so you can cut cases down using that- and since 27 is odd and 2y^2 is even, (x-y)^2 must be odd, so x - y must also be odd.Phoenixia1177 (talk) 12:41, 23 October 2013 (UTC)
 * (Sorry, I was eating rice) This works quicker: since, by varying x around, you can make x-y whatever you want, independent of y, we can put z^2 + 2y^2 = 27. As mentioned, z is odd, so z is 1, 3, or 5 (or their negative). So, we would need y^2 = 13, 9, or 1. Clearly, only the latter two work and you have pairs (of (y, z)): (+/-1, +/-5) and (+/-3, +/-3). Then, solving x = y + z for the values we just found, you get pairs (6, 1), (4, -1), (-4, 1), (-6, -1), (6, 3), (0, -3), (0, 3), (-6, -3) of solutions. (also, my eyeballing while under the spell of rice ain't so good, apparently).Phoenixia1177 (talk) 12:59, 23 October 2013 (UTC)


 * I would just solve the equation for x in terms of y using the quadratic formula to get $$x=y \pm \sqrt{27-2y^2}.$$ Try all possible values of |y| that give the expression under the square root sign as non-negative [later edit: a non-negative square] -- this gives |y|= 1 or 3, so y = 1 or -1 or 3 or -3. Plug each of these in turn into the expression for x, in each case letting the ± sign be either plus or minus. Duoduoduo (talk) 15:14, 23 October 2013 (UTC)