Sophie

Sophie

distrib > Mandriva > 9.0 > i586 > by-pkgid > 8d125f3514d54b70bf040165a2f5d2e4 > files > 316

maxima-5.6-1mdk.i586.rpm

<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.52
     from maxima.texi on 25 April 2001 -->

<TITLE>Maxima Manual - Trigonometric</TITLE>
<link href="maxima_15.html" rel=Next>
<link href="maxima_13.html" rel=Previous>
<link href="maxima_toc.html" rel=ToC>

</HEAD>
<BODY>
<p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_13.html">previous</A>, <A HREF="maxima_15.html">next</A>, <A HREF="maxima_41.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>.
<P><HR><P>


<H1><A NAME="SEC45" HREF="maxima_toc.html#TOC45">Trigonometric</A></H1>



<H2><A NAME="SEC46" HREF="maxima_toc.html#TOC46">Introduction to Trigonometric</A></H2>
<P>
 - MACSYMA has many Trig functions defined.  Not all Trig
identities are programmed, but it is possible for the user to add many
of them using the pattern matching capabilities of the system.  The
Trig functions defined in MACSYMA are: ACOS, ACOSH, ACOT, ACOTH, ACSC,
ACSCH, ASEC, ASECH, ASIN, ASINH, ATAN, ATANH, COS, COSH, COT, COTH,
CSC, CSCH, SEC, SECH, SIN, SINH, TAN, and TANH.  There are a number of
commands especially for handling Trig functions, see TRIGEXPAND,
TRIGREDUCE, and the switch TRIGSIGN.  Two SHARE packages extend the
simplification rules built into MACSYMA, NTRIG and ATRIG1.  Do
DESCRIBE(cmd) for details.

</P>


<H2><A NAME="SEC47" HREF="maxima_toc.html#TOC47">Definitions for Trigonometric</A></H2>

<P>
<DL>
<DT><U>Function:</U> <B>ACOS</B>
<DD><A NAME="IDX384"></A>
 - Arc Cosine

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>ACOSH</B>
<DD><A NAME="IDX385"></A>
 - Hyperbolic Arc Cosine

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>ACOT</B>
<DD><A NAME="IDX386"></A>
 - Arc Cotangent

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>ACOTH</B>
<DD><A NAME="IDX387"></A>
 - Hyperbolic Arc Cotangent

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>ACSC</B>
<DD><A NAME="IDX388"></A>
 - Arc Cosecant

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>ACSCH</B>
<DD><A NAME="IDX389"></A>
 - Hyperbolic Arc Cosecant

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>ASEC</B>
<DD><A NAME="IDX390"></A>
 - Arc Secant

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>ASECH</B>
<DD><A NAME="IDX391"></A>
 - Hyperbolic Arc Secant

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>ASIN</B>
<DD><A NAME="IDX392"></A>
 - Arc Sine

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>ASINH</B>
<DD><A NAME="IDX393"></A>
 - Hyperbolic Arc Sine

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>ATAN</B>
<DD><A NAME="IDX394"></A>
 - Arc Tangent

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>ATAN2</B> <I>(Y,X)</I>
<DD><A NAME="IDX395"></A>
yields the value of ATAN(Y/X) in the interval -%PI to
%PI.

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>ATANH</B>
<DD><A NAME="IDX396"></A>
 - Hyperbolic Arc Tangent

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>ATRIG1</B>
<DD><A NAME="IDX397"></A>
 - SHARE1;ATRIG1 FASL contains several additional
simplification rules for inverse trig functions.  Together with rules
already known to Macsyma, the following angles are fully implemented:
0, %PI/6, %PI/4, %PI/3, and %PI/2.  Corresponding angles in the other
three quadrants are also available.  Do LOAD(ATRIG1); to use them.

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>COS</B>
<DD><A NAME="IDX398"></A>
 - Cosine

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>COSH</B>
<DD><A NAME="IDX399"></A>
 - Hyperbolic Cosine

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>COT</B>
<DD><A NAME="IDX400"></A>
 - Cotangent

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>COTH</B>
<DD><A NAME="IDX401"></A>
 - Hyperbolic Cotangent

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>CSC</B>
<DD><A NAME="IDX402"></A>
 - Cosecant

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>CSCH</B>
<DD><A NAME="IDX403"></A>
 - Hyperbolic Cosecant

</P>
</DL>
<P>
<DL>
<DT><U>Variable:</U> <B>HALFANGLES</B>
<DD><A NAME="IDX404"></A>
 default: [FALSE] - if TRUE causes half-angles to be
