From: David Bernier on
David Bernier wrote:
> Jim Ferry wrote:
>> On Sep 21, 3:03 am, David Bernier <david...(a)videotron.ca> wrote:
>>> Leonard Wapner asked about the behaviour of
>>> a(n) = (tan 1)(tan 2) ... (tan n)
>>> in 2006:
>>>
>>> <http://groups.google.com/group/sci.math/msg/fa3878fa776a992b> .
>>>
>>> If n is very close to an odd multiple of pi/2, the
>>> tangent of n will be large in absolute value.
>>>
>>> One of the convergents in the continued fraction expansion
>>> of pi/2 is 52174/33215 .
>>>
>>> I find a(52174) ~= 476029.121 .
>>>
>>> On the other hand, if we exclude the tan(52174) term,
>>> we get a(52173) ~= -2.6217
>>>
>>> while tan(52174) ~= -181570.2957 .
>>>
>>> Since pi/2 is very close to 52174/33215 ,
>>> (33215/52174)*pi/2 is very close to 1.
>>>
>>> It seems that if x = (33215/52174)*pi/2 , then
>>> (tan x)(tan 2x)... (tan 52173x) might be -1 :
>>>
>>> ? prod(X=1,52173,tan(X*(33215.0/52174.0)*Pi/2))
>>> %37 =
>>> -1.00000000000000000000000000000000000000000000000000000000000000000000000
>>>
>>> (using PARI-gp ).
>>>
>>> David Bernier
>>
>> Yes, it's -1: in general, for any integers n,k > 0 with n even and k
>> relatively prime to n, we have
>>
>> prod(X=1,n-1,tan(X*(k/n)*Pi/2)) =
>>
>> prod(X=1,n/2-1,tan(X*(k/n)*Pi/2)) * tan((n/2)*(k/n)*Pi/2) * prod(X=1,n/
>> 2-1,tan((n-X)*(k/n)*Pi/2)).
>>
>> Because k is odd we have tan((n/2)*(k/n)*Pi/2) = tan(k*Pi/4) = (-1)^
>> ((k-1)/2), and
>>
>> tan((n-X)*(k/n)*Pi/2) = tan(k*Pi/2 - X*(k/n)*Pi/2) = cot(X*(k/n)*Pi/
>> 2).
>>
>> Because k and n are relatively prime, each of the tangent and
>> cotangent factors is finite, and the
>> product of each pair is 1 for X = 1 to n/2-1 so
>>
>> prod(X=1,n-1,tan(X*(k/n)*Pi/2)) = (-1)^((k-1)/2).
>
> Thanks. So 'tans' get transformed to 'cotans', with
> cancellation among those ...
>
> Perhaps there is also a result when n and k are odd, coprime,
> positive:
>
> ? prod(X=1, 260514, tan(X*((165849/260515)*Pi/2)))
> %17 =
> 1.000000000000000000000000000000000000000000000000000000000000000000000000000000000\\
>
> 000000000000000000000000000000000000000000000000000000000000000000000000000000000000\\
>
> 0000000000000000000000000000000000
>
> Here, k = 165849, n = 260515, n-1 = 260514 so,
> following your method,
>
> prod(X=1, 260514 ,tan(X*(165849/260515)*Pi/2)) =
> prod(X=1, 130257, tan(X*(165849/260515)*Pi/2)) * prod(X=130258, 260514,
> tan(X*(165849/260515)*Pi/2))
>
> prod(X=130258, 260514, tan(X*(165849/260515)*Pi/2))
> =
> prod(X=1, 130257, tan((n-X)*(165849/260515)*Pi/2))
> = prod(X=1, 130257, tan(165849*Pi/2 - X*(165849/260515)*Pi/2))
> =
> prod(X = 1, 130257, cot( X*(165849/260515)*Pi/2 ) ).
>
> So,
> prod(X=1, 260514 ,tan(X*(165849/260515)*Pi/2)) =
> =
> prod(X=1, 130257, tan(X*(165849/260515)*Pi/2)) *\
> prod(X = 1, 130257, cot( X*(165849/260515)*Pi/2 ) )
>
> = 1 .
>
> ------------------------------
>
> If we represent a convergent of pi/2 as
> n/k (for example, n = 52174, k = 33215), gcd(n, k) = 1 assumed
> below ...
>
> it seems to me that when k is odd, we have a simple result
>
> for prod(X=1,n-1,tan(X*(k/n)*Pi/2)) [ maybe +/- 1 ].
>
> In case k is even and n odd, k*pi/2 is very close
> to an integer multiple of pi.
>
> Maybe we get something too, I'm not sure:
>
> ? prod(X=1, 354, tan(X*(226/355)*(Pi/2)))
> %18 = -355.000000000000000000000000000000000000000000000\
> 000000000000000000000000000000000000000000000000000000\
> 0000000000000000000000000000000000000000000000000000000\
> 0000000000000000000000000000000000000000000
>
> (For n = 355, k = 226.)

