To generate canonical form of Pythagorean triplet(geometric way)
Introduction
First it makes sense to define what is Pythagorean Triplet.
A Pythagorean triple is a triple of positive integers a, b, and c such that a right angled triangle exists with legs a , b and hypotenuse c. By the definition of Pythagorean Theorem , this is equivalent to finding positive integers a,b and c satisfying
a2+b2 = c2 ….1
The smallest and best-known Pythagorean triple is a =3, b =4, c = 5
It is not unusual to look for primitive Pythagorean triples.
The (1) is equivalent to finding real solution of
(a/c)2+(b/c)2 = 1
or x2+y2= 1 … 2
In case we get rational solutions in x and y the set (x,y,1) satisfy the condition. We can convert them to integer by proper multiplication that is LCM of denominator.
So we need to find rational x and y to satisfy the equation 2
We can put y as a function of x as following
Y = 2(1-x2)
We can choose x to be a rational number <1 all="" be="" br="" but="" cases.="" cases="" does="" for="" general="" generate="" get="" in="" may="" not="" of="" one="" rational.="" rational="" shall="" some="" the="" this="" to="" x="" y="">Now the problem is can we generate x and y to be rational or integer roots for a b c.
There are a couple of methods to find the rational x y.
the equation x^2+y^2 = 1 is a circle at centre (0,0) and radius 1
If we can find one point in the circle which is a rational point and draw a straight line y= mx +c through that point with m and c to be rational then it shall intersect the circle at another point which has got rational point. By choosing different m we can get more and more rational points.
We know one of the point in the circles is
x = 0 and y = -1 (people have used x = -1 and y =0 but this gives me simpler approach. The choice is arbitrary and no specific choice)
putting in y = mx + c we get y = mx-1 ….3
now put it in the equation 2 to get
x2 + (mx-1)2 = 1
or x2+m2x2-2mx=0
or x(1+m2) -2m = 0
x = 2m/(1+m2) ..4
put x = 2m/(1+m2) in 3 to get
y = 2m2/(1+m2) – 1 or (m2-1)/(m2+1)
so (2m/(1+m2), (m2-1)/(m2+1),1) satisfies x^2+y^2 = 1.
multiplying by m2+1 we get
(2m,.(m2-1),(m2+1)) satisfies x^2+y^2 = z^2 but they are not integers
By choosing different m we get different values basically in parametric form.
Now putting m =u/v which is ratio of integers and multiplying by v2
We get
x = 2uv
y = u2- v2
and z = u2 + v2
so (2uv, (u^2-v2) and (u^2+v^2)) form a triplet1>
No comments:
Post a Comment