simplified away.

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>SEC</B>
<DD><A NAME="IDX405"></A>
 - Secant

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>SECH</B>
<DD><A NAME="IDX406"></A>
 - Hyperbolic Secant

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>SIN</B>
<DD><A NAME="IDX407"></A>
 - Sine

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>SINH</B>
<DD><A NAME="IDX408"></A>
 - Hyperbolic Sine

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>TAN</B>
<DD><A NAME="IDX409"></A>
 - Tangent

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>TANH</B>
<DD><A NAME="IDX410"></A>
 - Hyperbolic Tangent

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>TRIGEXPAND</B> <I>(exp)</I>
<DD><A NAME="IDX411"></A>
expands trigonometric and hyperbolic functions of
sums of angles and of multiple angles occurring in exp.  For best
results, exp should be expanded.  To enhance user control of
simplification, this function expands only one level at a time,
expanding sums of angles or multiple angles.  To obtain full expansion
into sines and cosines immediately, set the switch TRIGEXPAND:TRUE.
TRIGEXPAND default: [FALSE] - if TRUE causes expansion of all
expressions containing SINs and COSs occurring subsequently.
HALFANGLES[FALSE] - if TRUE causes half-angles to be simplified away.
TRIGEXPANDPLUS[TRUE] - controls the "sum" rule for TRIGEXPAND,
expansion of sums (e.g. SIN(X+Y)) will take place only if
TRIGEXPANDPLUS is TRUE.
TRIGEXPANDTIMES[TRUE] - controls the "product" rule for TRIGEXPAND,
expansion of products (e.g. SIN(2*X)) will take place only if
TRIGEXPANDTIMES is TRUE.

<PRE>
(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)

</PRE>

</DL>
<P>
<DL>
<DT><U>Variable:</U> <B>TRIGEXPANDPLUS</B>
<DD><A NAME="IDX412"></A>
 default: [TRUE] - controls the "sum" rule for
TRIGEXPAND.  Thus, when the TRIGEXPAND command is used or the
TRIGEXPAND switch set to TRUE, expansion of sums (e.g. SIN(X+Y)) will
take place only if TRIGEXPANDPLUS is TRUE.

</P>
</DL>
<P>
<DL>
<DT><U>Variable:</U> <B>TRIGEXPANDTIMES</B>
<DD><A NAME="IDX413"></A>
 default: [TRUE] - controls the "product" rule for
TRIGEXPAND.  Thus, when the TRIGEXPAND command is used or the
TRIGEXPAND switch set to TRUE, expansion of products (e.g. SIN(2*X))
will take place only if TRIGEXPANDTIMES is TRUE.

</P>
</DL>
<P>
<DL>
<DT><U>Variable:</U> <B>TRIGINVERSES</B>
<DD><A NAME="IDX414"></A>
 default: [ALL] - controls the simplification of the
composition of trig and hyperbolic functions with their inverse
functions: If ALL, both e.g. ATAN(TAN(X)) and TAN(ATAN(X)) simplify to
X.  If TRUE, the arcfunction(function(x)) simplification is turned
off.  If FALSE, both the arcfun(fun(x)) and fun(arcfun(x))
simplifications are turned off.

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>TRIGREDUCE</B> <I>(exp, var)</I>
<DD><A NAME="IDX415"></A>
combines products and powers of trigonometric
and hyperbolic SINs and COSs of var into those of multiples of var.
It also tries to eliminate these functions when they occur in
denominators.  If var is omitted then all variables in exp are used.
Also see the POISSIMP function (6.6).

<PRE>
(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)

</PRE>

</DL>
<P>
<DL>
<DT><U>Variable:</U> <B>TRIGSIGN</B>
<DD><A NAME="IDX416"></A>
 default: [TRUE] - if TRUE permits simplification of negative
arguments to trigonometric functions. E.g., SIN(-X) will become
-SIN(X) only if TRIGSIGN is TRUE.

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>TRIGSIMP</B> <I>(expr)</I>
<DD><A NAME="IDX417"></A>
employs the identities sin(x)^2 + cos(x)^2 = 1 and
cosh(x)^2 - sinh(x)^2 = 1 to simplify expressions containing tan, sec,
etc. to sin, cos, sinh, cosh so that further simplification may be
obtained by using TRIGREDUCE on the result.  Some examples may be seen
by doing DEMO("trgsmp.dem"); .  See also the TRIGSUM function.

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>TRIGRAT</B> <I>(trigexp)</I>
<DD><A NAME="IDX418"></A>
gives a canonical simplifyed quasilinear form of a
trigonometrical expression; trigexp is a rational fraction of several sin,
cos or tan, the arguments of them are linear forms in some variables (or
kernels) and %pi/n (n integer) with integer coefficients. The result is a
simplifyed fraction with numerator and denominator linear in sin and cos.
Thus TRIGRAT linearize always when it is possible.(written by D. Lazard).

</P>

<PRE>
(c1) trigrat(sin(3*a)/sin(a+%pi/3));

(d1) 		        sqrt(3) sin(2 a) + cos(2 a) - 1
</PRE>

<P>
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.

</P>

<PRE>
(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

</PRE>

</DL>

<P><HR><P>
<p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_13.html">previous</A>, <A HREF="maxima_15.html">next</A>, <A HREF="maxima_41.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>.
</BODY>
</HTML>