Another example: n = 411557987 and k = 262005952. We have k even and
n odd, as with 355/226.

PARI-gp gives
? prod(X = 1,411557986, tan(X*(262005952/411557987)*(Pi/2)))
%19 = -411557986.99999999999999999999999999999999999999999999999999999\
9999999999999999999999999999999999999999999999999999999999999999999999\
99999999999999999999999999999999999999999999999999999999999999920894 ,

close to -411557987 .


From: David Bernier on
David Bernier wrote:
> David Bernier wrote:
>> Jim Ferry wrote:
>>> On Sep 21, 3:03 am, David Bernier <david...(a)videotron.ca> wrote:
>>>> Leonard Wapner asked about the behaviour of
>>>> a(n) = (tan 1)(tan 2) ... (tan n)
>>>> in 2006:
>>>>
>>>> <http://groups.google.com/group/sci.math/msg/fa3878fa776a992b> .
>>>>
>>>> If n is very close to an odd multiple of pi/2, the
>>>> tangent of n will be large in absolute value.
>>>>
>>>> One of the convergents in the continued fraction expansion
>>>> of pi/2 is 52174/33215 .
>>>>
>>>> I find a(52174) ~= 476029.121 .
>>>>
>>>> On the other hand, if we exclude the tan(52174) term,
>>>> we get a(52173) ~= -2.6217
>>>>
>>>> while tan(52174) ~= -181570.2957 .
>>>>
>>>> Since pi/2 is very close to 52174/33215 ,
>>>> (33215/52174)*pi/2 is very close to 1.
>>>>
>>>> It seems that if x = (33215/52174)*pi/2 , then
>>>> (tan x)(tan 2x)... (tan 52173x) might be -1 :
>>>>
>>>> ? prod(X=1,52173,tan(X*(33215.0/52174.0)*Pi/2))
>>>> %37 =
>>>> -1.00000000000000000000000000000000000000000000000000000000000000000000000
>>>>
>>>> (using PARI-gp ).
>>>>
>>>> David Bernier
>>>
>>> Yes, it's -1: in general, for any integers n,k > 0 with n even and k
>>> relatively prime to n, we have
>>>
>>> prod(X=1,n-1,tan(X*(k/n)*Pi/2)) =
>>>
>>> prod(X=1,n/2-1,tan(X*(k/n)*Pi/2)) * tan((n/2)*(k/n)*Pi/2) * prod(X=1,n/
>>> 2-1,tan((n-X)*(k/n)*Pi/2)).
>>>
>>> Because k is odd we have tan((n/2)*(k/n)*Pi/2) = tan(k*Pi/4) = (-1)^
>>> ((k-1)/2), and
>>>
>>> tan((n-X)*(k/n)*Pi/2) = tan(k*Pi/2 - X*(k/n)*Pi/2) = cot(X*(k/n)*Pi/
>>> 2).
>>>
>>> Because k and n are relatively prime, each of the tangent and
>>> cotangent factors is finite, and the
>>> product of each pair is 1 for X = 1 to n/2-1 so
>>>
>>> prod(X=1,n-1,tan(X*(k/n)*Pi/2)) = (-1)^((k-1)/2).
>>
>> Thanks. So 'tans' get transformed to 'cotans', with
>> cancellation among those ...
>>
>> Perhaps there is also a result when n and k are odd, coprime,
>> positive:
>>
>> ? prod(X=1, 260514, tan(X*((165849/260515)*Pi/2)))
>> %17 =
>> 1.000000000000000000000000000000000000000000000000000000000000000000000000000000000\\
>>
>> 000000000000000000000000000000000000000000000000000000000000000000000000000000000000\\
>>
>> 0000000000000000000000000000000000
>>
>> Here, k = 165849, n = 260515, n-1 = 260514 so,
>> following your method,
>>
>> prod(X=1, 260514 ,tan(X*(165849/260515)*Pi/2)) =
>> prod(X=1, 130257, tan(X*(165849/260515)*Pi/2)) * prod(X=130258,
>> 260514, tan(X*(165849/260515)*Pi/2))
>>
>> prod(X=130258, 260514, tan(X*(165849/260515)*Pi/2))
>> =
>> prod(X=1, 130257, tan((n-X)*(165849/260515)*Pi/2))
>> = prod(X=1, 130257, tan(165849*Pi/2 - X*(165849/260515)*Pi/2))
>> =
>> prod(X = 1, 130257, cot( X*(165849/260515)*Pi/2 ) ).
>>
>> So,
>> prod(X=1, 260514 ,tan(X*(165849/260515)*Pi/2)) =
>> =
>> prod(X=1, 130257, tan(X*(165849/260515)*Pi/2)) *\
>> prod(X = 1, 130257, cot( X*(165849/260515)*Pi/2 ) )
>>
>> = 1 .
>>
>> ------------------------------
>>
>> If we represent a convergent of pi/2 as
>> n/k (for example, n = 52174, k = 33215), gcd(n, k) = 1 assumed
>> below ...
>>
>> it seems to me that when k is odd, we have a simple result
>>
>> for prod(X=1,n-1,tan(X*(k/n)*Pi/2)) [ maybe +/- 1 ].
>>
>> In case k is even and n odd, k*pi/2 is very close
>> to an integer multiple of pi.
>>
>> Maybe we get something too, I'm not sure:
>>
>> ? prod(X=1, 354, tan(X*(226/355)*(Pi/2)))
>> %18 = -355.000000000000000000000000000000000000000000000\
>> 000000000000000000000000000000000000000000000000000000\
>> 0000000000000000000000000000000000000000000000000000000\
>> 0000000000000000000000000000000000000000000
>>
>> (For n = 355, k = 226.)
>
> Another example: n = 411557987 and k = 262005952. We have k even and
> n odd, as with 355/226.
>
> PARI-gp gives
> ? prod(X = 1,411557986, tan(X*(262005952/411557987)*(Pi/2)))
> %19 = -411557986.99999999999999999999999999999999999999999999999999999\
> 9999999999999999999999999999999999999999999999999999999999999999999999\
> 99999999999999999999999999999999999999999999999999999999999999920894 ,
>
> close to -411557987 .

