[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 2 KB, 332x224, math.png [View same] [iqdb] [saucenao] [google]
10855621 No.10855621 [Reply] [Original]

Can anyone give me any sort of strategy, or source to find one, for finding integer solutions?

Like in the case of pic related, how would you find an integer solution, like (3, 4, 13, 12), without guess and check?

>> No.10855670

>>10855621
hmm...not sure. but Here are a few observations

if (a,,b, c , d) is a solution, then so is (Aa,Ab, Ac,Ad) for any number A.

and if you permute a and b, the resulting will also be a solution, if you permute c and d, then the result is not a solution.

And the variety is subset of R^4, a 3 dimensional hyper surface projecting out of the origin.

>> No.10855811

bump

>> No.10855841

If a^2+b^2 is divisible by 2 but not 4, then there are no solutions. Otherwise there are finitely many solutions.

>> No.10855860

>>10855621
Just find all the pythagorean triples and then find all squares which subtract (your c^2 - d^2 term) to get the traditional "C^2" term.
3b1 has a vid describing the way to find all possible pythagorean triples

>> No.10856441

>>10855841
where did you get that from? why?

>> No.10856469

>>10855621
a = b = c = d = 0

>> No.10856473

>>10855621
NP problem.

if you solve it put my post number in the thesis, as a cameo.

plz

>> No.10856485
File: 179 KB, 926x695, 5-ways-your-brain-is-playing-mind-games-with-you.jpg [View same] [iqdb] [saucenao] [google]
10856485

>>10855670
linear algebra mind

>>10855811
answer seeker mind

>>10855841
number theory mind

>>10855860
geometry mind

>>10856441
curious-child mind

>>10856469
mega brainlet mind

>>10856473
complexity theory mind

and last but not least...

>>10855621
Faggot mind

>> No.10856491

>>10856485
why the homophobia?

>> No.10856500

>>10855860
Building off of this, take a known pythagorean triple, such as 5 (25 = 16 + 9), and build another pythagorean triple using that as one side and you have an answer. So, the next highest is 13, so you'd have to build another pythagorean triple using 13 as one side. Don't know how to avoid guess and check, but this mitigates it at least

Also, (-3,4,13,12) (3,-4,13,12) (3,4,-13,12) etc. are alternative answers ;)

>> No.10856954

>>10855621
if you move d^2 to the left side, this is just a Pythagorean quadruple https://en.m.wikipedia.org/wiki/Pythagorean_quadruple

>> No.10857757
File: 19 KB, 1469x767, ff.png [View same] [iqdb] [saucenao] [google]
10857757

No solutions except for everything being 0.

>> No.10857789

>>10857757
I think that just proves there's no solutions that form a valid triangle where c and d are sides of a triangle and a+b is another side.

>> No.10858838

>>10855621
Hi OP this is similar to pythagorean triples.
Gauss had an interesting method for finding those.
Basically you will want to use complex numbers.
(You should be familar with this by now)
And the idea is that instead of allowing all comblex numbers he chose a subset of the complex numbers called the Gaussian integers.

Basically these are the complex numbers of the form a+bi where a and b are elements of the integers.

There are lots of other methods for computing pythagorean triples aswell maybe you can adept one of these to your specifi problem

https://en.wikipedia.org/wiki/Pythagorean_triple#Relation_to_Gaussian_integers

>> No.10858859

>>10856491
Where do you think you are, faggot?

>> No.10858862

>>10856491

Leave, you don't belong.

>> No.10858890

>>10855621
like another anon said, this is not doable in polynomial time.
Do you know how to program? all of these are doable via program
but if you are looking for some general easy algorithm it dosen't exist

>> No.10858972

>>10856491
Because OP always defaults to faggot status. That's just by convention.

>> No.10858977

>>10855621
You could write a code to solve this in less than 5 minutes.

>> No.10858979

>>10856500
And the k multiples of these answers

>> No.10860276

>>10855621
It should have taken you a minute to realize this is equivalent to finding rational points on the unit sphere. Now go and google that

>> No.10860377

>>10856954
>>10860276
Good answers. Draw a rational line through the North Pole of s sphere. Find where it intersects the sphere again. That’s a rational point. Clear denominators.

>> No.10861386
File: 610 KB, 805x720, cmMu4MI.png [View same] [iqdb] [saucenao] [google]
10861386

take any k, l
a = 2k
b = 2l + 1
c = 2k^2 + 2l^2 + 2l + 1
d = 2k^2 + 2l^2 + 2l

>> No.10861749

import random

while True:

a = random.randint(1,10)**2
b = random.randint(1,10)**2
c = random.randint(1,10)**2
d = random.randint(1,10)**2

ab = (a+b)
cd = (c-d)

print(a,b,c,d,ab,cd)

if ab == cd:
print(f"\nSolved: a={a**(1/2)} b={b**(1/2)} c={c**(1/2)} d={d**(1/2)}")
input()

an inefficient way

>> No.10862926

>>10855621
>strategy
Start with the simple approach.
All zeros is the trivial solution but it nevertheless is a solution.
One zero:
if d=0 you have a pythagorean, easy
if c=0 you have a problem
if a or b is zero you again have a pythagorean
Two zeros, and just do the permutations.

Once you have done that you will probably have a feel for how to proceed from there.

>> No.10863064

>>10855621
If you just want to generate integer solutions, then use the identity (w^2 + x^2)(y^2 + z^2) = (xy + wz)^2 + (wy - xz)^2, and just factorize c^2 - d^2 into c+d and c-d, and set c+d = w^2 + x^2, and c-d = y^2 + z^2 (so, a = xy + wz, and b = wy - xz).