Addition theorem for arctangent
- Subject: Addition theorem for arctangent
- From: Aleksas Domarkas
- Date: Tue, 18 Jun 2013 14:23:31 +0300
see Wilhelm Haager question:
http://www.math.utexas.edu/pipermail/maxima/2013/033295.html
(%i1) atan_contract(r):=block([],
tan(r),
trigexpand(%%),
trigexpand(%%),
atan(%%)
)$
Examples
1.
(%i2) atan(x)+atan(y)$
%=atan_contract(%);
(%o3) atan(y)+atan(x)=atan((y+x)/(1-x*y))
2.
(%i4) atan(1/2)+atan(1/3)$
%=atan_contract(%);
(%o5) atan(1/2)+atan(1/3)=%pi/4
(%i6) float(%), numer;
(%o6) 0.78539816339745=0.78539816339745
3.
(%i7) atan(1/3)+atan(1/5)+atan(1/7)+atan(1/8)$
%=atan_contract(%);
(%o8) atan(1/3)+atan(1/5)+atan(1/7)+atan(1/8)=%pi/4
(%i9) float(%), numer;
(%o9) 0.78539816339745=0.78539816339745
4. Machin's formulae
(%i10) 4*atan(1/5)-atan(1/239)$
%=atan_contract(%);
(%o11) 4*atan(1/5)-atan(1/239)=%pi/4
(%i12) float(%), numer;
(%o12) 0.78539816339745=0.78539816339745
5. see http://en.wikipedia.org/wiki/Machin-like_formula
(%i13) 12*atan(1/49)+32*atan(1/57)-5*atan(1/239)+12*atan(1/110443)$
%=atan_contract(%);
(%o14) 12*atan(1/49)+32*atan(1/57)-5*atan(1/239)+12*atan(1/110443)=%pi/4
best
Aleksas D