With k even, we can replace X*(k/n)*Pi/2 by X*( (k/2)/n )*Pi, e.g.
prod(X=1, 354, tan(X*(226/355)*(Pi/2)))
=
prod(X=1, 354, tan(X*(113/355)*Pi)) .

Maybe these product identities from Robert Israel
(which were also "somewhat known" previously)
can help,
cf.:

< http://groups.google.com/group/sci.math/msg/5a40ffff5c84d31f > .

He also gives a result for a product of cosines. Maybe it
will work out.


David Bernier
From: Jim Ferry on
On Sep 24, 4:11 am, David Bernier <david...(a)videotron.ca> wrote:
> Jim Ferry wrote:
> > On Sep 21, 3:03 am, David Bernier <david...(a)videotron.ca> wrote:
> >> Leonard Wapner asked about the behaviour of
> >> a(n) = (tan 1)(tan 2) ... (tan n)
> >> in 2006:
>
> >> <http://groups.google.com/group/sci.math/msg/fa3878fa776a992b> .
>
> >> If n is very close to an odd multiple of pi/2, the
> >> tangent of n will be large in absolute value.
>
> >> One of the convergents in the continued fraction expansion
> >> of pi/2 is  52174/33215 .
>
> >> I find  a(52174) ~= 476029.121  .
>
> >> On the other hand, if we exclude the tan(52174) term,
> >> we get  a(52173) ~= -2.6217
>
> >> while  tan(52174) ~= -181570.2957 .
>
> >> Since pi/2 is very close to 52174/33215 ,
> >> (33215/52174)*pi/2   is very close to 1.
>
> >> It seems that if x = (33215/52174)*pi/2 , then
> >> (tan x)(tan 2x)...  (tan 52173x)  might be -1 :
>
> >> ? prod(X=1,52173,tan(X*(33215.0/52174.0)*Pi/2))
> >> %37 =
> >> -1.00000000000000000000000000000000000000000000000000000000000000000000000
> >> (using PARI-gp ).
>
> >> David Bernier
>
> > Yes, it's -1:  in general, for any integers n,k > 0 with n even and k
> > relatively prime to n, we have
>
> > prod(X=1,n-1,tan(X*(k/n)*Pi/2)) =
>
> > prod(X=1,n/2-1,tan(X*(k/n)*Pi/2)) * tan((n/2)*(k/n)*Pi/2) * prod(X=1,n/
> > 2-1,tan((n-X)*(k/n)*Pi/2)).
>
> > Because k is odd we have tan((n/2)*(k/n)*Pi/2) = tan(k*Pi/4) = (-1)^
> > ((k-1)/2), and
>
> > tan((n-X)*(k/n)*Pi/2) = tan(k*Pi/2 - X*(k/n)*Pi/2) = cot(X*(k/n)*Pi/
> > 2).
>
> > Because k and n are relatively prime, each of the tangent and
> > cotangent factors is finite, and the
> > product of each pair is 1 for X = 1 to n/2-1 so
>
> > prod(X=1,n-1,tan(X*(k/n)*Pi/2)) = (-1)^((k-1)/2).
>
> Thanks.  So 'tans' get transformed to 'cotans', with
> cancellation among those ...
>
> Perhaps there is also a result when n and k are odd, coprime,
> positive:
>
> ? prod(X=1, 260514, tan(X*((165849/260515)*Pi/2)))
> %17 =
> 1.000000000000000000000000000000000000000000000000000000000000000000000000000000000\\
> 000000000000000000000000000000000000000000000000000000000000000000000000000000000000\\
> 0000000000000000000000000000000000
>
> Here, k = 165849, n = 260515, n-1 = 260514 so,
> following your method,
>
> prod(X=1, 260514 ,tan(X*(165849/260515)*Pi/2)) =
> prod(X=1, 130257, tan(X*(165849/260515)*Pi/2)) * prod(X=130258, 260514,
> tan(X*(165849/260515)*Pi/2))
>
> prod(X=130258, 260514, tan(X*(165849/260515)*Pi/2))
> =
> prod(X=1, 130257, tan((n-X)*(165849/260515)*Pi/2))
> = prod(X=1, 130257, tan(165849*Pi/2 - X*(165849/260515)*Pi/2))
> =
> prod(X = 1, 130257, cot( X*(165849/260515)*Pi/2 ) ).
>
> So,
> prod(X=1, 260514 ,tan(X*(165849/260515)*Pi/2)) =
> =
> prod(X=1, 130257, tan(X*(165849/260515)*Pi/2)) *\
>      prod(X = 1, 130257, cot( X*(165849/260515)*Pi/2 ) )
>
> = 1 .
>
> ------------------------------
>
> If we represent a convergent of pi/2 as
> n/k  (for  example, n = 52174, k = 33215), gcd(n, k) = 1 assumed
> below ...
>
> it seems to me that when k is odd, we have a simple result
>
> for   prod(X=1,n-1,tan(X*(k/n)*Pi/2))  [ maybe +/- 1 ].
>
> In case k is even and n odd, k*pi/2 is very close
> to an integer multiple of pi.
>
> Maybe we get something too, I'm not sure:
>
> ? prod(X=1, 354, tan(X*(226/355)*(Pi/2)))
> %18 = -355.000000000000000000000000000000000000000000000\
> 000000000000000000000000000000000000000000000000000000\
> 0000000000000000000000000000000000000000000000000000000\
> 0000000000000000000000000000000000000000000
>
> (For n = 355, k = 226.)
>
> David Bernier

