American Citizen on Sun, 15 Sep 2024 00:40:31 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: trying to find 1/2 angle tangent formuli for rationals |
Loïc
Your derivation matches mine, after working this afternoon with
both GP-Pari and Maxima, to simplify the denominators. In my
program I check for pure algebraic content versus some rational or
integer values for a,b and then use the lcm of the denominator and
then gcd of the numerators to simplify to lowest integer
_expression_.
{tsides_from_halftans(a,b)=
my(r,s,t,R,S,T,u,v);
r=2*a/(a^2+1);
R=2*a*(b^2+1);
s=2*b/(b^2+1);
S=2*b*(a^2+1);
t=2*(a+b)*(1-a*b)/((a^2+1)*(b^2+1));
T=2*(a+b)*(1-a*b);
if(type(T)=="t_FRAC",
u=lcm(denominator(R),lcm(denominator(S),denominator(T)));
R=R/u; S=S/u; T=T/u;
v=gcd(R,gcd(S,T));
R=R/v; S=S/v; T=T/v;
u=1;
,
u=1;
);
return(u*[R,S,T]);
}
On Sat, 14 Sep, 2024 at 01:36, American Citizen wrote:Hello:
It is a known (maybe not so well known) fact that if a person is given
the rational values [a,b] for the 1/2 angle tangents of a triangle, then
the 3rd 1/2 angle tangent is also rational and the triangle is a Heron
triangle.
I am trying to find an algebraic _expression_ in GP Pari, which takes as
input [a,b] (rational or symbolic) and outputs the sides of the triangle.
Example:
for the 13,14,15 Heron triangle, the 1/2 angle tangents are [ 1/2, 4/7,
2/3 ]
So if I input f(1/2,4/7) I should expect to see (intermediate value 2/3
for the missing 1/2 angle tangent) and finally 13,14,15
My goal is to input certain rationals creating square sided Heron
triangles (2 of the sides must be squares) and checking to see if we
have a 3rd square side
I know of only 2 such Heron triangles, 4427,4380,1853 and
68595,68104,11789 and I am searching for a 3rd such example.
I do know that the middle side > 842,180, having exhaustively searched
the 42+ quadrillion triangles.
Can we find an algebraic _expression_ for the triangles sides s,t,u, given
a,b as the 1/2 angle tangents?
The third tangent is just (1-ab)/(a+b) (trigonometry). With a little bitof elbow grease, the formulas for s/u and t/u are possible to find fromCarnot formula. It gives
f(a,b)=my(c=(1-a*b)/(a+b),v=[b*(1+a^2)/(a+b)/(1-a*b),a*(1+b^2)/(a+b)/(1-a*b),1]);[v/content(v),c];
(Note that in the first two terms of the vector, b can be changed in -bbut I do not understand what this means).
Loïc