[385280]: htdocs / docs / original / maxima_14.html  Maximize  Restore  History

Download this file

464 lines (389 with data), 10.4 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.52
from maxima.texi on 11 April 2003 -->
<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_42.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="IDX397"></A>
- Arc Cosine
</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>ACOSH</B>
<DD><A NAME="IDX398"></A>
- Hyperbolic Arc Cosine
</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>ACOT</B>
<DD><A NAME="IDX399"></A>
- Arc Cotangent
</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>ACOTH</B>
<DD><A NAME="IDX400"></A>
- Hyperbolic Arc Cotangent
</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>ACSC</B>
<DD><A NAME="IDX401"></A>
- Arc Cosecant
</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>ACSCH</B>
<DD><A NAME="IDX402"></A>
- Hyperbolic Arc Cosecant
</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>ASEC</B>
<DD><A NAME="IDX403"></A>
- Arc Secant
</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>ASECH</B>
<DD><A NAME="IDX404"></A>
- Hyperbolic Arc Secant
</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>ASIN</B>
<DD><A NAME="IDX405"></A>
- Arc Sine
</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>ASINH</B>
<DD><A NAME="IDX406"></A>
- Hyperbolic Arc Sine
</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>ATAN</B>
<DD><A NAME="IDX407"></A>
- Arc Tangent
</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>ATAN2</B> <I>(Y,X)</I>
<DD><A NAME="IDX408"></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="IDX409"></A>
- Hyperbolic Arc Tangent
</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>ATRIG1</B>
<DD><A NAME="IDX410"></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="IDX411"></A>
- Cosine
</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>COSH</B>
<DD><A NAME="IDX412"></A>
- Hyperbolic Cosine
</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>COT</B>
<DD><A NAME="IDX413"></A>
- Cotangent
</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>COTH</B>
<DD><A NAME="IDX414"></A>
- Hyperbolic Cotangent
</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>CSC</B>
<DD><A NAME="IDX415"></A>
- Cosecant
</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>CSCH</B>
<DD><A NAME="IDX416"></A>
- Hyperbolic Cosecant
</P>
</DL>
<P>
<DL>
<DT><U>Variable:</U> <B>HALFANGLES</B>
<DD><A NAME="IDX417"></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="IDX418"></A>
- Secant
</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>SECH</B>
<DD><A NAME="IDX419"></A>
- Hyperbolic Secant
</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>SIN</B>
<DD><A NAME="IDX420"></A>
- Sine
</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>SINH</B>
<DD><A NAME="IDX421"></A>
- Hyperbolic Sine
</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>TAN</B>
<DD><A NAME="IDX422"></A>
- Tangent
</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>TANH</B>
<DD><A NAME="IDX423"></A>
- Hyperbolic Tangent
</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>TRIGEXPAND</B> <I>(exp)</I>
<DD><A NAME="IDX424"></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="IDX425"></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="IDX426"></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="IDX427"></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="IDX428"></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="IDX429"></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="IDX430"></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="IDX431"></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_42.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>.
</BODY>
</HTML>

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks