elemfn.tex 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799
  1. \section{Elementary Functions}
  2. \begin{Operator}{ACOS}
  3. \index{arccosine}
  4. The \name{acos} operator returns the arccosine of its argument.
  5. \begin{Syntax}
  6. \name{acos}\(\meta{expression}\) or \name{acos} \meta{simple\_expression}
  7. \end{Syntax}
  8. \meta{expression} may be any scalar REDUCE expression, not an array, matrix or
  9. vector expression. \meta{simple\_expression} must be a single identifier or
  10. begin with a prefix operator name.
  11. \begin{Examples}
  12. acos(ab); & ACOS(AB) \\
  13. acos 15; & ACOS(15) \\
  14. df(acos(x*y),x); & \rfrac{SQRT( - X^{2}*Y^{2} + 1)*Y}{X^{2}*Y^{2} - 1} \\
  15. on rounded; \\
  16. res := acos(sqrt(2)/2); & RES := 0.785398163397 \\
  17. res-pi/4; & 0
  18. \end{Examples}
  19. \begin{Comments}
  20. An explicit numeric value is not given unless the switch \nameref{rounded} is
  21. on and the argument has an absolute numeric value less than or equal to 1.
  22. \end{Comments}
  23. \end{Operator}
  24. \begin{Operator}{ACOSH}
  25. \index{hyperbolic arccosine}
  26. \name{acosh} represents the hyperbolic arccosine of its argument. It takes
  27. an arbitrary scalar expression as its argument. The derivative of
  28. \name{acosh} is known to the system. Numerical values may also be found by
  29. turning on the switch \nameref{rounded}.
  30. \begin{Syntax}
  31. \name{acosh}\(\meta{expression}\) or \name{acosh} \meta{simple\_expression}
  32. \end{Syntax}
  33. \meta{expression} may be any scalar REDUCE expression, not an array, matrix or
  34. vector expression. \meta{simple\_expression} must be a single identifier or
  35. begin with a prefix operator name.
  36. \begin{Examples}
  37. acosh a; & ACOSH(A) \\
  38. acosh(0); & ACOSH(0) \\
  39. df(acosh(a**2),a); & \rfrac{2*SQRT(A^{4} - 1)*A}{A^{4} - 1} \\
  40. int(acosh(x),x); & INT(ACOSH(X),X)
  41. \end{Examples}
  42. \begin{Comments}
  43. You may attach functionality by defining \name{acosh} to be the inverse of
  44. \name{cosh}. This is done by the commands
  45. \begin{verbatim}
  46. put('cosh,'inverse,'acosh);
  47. put('acosh,'inverse,'cosh);
  48. \end{verbatim}
  49. You can write a procedure to attach integrals or other
  50. functions to \name{acosh}. You may wish to add a check to see that its
  51. argument is properly restricted.
  52. \end{Comments}
  53. \end{Operator}
  54. \begin{Operator}{ACOT}
  55. \index{arccotangent}
  56. \name{acot} represents the arccotangent of its argument. It takes
  57. an arbitrary scalar expression as its argument. The derivative of
  58. \name{acot} is known to the system. Numerical values may also be found by
  59. turning on the switch \nameref{rounded}.
  60. \begin{Syntax}
  61. \name{acot}\(\meta{expression}\) or \name{acot} \meta{simple\_expression}
  62. \end{Syntax}
  63. \meta{expression} may be any scalar REDUCE expression, not an array, matrix or
  64. vector expression. \meta{simple\_expression} must be a single identifier or
  65. begin with a prefix operator name.
  66. You can add functionality yourself with \name{let} and procedures.
  67. \end{Operator}
  68. \begin{Operator}{ACOTH}
  69. \index{hyperbolic cotangent}
  70. \name{acoth} represents the inverse hyperbolic cotangent of its argument.
  71. It takes an arbitrary scalar expression as its argument. The derivative
  72. of \name{acoth} is known to the system. Numerical values may also be found
  73. by turning on the switch \nameref{rounded}.
  74. \begin{Syntax}
  75. \name{acoth}\(\meta{expression}\) or \name{acoth} \meta{simple\_expression}
  76. \end{Syntax}
  77. \meta{expression} may be any scalar REDUCE expression, not an array,
  78. matrix or vector expression. \meta{simple\_expression} must be a single
  79. identifier or begin with a prefix operator name. You can add
  80. functionality yourself with \name{let} and procedures.
  81. \end{Operator}
  82. \begin{Operator}{ACSC}
  83. \index{arccosecant}
  84. The \name{acsc} operator returns the arccosecant of its argument.
  85. \begin{Syntax}
  86. \name{acsc}\(\meta{expression}\) or \name{acsc} \meta{simple\_expression}
  87. \end{Syntax}
  88. \meta{expression} may be any scalar REDUCE expression, not an array, matrix or
  89. vector expression. \meta{simple\_expression} must be a single identifier or
  90. begin with a prefix operator name.
  91. \begin{Examples}
  92. acsc(ab); & ACSC(AB) \\
  93. acsc 15; & ACSC(15) \\
  94. df(acsc(x*y),x); & \rfrac{-SQRT(X^{2}*Y^{2} - 1)}{X*(X^{2}*Y^{2} - 1)} \\
  95. on rounded; \\
  96. res := acsc(2/sqrt(3)); & RES := 1.0471975512 \\
  97. res-pi/3; & 0
  98. \end{Examples}
  99. \begin{Comments}
  100. An explicit numeric value is not given unless the switch \name{rounded} is
  101. on and the argument has an absolute numeric value less than or equal to 1.
  102. \end{Comments}
  103. \end{Operator}
  104. \begin{Operator}{ACSCH}
  105. \index{arccosecant}
  106. The \name{acsch} operator returns the hyperbolic arccosecant of its argument.
  107. \begin{Syntax}
  108. \name{acsch}\(\meta{expression}\) or \name{acsch} \meta{simple\_expression}
  109. \end{Syntax}
  110. \meta{expression} may be any scalar REDUCE expression, not an array, matrix or
  111. vector expression. \meta{simple\_expression} must be a single identifier or
  112. begin with a prefix operator name.
  113. \begin{Examples}
  114. acsch(ab); & ACSCH(AB) \\
  115. acsch 15; & ACSCH(15) \\
  116. df(acsch(x*y),x); & \rfrac{-SQRT(X^{2}*Y^{2} + 1)}{X*(X^{2}*Y^{2} + 1)} \\
  117. on rounded; \\
  118. res := acsch(3); & RES := 0.327450150237
  119. \end{Examples}
  120. \begin{Comments}
  121. An explicit numeric value is not given unless the switch \name{rounded} is
  122. on and the argument has an absolute numeric value less than or equal to 1.
  123. \end{Comments}
  124. \end{Operator}
  125. \begin{Operator}{ASEC}
  126. \index{arccosecant}
  127. The \name{asec} operator returns the arccosecant of its argument.
  128. \begin{Syntax}
  129. \name{asec}\(\meta{expression}\) or \name{asec} \meta{simple\_expression}
  130. \end{Syntax}
  131. \meta{expression} may be any scalar REDUCE expression, not an array, matrix or
  132. vector expression. \meta{simple\_expression} must be a single identifier or
  133. begin with a prefix operator name.
  134. \begin{Examples}
  135. asec(ab); & ASEC(AB) \\
  136. asec 15; & ASEC(15) \\
  137. df(asec(x*y),x); & \rfrac{SQRT(X^{2}*Y^{2} - 1)}{X*(X^{2}*Y^{2} - 1)} \\
  138. on rounded; \\
  139. res := asec sqrt(2); & RES := 0.785398163397 \\
  140. res-pi/4; & 0
  141. \end{Examples}
  142. \begin{Comments}
  143. An explicit numeric value is not given unless the switch \name{rounded} is
  144. on and the argument has an absolute numeric value greater or equal to 1.
  145. \end{Comments}
  146. \end{Operator}
  147. \begin{Operator}{ASECH}
  148. \index{hyperbolic arccosecant}
  149. \name{asech} represents the hyperbolic arccosecant of its argument. It takes
  150. an arbitrary scalar expression as its argument. The derivative of
  151. \name{asech} is known to the system. Numerical values may also be found by
  152. turning on the switch \nameref{rounded}.
  153. \begin{Syntax}
  154. \name{asech}\(\meta{expression}\) or \name{asech} \meta{simple\_expression}
  155. \end{Syntax}
  156. \meta{expression} may be any scalar REDUCE expression, not an array, matrix or
  157. vector expression. \meta{simple\_expression} must be a single identifier or
  158. begin with a prefix operator name.
  159. \begin{Examples}
  160. asech a; & ASECH(A) \\
  161. asech(1); & 0 \\
  162. df(acosh(a**2),a); & \rfrac{2*SQRT(- A^{4} + 1)}{A*(A^{4} - 1)} \\
  163. int(asech(x),x); & INT(ASECH(X),X)
  164. \end{Examples}
  165. \begin{Comments}
  166. You may attach functionality by defining \name{asech} to be the inverse of
  167. \name{sech}. This is done by the commands
  168. \begin{verbatim}
  169. put('sech,'inverse,'asech);
  170. put('asech,'inverse,'sech);
  171. \end{verbatim}
  172. You can write a procedure to attach integrals or other
  173. functions to \name{asech}. You may wish to add a check to see that its
  174. argument is properly restricted.
  175. \end{Comments}
  176. \end{Operator}
  177. \begin{Operator}{ASIN}
  178. \index{arcsine}
  179. The \name{asin} operator returns the arcsine of its argument.
  180. \begin{Syntax}
  181. \name{asin}\(\meta{expression}\) or \name{asin} \meta{simple\_expression}
  182. \end{Syntax}
  183. \meta{expression} may be any scalar REDUCE expression, not an array, matrix or
  184. vector expression. \meta{simple\_expression} must be a single identifier or
  185. begin with a prefix operator name.
  186. \begin{Examples}
  187. asin(givenangle); & ASIN(GIVENANGLE) \\
  188. asin(5); & ASIN(5) \\
  189. df(asin(2*x),x); & - \rfrac{2*SQRT( - 4*X^{2} + 1))}{4*X^{2} - 1} \\
  190. on rounded; \\
  191. asin .5; & 0.523598775598 \\
  192. asin(sqrt(3)); & ASIN(1.73205080757) \\
  193. asin(sqrt(3)/2); & 1.04719755120 \\
  194. \end{Examples}
  195. \begin{Comments}
  196. A numeric value is not returned by \name{asin} unless the switch
  197. \name{rounded} is on and its argument has an absolute value less than or
  198. equal to 1.
  199. \end{Comments}
  200. \end{Operator}
  201. \begin{Operator}{ASINH}
  202. \index{hyperbolic arcsine}
  203. The \name{asinh} operator returns the hyperbolic arcsine of its argument.
  204. The derivative of \name{asinh} and some simple transformations are known
  205. to the system.
  206. \begin{Syntax}
  207. \name{asinh}\(\meta{expression}\) or \name{asinh} \meta{simple\_expression}
  208. \end{Syntax}
  209. \meta{expression} may be any scalar REDUCE expression, not an array, matrix or
  210. vector expression. \meta{simple\_expression} must be a single identifier or
  211. begin with a prefix operator name.
  212. \begin{Examples}
  213. asinh d; & ASINH(D) \\
  214. asinh(1); & ASINH(1) \\
  215. df(asinh(2*x),x); & \rfrac{2*SQRT(4*X^{2} + 1))}{4*X^{2} + 1} \\
  216. \end{Examples}
  217. \begin{Comments}
  218. You may attach further functionality by defining \name{asinh} to be the
  219. inverse of \name{sinh}. This is done by the commands
  220. \begin{verbatim}
  221. put('sinh,'inverse,'asinh);
  222. put('asinh,'inverse,'sinh);
  223. \end{verbatim}
  224. A numeric value is not returned by \name{asinh} unless the switch
  225. \name{rounded} is on and its argument evaluates to a number.
  226. \end{Comments}
  227. \end{Operator}
  228. \begin{Operator}{ATAN}
  229. \index{arctangent}
  230. The \name{atan} operator returns the arctangent of its argument.
  231. \begin{Syntax}
  232. \name{atan}\(\meta{expression}\) or \name{atan} \meta{simple\_expression}
  233. \end{Syntax}
  234. \meta{expression} may be any scalar REDUCE expression, not an array, matrix or
  235. vector expression. \meta{simple\_expression} must be a single identifier or
  236. begin with a prefix operator name.
  237. \begin{Examples}
  238. atan(middle); & ATAN(MIDDLE) \\
  239. on rounded; \\
  240. atan 45; & 1.54857776147 \\
  241. off rounded; \\
  242. int(atan(x),x); & \rfrac{2*ATAN(X)*X - LOG(X^{2} + 1)}{2} \\
  243. df(atan(y**2),y); & \rfrac{2*Y}{Y^{4} + 1}
  244. \end{Examples}
  245. \begin{Comments}
  246. A numeric value is not returned by \name{atan} unless the switch
  247. \nameref{rounded} is on and its argument evaluates to a number.
  248. \end{Comments}
  249. \end{Operator}
  250. \begin{Operator}{ATANH}
  251. \index{hyperbolic arctangent}
  252. The \name{atanh} operator returns the hyperbolic arctangent of its argument.
  253. The derivative of \name{asinh} and some simple transformations are known
  254. to the system.
  255. \begin{Syntax}
  256. \name{atanh}\(\meta{expression}\) or \name{atanh} \meta{simple\_expression}
  257. \end{Syntax}
  258. \meta{expression} may be any scalar REDUCE expression, not an array, matrix or
  259. vector expression. \meta{simple\_expression} must be a single identifier or
  260. begin with a prefix operator name.
  261. \begin{Examples}
  262. atanh aa; & ATANH(AA) \\
  263. atanh(1); & ATANH(1) \\
  264. df(atanh(x*y),y); & \rfrac{- X}{X^{2}*Y^{2} - 1}
  265. \end{Examples}
  266. \begin{Comments}
  267. A numeric value is not returned by \name{asinh} unless the switch
  268. \name{rounded} is on and its argument evaluates to a number.
  269. You may attach additional functionality by defining \name{atanh} to be the
  270. inverse of \name{tanh}. This is done by the commands
  271. \begin{verbatim}
  272. put('tanh,'inverse,'atanh);
  273. put('atanh,'inverse,'tanh);
  274. \end{verbatim}
  275. \end{Comments}
  276. \end{Operator}
  277. \begin{Operator}{ATAN2}
  278. \begin{Syntax}
  279. \name{atan2}\(\meta{expression},\meta{expression}\)
  280. \end{Syntax}
  281. \meta{expression} is any valid scalar REDUCE expression. In
  282. \nameref{rounded} mode, if a numerical value exists, \name{atan2} returns
  283. the principal value of the arc tangent of the second argument divided by
  284. the first in the range [-pi,+pi] radians, using the signs of both
  285. arguments to determine the quadrant of the return value. An expression in
  286. terms of \name{atan2} is returned in other cases.
  287. \begin{Examples}
  288. atan2(3,2); & ATAN2(3,2); \\
  289. on rounded; \\
  290. atan2(3,2); & 0.982793723247 \\
  291. atan2(a,b); & ATAN2(A,B); \\
  292. atan2(1,0); & 1.57079632679
  293. \end{Examples}
  294. \begin{Comments}
  295. \name{atan2} returns a numeric value only if \nameref{rounded} is on. Then
  296. \name{atan2} is calculated to the current degree of floating point precision.
  297. \end{Comments}
  298. \end{Operator}
  299. \begin{Operator}{COS}
  300. The \name{cos} operator returns the cosine of its argument.
  301. \begin{Syntax}
  302. \name{cos}\(\meta{expression}\) or \name{cos} \meta{simple\_expression}
  303. \end{Syntax}
  304. \meta{expression} is any valid scalar REDUCE expression,
  305. \meta{simple\_expression} is a single identifier or begins with a prefix
  306. operator name.
  307. \begin{Examples}
  308. cos abc; & COS(ABC) \\
  309. cos(pi); & -1 \\
  310. cos 4; & COS(4) \\
  311. on rounded; \\
  312. cos(4); & - 0.653643620864 \\
  313. cos log 5; & - 0.0386319699339
  314. \end{Examples}
  315. \begin{Comments}
  316. \name{cos} returns a numeric value only if \nameref{rounded} is on. Then the
  317. cosine is calculated to the current degree of floating point precision.
  318. \end{Comments}
  319. \end{Operator}
  320. \begin{Operator}{COSH}
  321. \index{hyperbolic cosine}
  322. The \name{cosh} operator returns the hyperbolic cosine of its argument.
  323. The derivative of \name{cosh} and some simple transformations are known
  324. to the system.
  325. \begin{Syntax}
  326. \name{cosh}\(\meta{expression}\) or \name{cosh} \meta{simple\_expression}
  327. \end{Syntax}
  328. \meta{expression} may be any scalar REDUCE expression, not an array, matrix or
  329. vector expression. \meta{simple\_expression} must be a single identifier or
  330. begin with a prefix operator name.
  331. \begin{Examples}
  332. cosh b; & COSH(B) \\
  333. cosh(0); & 1 \\
  334. df(cosh(x*y),x); & SINH(X*Y)*Y \\
  335. int(cosh(x),x); & SINH(X)
  336. \end{Examples}
  337. \begin{Comments}
  338. You may attach further functionality by defining its inverse (see
  339. \nameref{acosh}).
  340. A numeric value is not returned by \name{cosh} unless the switch
  341. \nameref{rounded} is on and its argument evaluates to a number.
  342. \end{Comments}
  343. \end{Operator}
  344. \begin{Operator}{COT}
  345. \name{cot} represents the cotangent of its argument. It takes an arbitrary
  346. scalar expression as its argument. The derivative of \name{acot} and some
  347. simple properties are known to the system.
  348. \begin{Syntax}
  349. \name{cot}\(\meta{expression}\) or \name{cot} \meta{simple\_expression}
  350. \end{Syntax}
  351. \meta{expression} may be any scalar REDUCE expression. \meta{simple\_expression}
  352. must be a single identifier or begin with a prefix operator name.
  353. \begin{Examples}
  354. cot(a)*tan(a); & COT(A)*TAN(A)) \\
  355. cot(1); & COT(1) \\
  356. df(cot(2*x),x); & - 2*(COT(2*X)^{2} + 1)
  357. \end{Examples}
  358. \begin{Comments}
  359. Numerical values of expressions involving \name{cot} may be found by
  360. turning on the switch \nameref{rounded}.
  361. \end{Comments}
  362. \end{Operator}
  363. \begin{Operator}{COTH}
  364. \index{hyperbolic cotangent}
  365. The \name{coth} operator returns the hyperbolic cotangent of its argument.
  366. The derivative of \name{coth} and some simple transformations are known
  367. to the system.
  368. \begin{Syntax}
  369. \name{coth}\(\meta{expression}\) or \name{coth} \meta{simple\_expression}
  370. \end{Syntax}
  371. \meta{expression} may be any scalar REDUCE expression. \meta{simple\_expression}
  372. must be a single identifier or begin with a prefix operator name.
  373. \begin{Examples}
  374. df(coth(x*y),x); & - Y*(COTH(X*Y)^{2} - 1) \\
  375. coth acoth z; & Z
  376. \end{Examples}
  377. \begin{Comments}
  378. You can write \nameref{let} statements and procedures to add further
  379. functionality to \name{coth} if you wish. Numerical values of expressions
  380. involving \name{coth} may also be found by turning on the switch
  381. \nameref{rounded}.
  382. \end{Comments}
  383. \end{Operator}
  384. \begin{Operator}{CSC}
  385. \index{cosecant}
  386. The \name{csc} operator returns the cosecant of its argument.
  387. The derivative of \name{csc} and some simple transformations are known
  388. to the system.
  389. \begin{Syntax}
  390. \name{csc}\(\meta{expression}\) or \name{csc} \meta{simple\_expression}
  391. \end{Syntax}
  392. \meta{expression} may be any scalar REDUCE expression. \meta{simple\_expression}
  393. must be a single identifier or begin with a prefix operator name.
  394. \begin{Examples}
  395. csc(q)*sin(q); & CSC(Q)*SIN(Q) \\
  396. df(csc(x*y),x); & -COT(X*Y)*CSC(X*Y)*Y
  397. \end{Examples}
  398. \begin{Comments}
  399. You can write \nameref{let} statements and procedures to add further
  400. functionality to \name{csc} if you wish. Numerical values of expressions
  401. involving \name{csc} may also be found by turning on the switch
  402. \nameref{rounded}.
  403. \end{Comments}
  404. \end{Operator}
  405. \begin{Operator}{CSCH}
  406. \index{hyperbolic cosecan}
  407. The \name{cosh} operator returns the hyperbolic cosecant of its argument.
  408. The derivative of \name{csch} and some simple transformations are known
  409. to the system.
  410. \begin{Syntax}
  411. \name{csch}\(\meta{expression}\) or \name{csch} \meta{simple\_expression}
  412. \end{Syntax}
  413. \meta{expression} may be any scalar REDUCE expression, not an array, matrix or
  414. vector expression. \meta{simple\_expression} must be a single identifier or
  415. begin with a prefix operator name.
  416. \begin{Examples}
  417. csch b; & CSCH(B) \\
  418. csch(0); & 0 \\
  419. df(csch(x*y),x); & - COTH(X*Y)*CSCH(X*Y)*Y \\
  420. int(csch(x),x); & INT(CSCH(X),X)
  421. \end{Examples}
  422. \begin{Comments}
  423. % You may attach further functionality by defining its inverse (see
  424. % \nameref{acsch}).
  425. A numeric value is not returned by \name{csch} unless the switch
  426. \nameref{rounded} is on and its argument evaluates to a number.
  427. \end{Comments}
  428. \end{Operator}
  429. \begin{Operator}{ERF}
  430. \index{error function}
  431. The \name{erf} operator represents the error function, defined by
  432. \begin{TEX}
  433. \begin{displaymath}
  434. erf(x) = {2\over \sqrt{\pi}} \int{e^{-x^2}\,dx}
  435. \end{displaymath}
  436. \end{TEX}
  437. \begin{INFO}
  438. erf(x) = (2/sqrt(pi))*int(e^(-x^2),x)
  439. \end{INFO}
  440. A limited number of its properties are known to the system, including the
  441. fact that it is an odd function. Its derivative is known, and from this,
  442. some integrals may be computed. However, a complete integration procedure
  443. for this operator is not currently included.
  444. \begin{Examples}
  445. erf(0); & 0 \\
  446. erf(-a); & - ERF(A) \\
  447. df(erf(x**2),x); & \rfrac{4*SQRT(PI)*X}{E^{X^{4}}*PI} \\\\
  448. int(erf(x),x); & \rfrac{E^{X^{2}}*ERF(X)*PI*X + SQRT(PI)}{E^{X^{2}}*PI}
  449. \end{Examples}
  450. \end{Operator}
  451. \begin{Operator}{EXP}
  452. \index{exponential function}
  453. The \name{exp} operator returns \name{e} raised to the power of its argument.
  454. \begin{Syntax}
  455. \name{exp}\(\meta{expression}\) or \name{exp} \meta{simple\_expression}
  456. \end{Syntax}
  457. \meta{expression} can be any valid REDUCE scalar expression.
  458. \meta{simple\_expression} must be a single identifier or begin with a
  459. prefix operator.
  460. \begin{Examples}
  461. exp(sin(x)); & E^{SIN X} \\
  462. exp(11); & E^{11} \\
  463. on rounded; \\
  464. exp sin(pi/3); & 2.37744267524
  465. \end{Examples}
  466. \begin{Comments}
  467. Numeric values are returned only when \name{rounded} is on.
  468. The single letter \name{e} with the exponential operator \name{^} or
  469. \name{**} may be substituted for \name{exp} without change of function.
  470. \end{Comments}
  471. \end{Operator}
  472. \begin{Operator}{SEC}
  473. The \name{sec} operator returns the secant of its argument.
  474. \begin{Syntax}
  475. \name{sec}\(\meta{expression}\) or \name{sec} \meta{simple\_expression}
  476. \end{Syntax}
  477. \meta{expression} is any valid scalar REDUCE expression,
  478. \meta{simple\_expression} is a single identifier or begins with a prefix
  479. operator name.
  480. \begin{Examples}
  481. sec abc; & SEC(ABC) \\
  482. sec(pi); & -1 \\
  483. sec 4; & SEC(4) \\
  484. on rounded; \\
  485. sec(4); & - 1.52988565647 \\
  486. sec log 5; & - 25.8852966005
  487. \end{Examples}
  488. \begin{Comments}
  489. \name{sec} returns a numeric value only if \nameref{rounded} is on. Then the
  490. secant is calculated to the current degree of floating point precision.
  491. \end{Comments}
  492. \end{Operator}
  493. \begin{Operator}{SECH}
  494. \index{hyperbolic secant}
  495. The \name{sech} operator returns the hyperbolic secant of its argument.
  496. \begin{Syntax}
  497. \name{sech}\(\meta{expression}\) or \name{sech} \meta{simple\_expression}
  498. \end{Syntax}
  499. \meta{expression} is any valid scalar REDUCE expression,
  500. \meta{simple\_expression} is a single identifier or begins with a prefix
  501. operator name.
  502. \begin{Examples}
  503. sech abc; & SECH(ABC) \\
  504. sech(0); & 1 \\
  505. sech 4; & SECH(4) \\
  506. on rounded; \\
  507. sech(4); & 0.0366189934737 \\
  508. sech log 5; & 0.384615384615
  509. \end{Examples}
  510. \begin{Comments}
  511. \name{sech} returns a numeric value only if \nameref{rounded} is on. Then the
  512. expression is calculated to the current degree of floating point precision.
  513. \end{Comments}
  514. \end{Operator}
  515. \begin{Operator}{SIN}
  516. \index{sine}
  517. The \name{sin} operator returns the sine of its argument.
  518. \begin{Syntax}
  519. \name{sin}\(\meta{expression}\) or \name{sin} \meta{simple\_expression}
  520. \end{Syntax}
  521. \meta{expression} is any valid scalar REDUCE expression,
  522. \meta{simple\_expression} is a single identifier or begins with a prefix
  523. operator name.
  524. \begin{Examples}
  525. sin aa; & SIN(AA) \\
  526. sin(pi/2); & 1 \\
  527. on rounded; \\
  528. sin 3; & 0.14112000806 \\
  529. sin(pi/2); & 1.0
  530. \end{Examples}
  531. \begin{Comments}
  532. \name{sin} returns a numeric value only if \name{rounded} is on.
  533. Then the sine is calculated to the current degree of floating point precision.
  534. The argument in this case is assumed to be in radians.
  535. \end{Comments}
  536. \end{Operator}
  537. \begin{Operator}{SINH}
  538. \index{hyperbolic sine}
  539. The \name{sinh} operator returns the hyperbolic sine of its argument.
  540. The derivative of \name{sinh} and some simple transformations are known
  541. to the system.
  542. \begin{Syntax}
  543. \name{sinh}\(\meta{expression}\) or \name{sinh} \meta{simple\_expression}
  544. \end{Syntax}
  545. \meta{expression} may be any scalar REDUCE expression, not an array, matrix or
  546. vector expression. \meta{simple\_expression} must be a single identifier or
  547. begin with a prefix operator name.
  548. \begin{Examples}
  549. sinh b; & SINH(B) \\
  550. sinh(0); & 0 \\
  551. df(sinh(x**2),x); & 2*COSH(X^{2})*X \\
  552. int(sinh(4*x),x); & \rfrac{COSH(4*X)}{4} \\
  553. on rounded; \\
  554. sinh 4; & 27.2899171971
  555. \end{Examples}
  556. \begin{Comments}
  557. You may attach further functionality by defining its inverse (see
  558. \nameref{asinh}).
  559. A numeric value is not returned by \name{sinh} unless the switch
  560. \nameref{rounded} is on and its argument evaluates to a number.
  561. \end{Comments}
  562. \end{Operator}
  563. \begin{Operator}{TAN}
  564. The \name{tan} operator returns the tangent of its argument.
  565. \begin{Syntax}
  566. \name{tan}\(\meta{expression}\) or \name{tan} \meta{simple\_expression}
  567. \end{Syntax}
  568. \meta{expression} is any valid scalar REDUCE expression,
  569. \meta{simple\_expression} is a single identifier or begins with a prefix
  570. operator name.
  571. \begin{Examples}
  572. tan a; & TAN(A) \\
  573. tan(pi/5); & TAN(\rfrac{PI}{5}) \\
  574. on rounded;
  575. tan(pi/5); & 0.726542528005
  576. \end{Examples}
  577. \begin{Comments}
  578. \name{tan} returns a numeric value only if \name{rounded} is on. Then the
  579. tangent is calculated to the current degree of floating point accuracy.
  580. When \nameref{rounded} is on,
  581. no check is made to see if the argument of \name{tan} is a multiple of
  582. $\pi/2$, for which the tangent goes to positive or negative infinity.
  583. (Of course, since REDUCE uses a fixed-point representation of $\pi/2$,
  584. it produces a large but not infinite number.) You need to make a check for
  585. multiples of $\pi/2$ in any program you use that might possibly ask
  586. for the tangent of such a quantity.
  587. \end{Comments}
  588. \end{Operator}
  589. \begin{Operator}{TANH}
  590. \index{hyperbolic tangent}
  591. The \name{tanh} operator returns the hyperbolic tangent of its argument.
  592. The derivative of \name{tanh} and some simple transformations are known
  593. to the system.
  594. \begin{Syntax}
  595. \name{tanh}\(\meta{expression}\) or \name{tanh} \meta{simple\_expression}
  596. \end{Syntax}
  597. \meta{expression} may be any scalar REDUCE expression, not an array, matrix or
  598. vector expression. \meta{simple\_expression} must be a single identifier or
  599. begin with a prefix operator name.
  600. \begin{Examples}
  601. tanh b; & TANH(B) \\
  602. tanh(0); & 0 \\
  603. df(tanh(x*y),x); & Y*( - TANH(X*Y)^{2} + 1) \\
  604. int(tanh(x),x); & LOG(E^{2*X} + 1) - X \\
  605. on rounded; tanh 2; & 0.964027580076
  606. \end{Examples}
  607. \begin{Comments}
  608. You may attach further functionality by defining its inverse (see
  609. \nameref{atanh}).
  610. A numeric value is not returned by \name{tanh} unless the switch
  611. \nameref{rounded} is on and its argument evaluates to a number.
  612. \end{Comments}
  613. \end{Operator}