 Introduction to Trigonometric
 Introduction to Trigonometric
  Trigonometric
 Trigonometric
 
(C1) X+SIN(3*X)/SIN(X),TRIGEXPAND=TRUE,EXPAND;
                              2           2
(D1)                     - SIN (X) + 3 COS (X) + X
(C2) TRIGEXPAND(SIN(10*X+Y));
(D2)               COS(10 X) SIN(Y) + SIN(10 X) COS(Y)
(C4) TRIGREDUCE(-SIN(X)^2+3*COS(X)^2+X); (D4) 2 COS(2 X) + X + 1 The trigonometric simplification routines will use declared information in some simple cases. Declarations about variables are used as follows, e.g. (C5) DECLARE(J, INTEGER, E, EVEN, O, ODD)$ (C6) SIN(X + (E + 1/2)*%PI)$ (D6) COS(X) (C7) SIN(X + (O + 1/2) %PI); (D7) - COS(X)
(c1) trigrat(sin(3*a)/sin(a+%pi/3)); (d1) sqrt(3) sin(2 a) + cos(2 a) - 1
Here is another example (for which the function was intended); see [Davenport, Siret, Tournier, Calcul Formel, Masson (or in english, Addison-Wesley), section 1.5.5, Morley theorem). Timings are on VAX 780.
(c4)   c:%pi/3-a-b;
					   %pi
(d4) 				 - b - a + ---
					    3
(c5)   bc:sin(a)*sin(3*c)/sin(a+b);
			     sin(a) sin(3 b + 3 a)
(d5) 			     ---------------------
				  sin(b + a)
(c6)   ba:bc,c=a,a=c$
(c7)   ac2:ba^2+bc^2-2*bc*ba*cos(b);
	2       2
     sin (a) sin (3 b + 3 a)
(d7) -----------------------
	      2
	   sin (b + a)
					%pi
   2 sin(a) sin(3 a) cos(b) sin(b + a - ---) sin(3 b + 3 a)
					 3
 - --------------------------------------------------------
			   %pi
		   sin(a - ---) sin(b + a)
			    3
      2	        2	  %pi
   sin (3 a) sin (b + a - ---)
			   3
 + ---------------------------
	     2	   %pi
	  sin (a - ---)
		    3
(c9)   trigrat(ac2);
Totaltime= 65866 msec.  GCtime= 7716 msec.
(d9)
- (sqrt(3) sin(4 b + 4 a) - cos(4 b + 4 a)
- 2 sqrt(3) sin(4 b + 2 a)
+ 2 cos(4 b + 2 a) - 2 sqrt(3) sin(2 b + 4 a) + 2 cos(2 b + 4 a)
+ 4 sqrt(3) sin(2 b + 2 a) - 8 cos(2 b + 2 a) - 4 cos(2 b - 2 a)
+ sqrt(3) sin(4 b) - cos(4 b) - 2 sqrt(3) sin(2 b) + 10 cos(2 b)
+ sqrt(3) sin(4 a) - cos(4 a) - 2 sqrt(3) sin(2 a) + 10 cos(2 a)
   - 9)/4
 Introduction to Trigonometric
 Introduction to Trigonometric
  Trigonometric
 Trigonometric
