Previous: , Up: Functions and Variables for trigtools   [Contents][Index]

96.2.7 Contract atan Functions

Function: atan_contract (r)

The function atan_contract(r) contracts atan functions. We assume: \(|r| < {\pi\over 2}.\)

Examples:

(%i1) load(trigtools)$
  1.  
    (%i2) atan_contract(atan(x)+atan(y));
    (%o2)                          atan(y) + atan(x)
    (%i3) assume(abs(atan(x)+atan(y))<%pi/2)$
    (%i4) atan(x)+atan(y)=atan_contract(atan(x)+atan(y));
                                                     y + x
    (%o4)                  atan(y) + atan(x) = atan(-------)
                                                    1 - x y
    
  2.  
    (%i5) atan(1/3)+atan(1/5)+atan(1/7)+atan(1/8)$ %=atan_contract(%);
                           1         1         1         1    %pi
    (%o6)             atan(-) + atan(-) + atan(-) + atan(-) = ---
                           3         5         7         8     4
    
  3. Machin’s formulae
    (%i7) 4*atan(1/5)-atan(1/239)=atan_contract(4*atan(1/5)-atan(1/239));
                                     1          1     %pi
    (%o7)                     4 atan(-) - atan(---) = ---
                                     5         239     4
    
  4. see http://en.wikipedia.org/wiki/Machin-like_formula
    (%i8) 12*atan(1/49)+32*atan(1/57)-5*atan(1/239)+12*atan(1/110443)$
    %=atan_contract(%);
                    1             1             1               1       %pi
    (%o9)   12 atan(--) + 32 atan(--) - 5 atan(---) + 12 atan(------) = ---
                    49            57           239            110443     4
    

Previous: , Up: Functions and Variables for trigtools   [Contents][Index]

JavaScript license information