Given quadratic equation how are the integer solutions found?

AI Thread Summary
The discussion focuses on finding integer solutions for the quadratic equation x² + 138x + 317 = y². After completing the square, the equation is transformed into (x + 69)² - y² = 4444, which can be factored to find integer solutions. Participants discuss the implications of the factors of 4444 and how to derive values for x and y, emphasizing the importance of considering the parities of the terms involved. The conversation highlights the challenge of identifying valid integer pairs and the computational difficulty associated with factoring large numbers, particularly semiprimes. Ultimately, the participants clarify the correct approach to factorization and solution derivation.
curiouschris
Messages
147
Reaction score
0
Not homework but given the question it probably fits here best

Given the following equation
$$x^2+138x+317=y^2$$
How do you find the integer solutions?

For example wolframalpha has the solutions. but I cannot see how they are derived
http://www.wolframalpha.com/input/?i=x^2+138x+317=y^2

By completing the squares and setting y to 0 I get the x intercepts

$$x^2+138x+317=y^2$$ ... $$x+69=+/-sqrt(4444)$$ $$x=-69+/-sqrt(4444)= -2.34\ or\ -135.66$$
But I don't understand how to take it further!

How do I calculate the integer solutions that WolframAlpha shows?
 
Physics news on Phys.org
curiouschris said:
Not homework but given the question it probably fits here best

Given the following equation
$$x^2+138x+317=y^2$$
How do you find the integer solutions?

For example wolframalpha has the solutions. but I cannot see how they are derived
http://www.wolframalpha.com/input/?i=x^2+138x+317=y^2

By completing the squares and setting y to 0 I get the x intercepts

$$x^2+138x+317=y^2$$ ... $$x+69=+/-sqrt(4444)$$ $$x=-69+/-sqrt(4444)= -2.34\ or\ -135.66$$
But I don't understand how to take it further!

How do I calculate the integer solutions that WolframAlpha shows?
It looks like you completed the square correctly.

After completing the square, you can write the equation as:
##\displaystyle\ (x+69)^2-y^2=4444 \ ##​

Do you recognize that equation?
 
SammyS said:
It looks like you completed the square correctly.

After completing the square, you can write the equation as:
##\displaystyle\ (x+69)^2-y^2=4444 \ ##​

Do you recognize that equation?
Hi Sammy

No I don't recognise it. As explained this is not homework just personal research. From my research it looks like Fermat's theorem.
So...
$$(x+69)^2-y^2 = (x+69+y)(x+69-y)=4444$$
Is that correct?
My problem is I can't make sense of the 4444! The actual n value should be 1111 and I am looking to only solve it at the simple factor of 1111 * 1

I seem to have missed a step but I don't know what that step is :(

Do I divide both sides by 4? and where did the 4 come from...
 
curiouschris said:
Hi Sammy

No I don't recognise it. As explained this is not homework just personal research. From my research it looks like Fermat's theorem.
So...
$$(x+69)^2-y^2 = (x+69+y)(x+69-y)=4444$$
Yes, that's what you needed to do. You have two integer factors on the left. How can they lead to the number on the right? There are only so many possibilities.
 
harupex is better prepared to work with you on this than I am.

I just wanted to get you started.
 
haruspex said:
Yes, that's what you needed to do. You have two integer factors on the left. How can they lead to the number on the right? There are only so many possibilities.

So

$$(x+69)2−y2=(x+69+y)(x+69−y)= 4444 = 4 * 1111 = 1 * 4444$$

is valid and for 1 solution I just need to find combinations of x and y where x+y=-65 and x-y=1042?

Hmmm ok it makes my next problem a little harder I need to code that as an excel macro
 
curiouschris said:
So
$$(x+69)2−y2=(x+69+y)(x+69−y)= 4444 = 4 * 1111 = 1 * 4444$$
Yes, but what about other factorisations?
curiouschris said:
I just need to find combinations of x and y where x+y=-65 and x-y=1042?
I don't follow. Where are you getting those numbers from?
curiouschris said:
Hmmm ok it makes my next problem a little harder I need to code that as an excel macro
Not sure how to factorise using Excel. Google for it.
 
