TS Definition

# tan(a_1+a_2+a_3+...) expressed in terms of
#tan(a_1), tan(a_2), tan(a_3) ..

# It uses iteratively the addition rule for the trigonometric function tangent:
# tan(a1+a2)=(tan(a1)+tan(a2))/(1-tan(a1)*tan(a2))
# Recall that in Maple args is the sequence of arguments and nargs is the number of arguments
# For example TS()=1, TS(m)=m, TS(m,n)=(m+n)/(1-m*n), etc.

TS:=proc() local t,i:

if   nargs=1   then   RETURN(args[1])   else
t:= TS (seq(args[i],i=2..nargs))  : (args[1]+t)/(1-t*args[1])   :   fi:

end:


Definitions     Theorems