More generally, for k and n relatively prime, we have

prod(j=1,n-1,tan(j*(k/n)*Pi/2)) = ...

(-1)^((k-1)/2) for even n,
1 for odd n and odd k, and
n (-1)^((n-1)/2) for odd n and even k.

The odd n and odd k case uses the same trick of matching
tans and cots (with no factor left over, hence the result 1).

For odd n and even k, it is sufficient to prove the result
for the k=2 case, as larger values of k simply permute the
factors. This result is a simple corollary of

prod(j=1,n-1,x-tan(j*Pi/n)) = Re[(x+I)^n - I^n]/x for real x.

This identity holds because the n-1 distinct values tan(j*Pi/n)
all make (x+I)^n purely imaginary (as does 0, which is factored
out), which follows from n being odd and cis(j*Pi/n)^n being real
for each j = 1 to n-1.
From: jillbones on
On Sep 24, 7:48 am, David Bernier <david...(a)videotron.ca> wrote:
> David Bernier wrote:
> > Jim Ferry wrote:
> >> On Sep 21, 3:03 am, David Bernier <david...(a)videotron.ca> wrote:
> >>> Leonard Wapner asked about the behaviour of
> >>> a(n) = (tan 1)(tan 2) ... (tan n)
> >>> in 2006:
>
> >>> <http://groups.google.com/group/sci.math/msg/fa3878fa776a992b> .
>
> >>> If n is very close to an odd multiple of pi/2, the
> >>> tangent of n will be large in absolute value.
>
> >>> One of the convergents in the continued fraction expansion
> >>> of pi/2 is  52174/33215 .
>
> >>> I find  a(52174) ~= 476029.121  .
>
> >>> On the other hand, if we exclude the tan(52174) term,
> >>> we get  a(52173) ~= -2.6217
>
> >>> while  tan(52174) ~= -181570.2957 .
>
> >>> Since pi/2 is very close to 52174/33215 ,
> >>> (33215/52174)*pi/2   is very close to 1.
>
> >>> It seems that if x = (33215/52174)*pi/2 , then
> >>> (tan x)(tan 2x)...  (tan 52173x)  might be -1 :
>
> >>> ? prod(X=1,52173,tan(X*(33215.0/52174.0)*Pi/2))
> >>> %37 =
> >>> -1.00000000000000000000000000000000000000000000000000000000000000000000000
>
> >>> (using PARI-gp ).
>
> >>> David Bernier
>
> >> Yes, it's -1:  in general, for any integers n,k > 0 with n even and k
> >> relatively prime to n, we have
>
> >> prod(X=1,n-1,tan(X*(k/n)*Pi/2)) =
>
> >> prod(X=1,n/2-1,tan(X*(k/n)*Pi/2)) * tan((n/2)*(k/n)*Pi/2) * prod(X=1,n/
> >> 2-1,tan((n-X)*(k/n)*Pi/2)).
>
> >> Because k is odd we have tan((n/2)*(k/n)*Pi/2) = tan(k*Pi/4) = (-1)^
> >> ((k-1)/2), and
>
> >> tan((n-X)*(k/n)*Pi/2) = tan(k*Pi/2 - X*(k/n)*Pi/2) = cot(X*(k/n)*Pi/
> >> 2).
>
> >> Because k and n are relatively prime, each of the tangent and
> >> cotangent factors is finite, and the
> >> product of each pair is 1 for X = 1 to n/2-1 so
>
> >> prod(X=1,n-1,tan(X*(k/n)*Pi/2)) = (-1)^((k-1)/2).
>
> > Thanks.  So 'tans' get transformed to 'cotans', with
> > cancellation among those ...
>
> > Perhaps there is also a result when n and k are odd, coprime,
> > positive:
>
> > ? prod(X=1, 260514, tan(X*((165849/260515)*Pi/2)))
> > %17 =
> > 1.000000000000000000000000000000000000000000000000000000000000000000000000000000000\\
>
> > 000000000000000000000000000000000000000000000000000000000000000000000000000000000000\\
>
> > 0000000000000000000000000000000000
>
> > Here, k = 165849, n = 260515, n-1 = 260514 so,
> > following your method,
>
> > prod(X=1, 260514 ,tan(X*(165849/260515)*Pi/2)) =
> > prod(X=1, 130257, tan(X*(165849/260515)*Pi/2)) * prod(X=130258, 260514,
> > tan(X*(165849/260515)*Pi/2))
>
> > prod(X=130258, 260514, tan(X*(165849/260515)*Pi/2))
> > =
> > prod(X=1, 130257, tan((n-X)*(165849/260515)*Pi/2))
> > = prod(X=1, 130257, tan(165849*Pi/2 - X*(165849/260515)*Pi/2))
> > =
> > prod(X = 1, 130257, cot( X*(165849/260515)*Pi/2 ) ).
>
> > So,
> > prod(X=1, 260514 ,tan(X*(165849/260515)*Pi/2)) =
> > =
> > prod(X=1, 130257, tan(X*(165849/260515)*Pi/2)) *\
> >     prod(X = 1, 130257, cot( X*(165849/260515)*Pi/2 ) )
>
> > = 1 .
>
> > ------------------------------
>
> > If we represent a convergent of pi/2 as
> > n/k  (for  example, n = 52174, k = 33215), gcd(n, k) = 1 assumed
> > below ...
>
> > it seems to me that when k is odd, we have a simple result
>
> > for   prod(X=1,n-1,tan(X*(k/n)*Pi/2))  [ maybe +/- 1 ].
>
> > In case k is even and n odd, k*pi/2 is very close
> > to an integer multiple of pi.
>
> > Maybe we get something too, I'm not sure:
>
> > ? prod(X=1, 354, tan(X*(226/355)*(Pi/2)))
> > %18 = -355.000000000000000000000000000000000000000000000\
> > 000000000000000000000000000000000000000000000000000000\
> > 0000000000000000000000000000000000000000000000000000000\
> > 0000000000000000000000000000000000000000000
>
> > (For n = 355, k = 226.)
>
> Another example:  n = 411557987 and k = 262005952.  We have k even and
> n odd, as with 355/226.
>
> PARI-gp gives
> ? prod(X = 1,411557986, tan(X*(262005952/411557987)*(Pi/2)))
> %19 = -411557986.99999999999999999999999999999999999999999999999999999\
> 9999999999999999999999999999999999999999999999999999999999999999999999\
> 99999999999999999999999999999999999999999999999999999999999999920894 ,
>
> close to -411557987  .

