Wednesday, September 18, 2013

Recursive functions with cyclic sums


RECURSIVE FUNCTIONS WITH CYCLIC SUMS

The recursive equalities shown here make easier working with cyclic sums applied to triangles, specially when a conversion of (a,b,c) to (R,r,s) is required, i.e, when some triangle data must be expressed as function of  R (circumradius), r (inradius) and s (semi-perimeter).
Let’s name

σ(n) = [ a­­ ]
ρ(n) = [ (b c)­­ ]
λ(k, m, n)= [ ak (bm cn + bn cm)­­­ ]   m>=n

where k, n, m are integer numbers and all sums are cyclic, and
Π(n) = (a b c)n = [Π(1)]n

General expression for σ(n):
It is obvious that σ( 0 ) = 3 and σ( 1 ) = 2 s and it is well known that σ(2)=a2 + b2 + c2  = s2 – r2 – 4 R r and   Π(1)=4*R*r*s.
For other side, if n<0 then
σ(n) = [ 1/a­­|n|­ ] = (a b c)n [ (b c)­­|n|­ ] = Π(n) ρ(-n)       [n<0]

 Suppose now that n>=3 and let’s calculate σ(1) σ(n-1), i.e.
σ(1) σ(n-1) = [ a­­ ] [ a­­n­-1 ]  =
σ(n) + a ( bn-1 + cn-1 ) + b ( cn-1 + an-1 ) + c ( an-1 + bn-1 ) =
σ(n) + b c ( bn-2 + cn-2 ) + c a ( cn-2 + an-2 ) + a b ( an-2 + bn-2 ) =
σ(n) + b c (σ(n-2) - an-2 ) + c a (σ(n-2) - bn-2) + a b (σ(n-2) - cn-2) =
σ(n) + σ(n-2) [ b c­­ ] – a b c σ(n-3) =
σ(n) + ρ(1) σ(n-2) – Π(1) σ(n-3)
from which it is possible to deduce σ(n) as:
σ(n) = [ a­­ ] =
Π(n) ρ(-n)                                                                  if n<0
3                                                                                if n=0
2 s                                                                             if n=1
s2 – r2 – 4 R r                                                           if n=2
σ(1) σ(n-1) - ρ(1) σ(n-2) + Π(1) σ(n-3)                    if n>=3

In a similar way it is easy to obtain expressions for ρ(n) ( for n>0 just get it from (an + bn +cn)2  ) and (with a little more effort) for  λ(k, m, n). These are:

ρ(n) = [ (b c)­­ ] =
Π(n) σ(-n)                                         if n<0
3                                                       if n=0
( σ(n)² - σ(2 n) )/2                            if n>0

and:

λ(k, m, n)= [ ak (bm cn + bn cm)­­­ ]  = Π(n) ( σ(m-n) σ(k-n) - σ(k+m-2 n) )    
for m>=n 

Note that σ(n) and ρ(n) call each one the other. It can be checked that this fact does not lead to any infinite loop.
Also note that these functions can be extended to other cyclic sums: you only need their cyclic product and the cyclic sums of the powers 0, 1 and 2 (…and power 0 is always equal to 3). For example, for working with σ(n) = ∑ [cos(A) ]n, ρ(n) = ∑ [cos(B) cos(C) ]n and λ(k,m,n) = ∑ [cosk(A) (…) ] you only need:
σ(1) = (R+r)/R,  σ(2) = (-s2+6R2+4Rr+r2)/(2*R2) and Π(1)= (s2-4R2-4Rr-r2)/(4*R2)
The implementation of these functions in Maple and a small procedure (which determines what function and parameters to use) gave me, in half-one-minute, the 48 combos visible by pressing the next button:
    


NOTE ADDED Sept. 18, 2013-21:35: Barry Wolk kindly informed me that Maple can do this same work just using "Simplify with side relations". I appreciate this tip very much, which I ignored. Thank you, Barry.

No comments:

Post a Comment