haruspex said:
Yes, but what about other factorisations?

I don't follow. Where are you getting those numbers from?

Not sure how to factorise using Excel. Google for it.

The numbers are from the factors 4 and 1111 which have the product 4444

(x+y+69)=4=(x+y)=4-69=-65\ and\ (x-y+69)=4=(x-y)=1111-69=1042
Isn't this correct? If not then I have missed something.

In this instance I am only interested in the largest number which in this case is 1111.
 
curiouschris said:
The numbers are from the factors 4 and 1111 which have the product 4444

(x+y+69)=4=(x+y)=4-69=-65\ and\ (x-y+69)=4=(x-y)=1111-69=1042
Isn't this correct? If not then I have missed something.

In this instance I am only interested in the largest number which in this case is 1111.
Ok, I see where you get those numbers, but they won't give you integer solutions.
Think about the parities of the two terms on the left. Can x+y be odd but x-y even?
 
  • #10
There are more possible factorizations of 4444. Some of them will lead to integer solutions.
 
  • #11
haruspex said:
Ok, I see where you get those numbers, but they won't give you integer solutions.
Think about the parities of the two terms on the left. Can x+y be odd but x-y even?

Oops an erroneous =4 in that lot.
Never thought about odds and evens. Like signs its something I always forget :( so the sum of an odd and an even can never be an even
(x-y+69)=2=(x-y)=2-69=-67\ and\ (x+y+69)=2222=(x+y)=2222-69=2153
Is that better?

So working that through
( 2153 - 67 )/2 = 1043
( 2153 - 1043 ) = 1110
so 1 possible solution is
x=1043: y=1110

Have I done this correctly?
 
  • #12
curiouschris said:
Oops an erroneous =4 in that lot.
Never thought about odds and evens. Like signs its something I always forget :( so the sum of an odd and an even can never be an even
(x-y+69)=2=(x-y)=2-69=-67\ and\ (x+y+69)=2222=(x+y)=2222-69=2153
Is that better?

So working that through
( 2153 - 67 )/2 = 1043
( 2153 - 1043 ) = 1110
so 1 possible solution is
x=1043: y=1110

Have I done this correctly?
Yes, that looks right. Earlier you said you were only interested in the largest number, but I'm not sure what you meant by that. Do you mean the largest possible value of x or y?
 
  • #13
Thanks haruspex for all your help, Sammys and mfb too.

haruspex said:
Yes, that looks right. Earlier you said you were only interested in the largest number, but I'm not sure what you meant by that. Do you mean the largest possible value of x or y?

The largest integer number I am interested in is a semiprime. In this case the semiprime is 1111. That's why 4444 threw me. Why did the equation complete to 4444 when I was actually thinking it should have completed to 1111?

Its starting to make sense to me why by completing the squares I got a number different from what I was expecting. I know I am a long way from complete understanding.

Being a semiprime I know that factoring (when its large enough) its only two prime factors is computationally expensive. so I am trying to avoid that. The answers I managed to derive above with your help are exactly what I am looking for.
 
  • #14
$$(x-y+69)=2=(x-y)=2-69=-67\ and\ (x+y+69)=2222=(x+y)=2222-69=2153$$
Be careful with equal signs. This would imply 2=-67 and 2222=2153 which is clearly wrong.

curiouschris said:
Being a semiprime I know that factoring (when its large enough) its only two prime factors is computationally expensive.
Yes, if your factors have more than 20-25 digits it starts to take some time. Factorizing 1111 is trivial.
 
  • #15
mfb said:
$$(x-y+69)=2=(x-y)=2-69=-67\ and\ (x+y+69)=2222=(x+y)=2222-69=2153$$
Be careful with equal signs. This would imply 2=-67 and 2222=2153 which is clearly wrong.
Haha I see what you mean. I'll be more careful next time thru
 
Back
Top