How can you ignore the fact that when n = 90, TAN(n) is
infinity?

regards, Bill J.
From: David Bernier on
jillbones wrote:
> On Sep 24, 7:48 am, David Bernier <david...(a)videotron.ca> wrote:
>> David Bernier wrote:
>>> Jim Ferry wrote:
>>>> On Sep 21, 3:03 am, David Bernier <david...(a)videotron.ca> wrote:
>>>>> Leonard Wapner asked about the behaviour of
>>>>> a(n) = (tan 1)(tan 2) ... (tan n)
>>>>> in 2006:
>>>>> <http://groups.google.com/group/sci.math/msg/fa3878fa776a992b> .
>>>>> If n is very close to an odd multiple of pi/2, the
>>>>> tangent of n will be large in absolute value.
>>>>> One of the convergents in the continued fraction expansion
>>>>> of pi/2 is 52174/33215 .
>>>>> I find a(52174) ~= 476029.121 .
>>>>> On the other hand, if we exclude the tan(52174) term,
>>>>> we get a(52173) ~= -2.6217
>>>>> while tan(52174) ~= -181570.2957 .
>>>>> Since pi/2 is very close to 52174/33215 ,
>>>>> (33215/52174)*pi/2 is very close to 1.
>>>>> It seems that if x = (33215/52174)*pi/2 , then
>>>>> (tan x)(tan 2x)... (tan 52173x) might be -1 :
>>>>> ? prod(X=1,52173,tan(X*(33215.0/52174.0)*Pi/2))
>>>>> %37 =
>>>>> -1.00000000000000000000000000000000000000000000000000000000000000000000000
[...]

>> PARI-gp gives
>> ? prod(X = 1,411557986, tan(X*(262005952/411557987)*(Pi/2)))
>> %19 = -411557986.99999999999999999999999999999999999999999999999999999\
>> 9999999999999999999999999999999999999999999999999999999999999999999999\
>> 99999999999999999999999999999999999999999999999999999999999999920894 ,
>>
>> close to -411557987 .
>
> How can you ignore the fact that when n = 90, TAN(n) is
> infinity?

That's true when angles are measured in degrees.
But here, as is commonly the case in calculus and
analysis, the angles are measured in radians.
An angle of 180 degrees is the same as an angle
of pi radians. So 90 degrees is pi/2 radians.

Then tan(pi/2) is undefined (probably preferable
to saying it's infinity).

About radians:

http://en.wikipedia.org/wiki/Radian

David Bernier