pk-specf.tex 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602
  1. \section{Special Functions}
  2. \begin{Introduction}{Special Function Package}
  3. The REDUCE \name{Special Function Package} supplies extended
  4. algebraic and numeric support for a wide class of objects.
  5. This package was released together with REDUCE 3.5 (October 1993)
  6. for the first time, a major update is released with REDUCE 3.6.\\
  7. \\
  8. The functions included in this package are in most cases (unless otherwise
  9. stated) defined and named like in the book by Abramowitz and Stegun:
  10. Handbook of Mathematical Functions, Dover Publications.\\
  11. \\
  12. The aim is to collect as much information on the special functions
  13. and simplification capabilities as possible,
  14. i.e. algebraic simplifications and numeric (rounded mode) code, limits
  15. of the functions together
  16. with the definitions of the functions, which are in most cases a power
  17. series, a (definite) integral and/or a differential equation.\\
  18. \\
  19. {\em What can be found:} Some famous constants, a variety of Bessel functions,
  20. special polynomials,
  21. the Gamma function, the (Riemann) Zeta function, Elliptic Functions, Elliptic
  22. Integrals, 3J symbols (Clebsch-Gordan coefficients) and integral functions.\\
  23. \\
  24. {\em What is missing:} Mathieu functions, LerchPhi, etc..
  25. The information about the special functions which solve certain
  26. differential equation is very limited.
  27. In several cases numerical approximation is restricted to real
  28. arguments or is missing completely.\\
  29. \\
  30. The implementation of this package uses REDUCE rule sets to a large extent,
  31. which guarantees a high 'readability' of the functions definitions in the
  32. source file directory. It makes extensions to the special
  33. functions code easy in most cases too. To look at these rules
  34. it may be convenient to use the showrules operator e.g.\\
  35. \\
  36. \nameref{showrules} Besseli;\\
  37. .\\
  38. Some evaluations are improved if the special function package is loaded,
  39. e.g. some (infinite) sums and products leading to expressions including
  40. special functions are known in this case.\\
  41. \\
  42. Note: The special function package has to be loaded explicitly by calling
  43. \begin{verbatim}
  44. load_package specfn;
  45. \end{verbatim}
  46. The functions \nameref{MeijerG} and \nameref{hypergeometric} require
  47. additionally
  48. \begin{verbatim}
  49. load_package specfn2;
  50. \end{verbatim}
  51. \end{Introduction}
  52. \begin{Concept}{Constants}
  53. \index{Euler's constant}\index{Catalan's constant}\index{Khinchin's constant}
  54. \index{Golden_Ratio}
  55. There are a few constants known to the special function package, namely
  56. \begin{itemize}
  57. \item[\name{Euler's constant }] (which can be computed as -\nameref{Psi}(1)) and
  58. \item[\name{Khinchin's constant}] (which is defined in Khinchin's book
  59. ``Continued Fractions'') and
  60. \item[\name{Golden_Ratio}] (which can be computed as (1 + sqrt 5)/2) and
  61. \item[\name{Catalan's constant}] (which is known as an infinite sum of reciprocal
  62. powers)
  63. \end{itemize}
  64. \begin{Examples}
  65. on rounded;
  66. Euler_Gamma; & 0.577215664902 \\
  67. Khinchin; & 2.68545200107 \\
  68. Catalan & 0.915965594177 \\
  69. Golden_Ratio & 1.61803398875
  70. \end{Examples}
  71. \end{Concept}
  72. \subsection{Bernoulli Euler Zeta}
  73. \begin{Operator}{BERNOULLI}
  74. The \name{bernoulli} operator returns the nth Bernoulli number.
  75. \begin{Syntax}
  76. \name{Bernoulli}\(\meta{integer}\)
  77. \end{Syntax}
  78. \begin{Examples}
  79. bernoulli 20; & - 174611 / 330 \\
  80. bernoulli 17; & 0
  81. \end{Examples}
  82. \begin{Comments}
  83. All Bernoulli numbers with odd indices except for 1 are zero.
  84. \end{Comments}
  85. \end{Operator}
  86. \begin{Operator}{BERNOULLIP}
  87. The \name{BernoulliP} operator returns the nth Bernoulli Polynomial
  88. evaluated at x.
  89. \begin{Syntax}
  90. \name{BernoulliP}\(\meta{integer},\meta{expression}\)
  91. \end{Syntax}
  92. \begin{Examples}
  93. BernoulliP(3,z); & z*(2*z^2 - 3*z + 1)/2\\
  94. BernoulliP(10,3); & 338585 / 66
  95. \end{Examples}
  96. \begin{Comments}
  97. The value of the nth Bernoulli Polynomial at 0 is the nth Bernoulli number.
  98. \end{Comments}
  99. \end{Operator}
  100. \begin{Operator}{EULER}
  101. The \name{EULER} operator returns the nth Euler number.
  102. \begin{Syntax}
  103. \name{Euler}\(\meta{integer}\)
  104. \end{Syntax}
  105. \begin{Examples}
  106. Euler 20; & 370371188237525 \\
  107. Euler 0; & 1
  108. \end{Examples}
  109. \begin{Comments}
  110. The \name{Euler} numbers are evaluated by a recursive algorithm which
  111. makes it hard to compute Euler numbers above say 200.
  112. Euler numbers appear in the coefficients of the power series
  113. representation of 1/cos(z).
  114. \end{Comments}
  115. \end{Operator}
  116. \begin{Operator}{EULERP}
  117. The \name{EulerP} operator returns the nth Euler Polynomial.
  118. \begin{Syntax}
  119. \name{EulerP}\(\meta{integer},\meta{expression}\)
  120. \end{Syntax}
  121. \begin{Examples}
  122. EulerP(2,xx); & xx*(xx - 1) \\
  123. EulerP(10,3); & 2046
  124. \end{Examples}
  125. \begin{Comments}
  126. The Euler numbers are the values of the Euler Polynomials at 1/2
  127. multiplied by 2**n.
  128. \end{Comments}
  129. \end{Operator}
  130. \begin{Operator}{ZETA}
  131. The \name{Zeta} operator returns Riemann's Zeta function,
  132. Zeta (z) := sum(1/(k**z),k,1,infinity)
  133. \begin{Syntax}
  134. \name{Zeta}\(\meta{expression}\)
  135. \end{Syntax}
  136. \begin{Examples}
  137. Zeta(2); & pi^2 / 6 \\
  138. on rounded; \\
  139. Zeta 1.01; & 100.577943338
  140. \end{Examples}
  141. \begin{Comments}
  142. Numerical computation for the Zeta function for arguments close to 1 are
  143. tedious, because the series is converging very slowly. In this case a formula
  144. (e.g. found in Bender/Orzag: Advanced Mathematical Methods for
  145. Scientists and Engineers, McGraw-Hill) is used.
  146. No numerical approximation for complex arguments is done.
  147. \end{Comments}
  148. \end{Operator}
  149. \subsection{Bessel Functions}
  150. \begin{Operator}{BESSELJ}
  151. The \name{BesselJ} operator returns the Bessel function of the first kind.
  152. \begin{Syntax}
  153. \name{BesselJ}\(\meta{order},\meta{argument}\)
  154. \end{Syntax}
  155. \begin{Examples}
  156. BesselJ(1/2,pi); & 0 \\
  157. on rounded; \\
  158. BesselJ(0,1); & 0.765197686558 \\
  159. \end{Examples}
  160. \end{Operator}
  161. \begin{Operator}{BESSELY}
  162. \index{Weber's function}
  163. The \name{BesselY} operator returns the Bessel function of the second kind.
  164. \begin{Syntax}
  165. \name{BesselY}\(\meta{order},\meta{argument}\)
  166. \end{Syntax}
  167. \begin{Examples}
  168. BesselY (1/2,pi); & - sqrt(2) / pi \\
  169. on rounded; \\
  170. BesselY (1,3); & 0.324674424792
  171. \end{Examples}
  172. \begin{Comments}
  173. The operator \name{BesselY} is also called Weber's function.
  174. \end{Comments}
  175. \end{Operator}
  176. \begin{Operator}{HANKEL1}
  177. The \name{Hankel1} operator returns the Hankel function of the first kind.
  178. \begin{Syntax}
  179. \name{Hankel1}\(\meta{order},\meta{argument}\)
  180. \end{Syntax}
  181. \begin{Examples}
  182. on complex; \\
  183. Hankel1 (1/2,pi); & - i * sqrt(2) / pi \\
  184. Hankel1 (1,pi); & besselj(1,pi) + i*bessely(1,pi)
  185. \end{Examples}
  186. \begin{Comments}
  187. The operator \name{Hankel1} is also called Bessel function of the third kind.
  188. There is currently no numeric evaluation of Hankel functions.
  189. \end{Comments}
  190. \end{Operator}
  191. \begin{Operator}{HANKEL2}
  192. The \name{Hankel2} operator returns the Hankel function of the second kind.
  193. \begin{Syntax}
  194. \name{Hankel2}\(\meta{order},\meta{argument}\)
  195. \end{Syntax}
  196. \begin{Examples}
  197. on complex; \\
  198. Hankel2 (1/2,pi); & - i * sqrt(2) / pi \\
  199. Hankel2 (1,pi); & besselj(1,pi) - i*bessely(1,pi)
  200. \end{Examples}
  201. \begin{Comments}
  202. The operator \name{Hankel2} is also called Bessel function of the third kind.
  203. There is currently no numeric evaluation of Hankel functions.
  204. \end{Comments}
  205. \end{Operator}
  206. \begin{Operator}{BESSELI}
  207. The \name{BesselI} operator returns the modified Bessel function I.
  208. \begin{Syntax}
  209. \name{BesselI}\(\meta{order},\meta{argument}\)
  210. \end{Syntax}
  211. \begin{Examples}
  212. on rounded; \\
  213. Besseli (1,1); & 0.565159103992
  214. \end{Examples}
  215. \begin{Comments}
  216. The knowledge about the operator \name{BesselI} is currently fairly limited.
  217. \end{Comments}
  218. \end{Operator}
  219. \begin{Operator}{BESSELK}
  220. The \name{BesselK} operator returns the modified Bessel function K.
  221. \begin{Syntax}
  222. \name{BesselK}\(\meta{order},\meta{argument}\)
  223. \end{Syntax}
  224. \begin{Examples}
  225. df(besselk(0,x),x); & - besselk(1,x)
  226. \end{Examples}
  227. \begin{Comments}
  228. There is currently no numeric support for the operator \name{BesselK}.
  229. \end{Comments}
  230. \end{Operator}
  231. \begin{Operator}{StruveH}
  232. The \name{StruveH} operator returns Struve's H function.
  233. \begin{Syntax}
  234. \name{StruveH}\(\meta{order},\meta{argument}\)
  235. \end{Syntax}
  236. \begin{Examples}
  237. struveh(-3/2,x); & - besselj(3/2,x) / i
  238. \end{Examples}
  239. \end{Operator}
  240. \begin{Operator}{StruveL}
  241. The \name{StruveL} operator returns the modified Struve L function .
  242. \begin{Syntax}
  243. \name{StruveL}\(\meta{order},\meta{argument}\)
  244. \end{Syntax}
  245. \begin{Examples}
  246. struvel(-3/2,x); & besseli(3/2,x)
  247. \end{Examples}
  248. \end{Operator}
  249. \begin{Operator}{KummerM}
  250. \index{Confluent Hypergeometric function}
  251. The \name{KummerM} operator returns Kummer's M function.
  252. \begin{Syntax}
  253. \name{KummerM}\(\meta{parameter},\meta{parameter},\meta{argument}\)
  254. \end{Syntax}
  255. \begin{Examples}
  256. kummerm(1,1,x); & e^x \\
  257. on rounded; \\
  258. kummerm(1,3,1.3); & 1.62046942914
  259. \end{Examples}
  260. \begin{Comments}
  261. Kummer's M function is one of the Confluent Hypergeometric functions.
  262. For reference see the \nameref{hypergeometric} operator.
  263. \end{Comments}
  264. \end{Operator}
  265. \begin{Operator}{KummerU}
  266. \index{Confluent Hypergeometric function}
  267. The \name{KummerU} operator returns Kummer's U function.
  268. \begin{Syntax}
  269. \name{KummerU}\(\meta{parameter},\meta{parameter},\meta{argument}\)
  270. \end{Syntax}
  271. \begin{Examples}
  272. df(kummeru(1,1,x),x) & - kummeru(2,2,x)
  273. \end{Examples}
  274. \begin{Comments}
  275. Kummer's U function is one of the Confluent Hypergeometric functions.
  276. For reference see the \nameref{hypergeometric} operator.
  277. \end{Comments}
  278. \end{Operator}
  279. \begin{Operator}{WhittakerW}
  280. \index{Confluent Hypergeometric function}
  281. The \name{WhittakerW} operator returns Whittaker's W function.
  282. \begin{Syntax}
  283. \name{WhittakerW}\(\meta{parameter},\meta{parameter},\meta{argument}\)
  284. \end{Syntax}
  285. \begin{Examples}
  286. WhittakerW(2,2,2); & \rfrac{4*sqrt(2)*kummeru(\rfrac{1}{2},5,2)}{e}
  287. \end{Examples}
  288. \begin{Comments}
  289. Whittaker's W function is one of the Confluent Hypergeometric functions.
  290. For reference see the \nameref{hypergeometric} operator.
  291. \end{Comments}
  292. \end{Operator}
  293. \subsection{Airy Functions}
  294. \begin{Operator}{Airy_Ai}
  295. The \name{Airy\_Ai} operator returns the Airy Ai function for a given argument.
  296. \begin{Syntax}
  297. \name{Airy\_Ai}\(\meta{argument}\)
  298. \end{Syntax}
  299. \begin{Examples}
  300. on complex;
  301. on rounded;
  302. Airy_Ai(0); & 0.355028053888 \\
  303. Airy_Ai(3.45 + 17.97i); & - 5.5561528511e+9 - 8.80397899932e+9*i \\
  304. \end{Examples}
  305. \end{Operator}
  306. \begin{Operator}{Airy_Bi}
  307. The \name{Airy\_Bi} operator returns the Airy Bi function for a given
  308. argument.
  309. \begin{Syntax}
  310. \name{Airy\_Bi}\(\meta{argument}\)
  311. \end{Syntax}
  312. \begin{Examples}
  313. Airy_Bi(0); & 0.614926627446 \\
  314. Airy_Bi(3.45 + 17.97i); & 8.80397899932e+9 - 5.5561528511e+9*i \\
  315. \end{Examples}
  316. \end{Operator}
  317. \begin{Operator}{Airy_Aiprime}
  318. The \name{Airy\_Aiprime} operator returns the Airy Aiprime function for a
  319. given argument.
  320. \begin{Syntax}
  321. \name{Airy\_Aiprime}\(\meta{argument}\)
  322. \end{Syntax}
  323. \begin{Examples}
  324. Airy_Aiprime(0); & - 0.258819403793 \\
  325. Airy_Aiprime(3.45+17.97i);& - 3.83386421824e+19 + 2.16608828136e+19*i \\
  326. \end{Examples}
  327. \end{Operator}
  328. \begin{Operator}{Airy_Biprime}
  329. The \name{Airy\_Biprime} operator returns the Airy Biprime function for a
  330. given argument.
  331. \begin{Syntax}
  332. \name{Airy\_Biprime}\(\meta{argument}\)
  333. \end{Syntax}
  334. \begin{Examples}
  335. Airy_Biprime(0); & \\
  336. Airy_Biprime(3.45 + 17.97i); & 3.84251916792e+19 - 2.18006297399e+19*i\\
  337. \end{Examples}
  338. \end{Operator}
  339. \subsection{Jacobi's Elliptic Functions and Elliptic Integrals}
  340. \begin{Operator}{JacobiSN}
  341. The \name{Jacobisn} operator returns the Jacobi Elliptic function sn.
  342. \begin{Syntax}
  343. \name{Jacobisn}\(\meta{expression},\meta{integer}\)
  344. \end{Syntax}
  345. \begin{Examples}
  346. Jacobisn(0.672, 0.36) & 0.609519691792 \\
  347. Jacobisn(1,0.9) & 0.770085724907881 \\
  348. \end{Examples}
  349. \end{Operator}
  350. \begin{Operator}{JacobiCN}
  351. The \name{Jacobicn} operator returns the Jacobi Elliptic function cn.
  352. \begin{Syntax}
  353. \name{Jacobicn}\(\meta{expression},\meta{integer}\)
  354. \end{Syntax}
  355. \begin{Examples}
  356. Jacobicn(7.2, 0.6) & 0.837288298482018 \\
  357. Jacobicn(0.11, 19) & 0.994403862690043 - 1.6219006985556e-16*i \\
  358. \end{Examples}
  359. \end{Operator}
  360. \begin{Operator}{JacobiDN}
  361. The \name{Jacobidn} operator returns the Jacobi Elliptic function dn.
  362. \begin{Syntax}
  363. \name{Jacobidn}\(\meta{expression},\meta{integer}\)
  364. \end{Syntax}
  365. \begin{Examples}
  366. Jacobidn(15, 0.683) & 0.640574162024592 \\
  367. Jacobidn(0,0) & 1 \\
  368. \end{Examples}
  369. \end{Operator}
  370. \begin{Operator}{JacobiCD}
  371. The \name{Jacobicd} operator returns the Jacobi Elliptic function cd.
  372. \begin{Syntax}
  373. \name{Jacobicd}\(\meta{expression},\meta{integer}\)
  374. \end{Syntax}
  375. \begin{Examples}
  376. Jacobicd(1, 0.34) & 0.657683337805273 \\
  377. Jacobicd(0.8,0.8) & 0.925587311582301 \\
  378. \end{Examples}
  379. \end{Operator}
  380. \begin{Operator}{JacobiSD}
  381. The \name{Jacobisd} operator returns the Jacobi Elliptic function sd.
  382. \begin{Syntax}
  383. \name{Jacobisd}\(\meta{expression},\meta{integer}\)
  384. \end{Syntax}
  385. \begin{Examples}
  386. Jacobisd(12, 0.4) & 0.357189729437272 \\
  387. Jacobisd(0.35,1) & - 1.17713873203043 \\
  388. \end{Examples}
  389. \end{Operator}
  390. \begin{Operator}{JacobiND}
  391. The \name{Jacobind} operator returns the Jacobi Elliptic function nd.
  392. \begin{Syntax}
  393. \name{Jacobind}\(\meta{expression},\meta{integer}\)
  394. \end{Syntax}
  395. \begin{Examples}
  396. Jacobind(0.2, 17) & 1.46553203037507 + 0.0000000000334032759313703*i \\
  397. Jacobind(30, 0.001) & 1.00048958438 \\
  398. \end{Examples}
  399. \end{Operator}
  400. \begin{Operator}{JacobiDC}
  401. The \name{Jacobidc} operator returns the Jacobi Elliptic function dc.
  402. \begin{Syntax}
  403. \name{Jacobidc}\(\meta{expression},\meta{integer}\)
  404. \end{Syntax}
  405. \begin{Examples}
  406. Jacobidc(0.003,1) & 1 \\
  407. Jacobidc(2, 0.75) & 6.43472885111 \\
  408. \end{Examples}
  409. \end{Operator}
  410. \begin{Operator}{JacobiNC}
  411. The \name{Jacobinc} operator returns the Jacobi Elliptic function nc.
  412. \begin{Syntax}
  413. \name{Jacobinc}\(\meta{expression},\meta{integer}\)
  414. \end{Syntax}
  415. \begin{Examples}
  416. Jacobinc(1,0) & 1.85081571768093 \\
  417. Jacobinc(56, 0.4387) & 39.304842663512 \\
  418. \end{Examples}
  419. \end{Operator}
  420. \begin{Operator}{JacobiSC}
  421. The \name{Jacobisc} operator returns the Jacobi Elliptic function sc.
  422. \begin{Syntax}
  423. \name{Jacobisc}\(\meta{expression},\meta{integer}\)
  424. \end{Syntax}
  425. \begin{Examples}
  426. Jacobisc(9, 0.88) & - 1.16417697982095 \\
  427. Jacobisc(0.34, 7) & 0.305851938390775 - 9.8768100944891e-12*i \\
  428. \end{Examples}
  429. \end{Operator}
  430. \begin{Operator}{JacobiNS}
  431. The \name{Jacobins} operator returns the Jacobi Elliptic function ns.
  432. \begin{Syntax}
  433. \name{Jacobins}\(\meta{expression},\meta{integer}\)
  434. \end{Syntax}
  435. \begin{Examples}
  436. Jacobins(3, 0.9) & 1.00945801599785 \\
  437. Jacobins(0.887, 15) & 0.683578280513975 - 0.85023411082469*i \\
  438. \end{Examples}
  439. \end{Operator}
  440. \begin{Operator}{JacobiDS}
  441. The \name{Jacobisn} operator returns the Jacobi Elliptic function ds.
  442. \begin{Syntax}
  443. \name{Jacobids}\(\meta{expression},\meta{integer}\)
  444. \end{Syntax}
  445. \begin{Examples}
  446. Jacobids(98,0.223) & - 1.061253961477 \\
  447. Jacobids(0.36,0.6) & 2.76693172243692 \\
  448. \end{Examples}
  449. \end{Operator}
  450. \begin{Operator}{JacobiCS}
  451. The \name{Jacobics} operator returns the Jacobi Elliptic function cs.
  452. \begin{Syntax}
  453. \name{Jacobics}\(\meta{expression},\meta{integer}\)
  454. \end{Syntax}
  455. \begin{Examples}
  456. Jacobics(0, 0.767) & infinity \\
  457. Jacobics(1.43, 0) & 0.141734127352112 \\
  458. \end{Examples}
  459. \end{Operator}
  460. \begin{Operator}{JacobiAMPLITUDE}
  461. The \name{JacobiAmplitude} operator returns the amplitude of u.
  462. \begin{Syntax}
  463. \name{JacobiAmplitude}\(\meta{expression},\meta{integer}\)
  464. \end{Syntax}
  465. \begin{Examples}
  466. JacobiAmplitude(7.239, 0.427) & 0.0520978301448978 \\
  467. JacobiAmplitude(0,0.1) & 0 \\
  468. \end{Examples}
  469. \begin{Comments}
  470. Amplitude u = asin(\name{Jacobisn(u,m)})
  471. \end{Comments}
  472. \end{Operator}
  473. \begin{Operator}{AGM_FUNCTION}
  474. The \name{AGM_function} operator returns a list of (N, AGM,
  475. list of aNtoa0, list of bNtob0, list of cNtoc0) where a0, b0 and c0
  476. are the initial values; N is the index number of the last term
  477. used to generate the AGM. AGM is the Arithmetic Geometric Mean.
  478. \begin{Syntax}
  479. \name{AGM_function}\(\meta{integer},\meta{integer},\meta{integer}\)
  480. \end{Syntax}
  481. \begin{Examples}
  482. AGM_function(1,1,1) & {1,1,{1,1},{1,1},{0,1}} \\
  483. AGM_function(1, 0.1, 1.3) &
  484. \begin{multilineoutput}{6cm}
  485. \{6,
  486. 2.27985615996629,
  487. \{2.27985615996629, 2.27985615996629,
  488. 2.2798561599706, 2.2798624278857,
  489. 2.28742283656583, 2.55, 1\},
  490. \{2.27985615996629, 2.27985615996629,
  491. 2.27985615996198, 2.2798498920555,
  492. 2.27230201920557, 2.02484567313166, 4.1\},
  493. \{0, 4.30803136219904e-12, 0.0000062679151007581,
  494. 0.00756040868012758, 0.262577163434171, - 1.55, 5.9\}\}
  495. \end{multilineoutput} \\
  496. \end{Examples}
  497. \begin{Comments}
  498. The other Jacobi functions use this function with initial values
  499. a0=1, b0=sqrt(1-m), c0=sqrt(m).
  500. \end{Comments}
  501. \end{Operator}
  502. \begin{Operator}{LANDENTRANS}
  503. The \name{landentrans} operator generates the descending landen
  504. transformation of the given imput values, returning a list of these
  505. values; initial to final in each case.
  506. \begin{Syntax}
  507. \name{landentrans}\(\meta{expression},\meta{integer}\)
  508. \end{Syntax}
  509. \begin{Examples}
  510. landentrans(0,0.1) & \{\{0,0,0,0,0\},\{0.1,0.0025041751943776, \\
  511. & 0.00000156772498954046,6.1444078 9914461e-13,0\}\} \\
  512. \end{Examples}
  513. \begin{Comments}
  514. The first list ascends in value, and the second descends in value.
  515. \end{Comments}
  516. \end{Operator}
  517. \begin{Operator}{EllipticF}
  518. The \name{EllipticF} operator returns the Elliptic Integral of the
  519. First Kind.
  520. \begin{Syntax}
  521. \name{EllitpicF}\(\meta{expression},\meta{integer}\)
  522. \end{Syntax}
  523. \begin{Examples}
  524. EllipticF(0.3, 8.222) & 0.3 \\
  525. EllipticF(7.396, 0.1) & 7.58123216114307 \\
  526. \end{Examples}
  527. \begin{Comments}
  528. The Complete Elliptic Integral of the First Kind can be found by
  529. putting the first argument to pi/2 or by using \name{EllipticK}
  530. and the second argument.
  531. \end{Comments}
  532. \end{Operator}
  533. \begin{Operator}{EllipticK}
  534. The \name{EllipticK} operator returns the Elliptic value K.
  535. \begin{Syntax}
  536. \name{EllipticK}\(\meta{integer}\)
  537. \end{Syntax}
  538. \begin{Examples}
  539. EllipticK(0.2) & 1.65962359861053 \\
  540. EllipticK(4.3) & 0.808442364282734 - 1.05562492399206*i \\
  541. EllipticK(0.000481) & 1.57098526617635 \\
  542. \end{Examples}
  543. \begin{Comments}
  544. The \name{EllipticK} function is the Complete Elliptic Integral of
  545. the First Kind.
  546. \end{Comments}
  547. \end{Operator}
  548. \begin{Operator}{EllipticKprime}
  549. The \name{EllipticK'} operator returns the Elliptic value K(m).
  550. \begin{Syntax}
  551. \name{EllipticKprime}\(\meta{integer}\)
  552. \end{Syntax}
  553. \begin{Examples}
  554. EllipticKprime(0.2) & 2.25720532682085 \\
  555. EllipticKprime(4.3) & 1.05562492399206 \\
  556. EllipticKprime(0.000481) & 5.206621921966 \\
  557. \end{Examples}
  558. \begin{Comments}
  559. The \name{EllipticKprime} function is the Complete Elliptic Integral of
  560. the First Kind of (1-m).
  561. \end{Comments}
  562. \end{Operator}
  563. \begin{Operator}{EllipticE}
  564. The \name{EllipticE} operator used with two arguments
  565. returns the Elliptic Integral of the Second Kind.
  566. \begin{Syntax}
  567. \name{EllipticE}\(\meta{expression},\meta{integer}\)
  568. \end{Syntax}
  569. \begin{Examples}
  570. EllipticE(1.2,0.22) & 1.15094019180949 \\
  571. EllipticE(0,4.35) & 0 \\
  572. EllipticE(9,0.00719) & 8.98312465929145 \\
  573. \end{Examples}
  574. \begin{Comments}
  575. The Complete Elliptic Integral of the Second Kind can be obtained by
  576. using just the second argument, or by using pi/2 as the first argument.
  577. \end{Comments}
  578. The \name{EllipticE} operator used with one argument
  579. returns the Elliptic value E.
  580. \begin{Syntax}
  581. \name{EllipticE}\(\meta{integer}\)
  582. \end{Syntax}
  583. \begin{Examples}
  584. EllipticE(0.22) & 1.48046637439519 \\
  585. EllipticE(pi/2, 0.22) & 1.48046637439519 \\
  586. \end{Examples}
  587. \end{Operator}
  588. \begin{Operator}{EllipticTHETA}
  589. The \name{EllipticTheta} operator returns one of the four Theta
  590. functions. It cannot except any number other than 1,2,3 or 4 as
  591. its first argument.
  592. \begin{Syntax}
  593. \name{EllipticTheta}\(\meta{integer},\meta{expression},\meta{integer}\)
  594. \end{Syntax}
  595. \begin{Examples}
  596. EllipticTheta(1, 1.4, 0.72) & 0.91634775373 \\
  597. EllipticTheta(2, 3.9, 6.1 ) & -48.0202736969 + 20.9881034377 i \\
  598. EllipticTheta(3, 0.67, 0.2) & 1.0083077448 \\
  599. EllipticTheta(4, 8, 0.75) & 0.894963369304 \\
  600. EllipticTheta(5, 1, 0.1) & ***** In EllipticTheta(a,u,m); a = 1,2,3 or 4.
  601. \\
  602. \end{Examples}
  603. \begin{Comments}
  604. Theta functions are important because every one of the Jacobian
  605. Elliptic functions can be expressed as the ratio of two theta functions.
  606. \end{Comments}
  607. \end{Operator}
  608. \begin{Operator}{JacobiZETA}
  609. The \name{JacobiZeta} operator returns the Jacobian function Zeta.
  610. \begin{Syntax}
  611. \name{JacobiZeta}\(\meta{expression},\meta{integer}\)
  612. \end{Syntax}
  613. \begin{Examples}
  614. JacobiZeta(3.2, 0.8) & - 0.254536403439 \\
  615. JacobiZeta(0.2, 1.6) & 0.171766095970451 - 0.0717028569800147*i \\
  616. \end{Examples}
  617. \begin{Comments}
  618. The Jacobian function Zeta is related to the Jacobian function Theta.
  619. But it is significantly different from Riemann's Zeta Function \nameref{Zeta}.
  620. \end{Comments}
  621. \end{Operator}
  622. \subsection{Gamma and Related Functions}
  623. \begin{Operator}{POCHHAMMER}
  624. The \name{Pochhammer} operator implements the Pochhammer notation
  625. (shifted factorial).
  626. \begin{Syntax}
  627. \name{Pochhammer}\(\meta{expression},\meta{expression}\)
  628. \end{Syntax}
  629. \begin{Examples}
  630. pochhammer(17,4); & 116280 \\
  631. pochhammer(1/2,z); &
  632. \rfrac{factorial(2*z)}{(2^{2*z}*factorial(z))}
  633. \end{Examples}
  634. \begin{Comments}
  635. A number of complex rules for \name{Pochhammer} are inactive, because they
  636. cause a huge system load in algebraic mode. If one wants to use more rules
  637. for the simplification of Pochhammer's notation, one can do:
  638. \\
  639. let special!*pochhammer!*rules;
  640. \end{Comments}
  641. \end{Operator}
  642. \begin{Operator}{GAMMA}
  643. The \name{Gamma} operator returns the Gamma function.
  644. \begin{Syntax}
  645. \name{Gamma}\(\meta{expression}\)
  646. \end{Syntax}
  647. \begin{Examples}
  648. gamma(10); & 362880 \\
  649. gamma(1/2); & sqrt(pi)
  650. \end{Examples}
  651. \end{Operator}
  652. \begin{Operator}{BETA}
  653. The \name{Beta} operator returns the Beta function defined by
  654. Beta (z,w) := defint(t**(z-1)* (1 - t)**(w-1),t,0,1) .
  655. \begin{Syntax}
  656. \name{Beta}\(\meta{expression},\meta{expression}\)
  657. \end{Syntax}
  658. \begin{Examples}
  659. Beta(2,2); & 1 / 6 \\
  660. Beta(x,y); & gamma(x)*gamma(y) / gamma(x + y)
  661. \end{Examples}
  662. \begin{Comments}
  663. The operator \name{Beta} is simplified towards the \nameref{GAMMA} operator.
  664. \end{Comments}
  665. \end{Operator}
  666. \begin{Operator}{PSI}
  667. \index{Euler's constant}
  668. The \name{Psi} operator returns the Psi (or DiGamma) function.
  669. Psi(x) := df(Gamma(z),z)/ Gamma (z)
  670. \begin{Syntax}
  671. \name{Gamma}\(\meta{expression}\)
  672. \end{Syntax}
  673. \begin{Examples}
  674. Psi(3); & (2*log(2) + psi(1/2) + psi(1) + 3)/2 \\
  675. on rounded; \\
  676. - Psi(1); & 0.577215664902
  677. \end{Examples}
  678. \begin{Comments}
  679. Euler's constant can be found as - Psi(1).
  680. \end{Comments}
  681. \end{Operator}
  682. \begin{Operator}{POLYGAMMA}
  683. The \name{Polygamma} operator returns the Polygamma function.
  684. Polygamma(n,x) := df(Psi(z),z,n);
  685. \begin{Syntax}
  686. \name{Polygamma}\(\meta{integer},\meta{expression}\)
  687. \end{Syntax}
  688. \begin{Examples}
  689. Polygamma(1,2); & (pi^2 - 6) / 6\\
  690. on rounded; \\
  691. Polygamma(1,2.35); & 0.52849689109
  692. \end{Examples}
  693. \begin{Comments}
  694. The Polygamma function is used for simplification of the \nameref{ZETA}
  695. function for some arguments.
  696. \end{Comments}
  697. \end{Operator}
  698. \subsection{Miscellaneous Functions}
  699. \begin{Operator}{DILOG extended}
  700. \index{Spence's Integral}
  701. The package \name{specfn} supplies an extended support for the
  702. \nameref{dilog} operator which implements the \nameindex{dilogarithm function}.
  703. dilog(x) := - defint(log(t)/(t - 1),t,1,x);
  704. \begin{Syntax}
  705. \name{Dilog}\(\meta{order},\meta{expression}\)
  706. \end{Syntax}
  707. \begin{Examples}
  708. defint(log(t)/(t - 1),t,1,x); & - dilog (x) \\
  709. dilog 2; & - pi^2 /12 \\
  710. on rounded; \\
  711. Dilog 20; & - 5.92783972438
  712. \end{Examples}
  713. \begin{Comments}
  714. The operator \name{Dilog} is sometimes called Spence's Integral for n = 2.
  715. \end{Comments}
  716. \end{Operator}
  717. \begin{Operator}{Lambert\_W function}
  718. Lambert's W function is the inverse of the function w * e**w.
  719. It is used in the \nameref{solve} package for equations containing
  720. exponentials and logarithms.
  721. \begin{Syntax}
  722. \name{Lambert\_W}\(\meta{z}\)
  723. \end{Syntax}
  724. \begin{Examples}
  725. Lambert_W(-1/e); & -1 \\
  726. solve(w + log(w),w); & {w=lambert\_w(1)}\\
  727. on rounded; \\
  728. Lambert_W(-0.05); & - 0.0527059835515
  729. \end{Examples}
  730. \begin{Comments}
  731. The current implementation will compute the principal branch in
  732. rounded mode only.
  733. \end{Comments}
  734. \end{Operator}
  735. \subsection{Orthogonal Polynomials}
  736. \begin{Operator}{ChebyshevT}
  737. The \name{ChebyshevT} operator computes the nth Chebyshev T Polynomial (of the
  738. first kind).
  739. \begin{Syntax}
  740. \name{ChebyshevT}\(\meta{integer},\meta{expression}\)
  741. \end{Syntax}
  742. \begin{Examples}
  743. ChebyshevT(3,xx); & xx*(4*xx^2 - 3) \\
  744. ChebyshevT(3,4); & 244
  745. \end{Examples}
  746. \begin{Comments}
  747. Chebyshev's T polynomials are computed using the recurrence relation:
  748. ChebyshevT(n,x) := 2x*ChebyshevT(n-1,x) - ChebyshevT(n-2,x) with \\
  749. ChebyshevT(0,x) := 0 and ChebyshevT(1,x) := x
  750. \end{Comments}
  751. \end{Operator}
  752. \begin{Operator}{ChebyshevU}
  753. The \name{ChebyshevU} operator returns the nth Chebyshev U Polynomial (of the
  754. second kind).
  755. \begin{Syntax}
  756. \name{ChebyshevU}\(\meta{integer},\meta{expression}\)
  757. \end{Syntax}
  758. \begin{Examples}
  759. ChebyshevU(3,xx); & 4*x*(2*x^2 - 1) \\
  760. ChebyshevU(3,4); & 496
  761. \end{Examples}
  762. \begin{Comments}
  763. Chebyshev's U polynomials are computed using the recurrence relation:
  764. ChebyshevU(n,x) := 2x*ChebyshevU(n-1,x) - ChebyshevU(n-2,x) with \\
  765. ChebyshevU(0,x) := 0 and ChebyshevU(1,x) := 2x
  766. \end{Comments}
  767. \end{Operator}
  768. \begin{Operator}{HermiteP}
  769. The \name{HermiteP} operator returns the nth Hermite Polynomial.
  770. \begin{Syntax}
  771. \name{HermiteP}\(\meta{integer},\meta{expression}\)
  772. \end{Syntax}
  773. \begin{Examples}
  774. HermiteP(3,xx); & 4*xx*(2*xx^2 - 3) \\
  775. HermiteP(3,4); & 464
  776. \end{Examples}
  777. \begin{Comments}
  778. Hermite polynomials are computed using the recurrence relation:
  779. \\
  780. HermiteP(n,x) := 2x*HermiteP(n-1,x) - 2*(n-1)*HermiteP(n-2,x) with \\
  781. HermiteP(0,x) := 1 and HermiteP(1,x) := 2x
  782. \end{Comments}
  783. \end{Operator}
  784. \begin{Operator}{LaguerreP}
  785. The \name{LaguerreP} operator computes the nth Laguerre Polynomial.
  786. The two argument call of LaguerreP is a (common) abbreviation of
  787. LaguerreP(n,0,x).
  788. \begin{Syntax}
  789. \name{LaguerreP}\(\meta{integer},\meta{expression}\) or\\
  790. \name{LaguerreP}\(\meta{integer},\meta{expression},\meta{expression}\)
  791. \end{Syntax}
  792. \begin{Examples}
  793. LaguerreP(3,xx); & (- xx^3 + 9*xx^2 - 18*xx + 6)/6\\
  794. LaguerreP(2,3,4); & -2
  795. \end{Examples}
  796. \begin{Comments}
  797. Laguerre polynomials are computed using the recurrence relation:
  798. LaguerreP(n,a,x) := (2n+a-1-x)/n*LaguerreP(n-1,a,x) -
  799. (n+a-1) * LaguerreP(n-2,a,x) with \\
  800. \\
  801. LaguerreP(0,a,x) := 1 and LaguerreP(2,a,x) := -x+1+a
  802. \end{Comments}
  803. \end{Operator}
  804. \begin{Operator}{LegendreP}
  805. The binary \name{LegendreP} operator computes the nth Legendre
  806. Polynomial which is
  807. a special case of the nth Jacobi Polynomial with \\
  808. \\
  809. LegendreP(n,x) := JacobiP(n,0,0,x)\\
  810. \\
  811. The ternary form returns the associated Legendre Polynomial (see below).
  812. \begin{Syntax}
  813. \name{LegendreP}\(\meta{integer},\meta{expression}\) or\\
  814. \name{LegendreP}\(\meta{integer},\meta{expression},\meta{expression}\)
  815. \end{Syntax}
  816. \begin{Examples}
  817. LegendreP(3,xx); &\rfrac{xx*(5*xx^2 - 3)}{2}\\
  818. LegendreP(3,2,xx); &15*xx*( - xx^2 + 1)
  819. \end{Examples}
  820. \begin{Comments}
  821. The ternary form of the operator \name{LegendreP} is the associated
  822. Legendre Polynomial defined as \\
  823. \\
  824. P(n,m,x) = (-1)**m * (1-x**2)**(m/2) * df(LegendreP(n,x),x,m)
  825. \end{Comments}
  826. \end{Operator}
  827. \begin{Operator}{JacobiP}
  828. The \name{JacobiP} operator computes the nth Jacobi Polynomial.
  829. \begin{Syntax}
  830. \name{JacobiP}\(\meta{integer},\meta{expression},\meta{expression},
  831. \meta{expression}\)
  832. \end{Syntax}
  833. \begin{Examples}
  834. JacobiP(3,4,5,xx); & \rfrac{7*(65*xx^3 - 13*xx^2 - 13*xx + 1)}{8}\\
  835. JacobiP(3,4,5,6); & 94465/8
  836. \end{Examples}
  837. \end{Operator}
  838. \begin{Operator}{GegenbauerP}
  839. \index{ultraspherical polynomials}
  840. The \name{GegenbauerP} operator computes Gegenbauer's (ultraspherical)
  841. polynomials.
  842. \begin{Syntax}
  843. \name{GegenbauerP}\(\meta{integer},\meta{expression},\meta{expression}\)
  844. \end{Syntax}
  845. \begin{Examples}
  846. GegenbauerP(3,2,xx); & 4*xx*(8*xx^2 - 3)\\
  847. GegenbauerP(3,2,4); & 2000
  848. \end{Examples}
  849. \end{Operator}
  850. \begin{Operator}{SolidHarmonicY}
  851. \index{Solid harmonic polynomials}
  852. The \name{SolidHarmonicY} operator computes Solid harmonic (Laplace)
  853. polynomials.
  854. \begin{Syntax}
  855. \name{SolidHarmonicY}\(\meta{integer},\meta{integer},
  856. \meta{expression},\meta{expression},\meta{expression},\meta{expression}\)
  857. \end{Syntax}
  858. \begin{Examples}
  859. SolidHarmonicY(3,-2,x,y,z,r2); &
  860. \rfrac{sqrt(105)*z*(-2*i*x*y + x^2 - y^2)}{4*sqrt(pi)*sqrt(2)}\\
  861. \end{Examples}
  862. \end{Operator}
  863. \begin{Operator}{SphericalHarmonicY}
  864. \index{Spherical harmonic polynomials}
  865. The \name{SphericalHarmonicY} operator computes Spherical harmonic (Laplace)
  866. polynomials. These are special cases of the
  867. solid harmonic polynomials, \nameref{SolidHarmonicY}.
  868. \begin{Syntax}
  869. \name{SphericalHarmonicY}\(\meta{integer},\meta{integer},
  870. \meta{expression},\meta{expression}\)
  871. \end{Syntax}
  872. \begin{Examples}
  873. SphericalHarmonicY(3,2,theta,phi); &
  874. \rfrac{sqrt(105)*cos(theta)*sin(theta)^2*(cos(phi)^2+2*cos(phi)*sin(phi)*i-
  875. sin(phi)^2)}{4*sqrt(pi)*sqrt(2)}\\
  876. \end{Examples}
  877. \end{Operator}
  878. \subsection{Integral Functions}
  879. \index{sine integral function}
  880. \begin{Operator}{Si}
  881. \index{Sine integral function}\index{integral function}
  882. The \name{Si} operator returns the Sine Integral function.
  883. \begin{Syntax}
  884. \name{Si}\(\meta{expression}\)
  885. \end{Syntax}
  886. \begin{Examples}
  887. limit(Si(x),x,infinity); & pi / 2 \\
  888. on rounded; \\
  889. Si(0.35); & 0.347626790989
  890. \end{Examples}
  891. \begin{Comments}
  892. The numeric values for the operator \name{Si} are computed via the
  893. power series representation, which limits the argument range.
  894. \end{Comments}
  895. \end{Operator}
  896. \begin{Operator}{Shi}
  897. \index{hyperbolic sine integral function}\index{integral function}
  898. The \name{Shi} operator returns the hyperbolic Sine Integral function.
  899. \begin{Syntax}
  900. \name{Shi}\(\meta{expression}\)
  901. \end{Syntax}
  902. \begin{Examples}
  903. df(shi(x),x); & sinh(x) / x \\
  904. on rounded; \\
  905. Shi(0.35); & 0.352390716351
  906. \end{Examples}
  907. \begin{Comments}
  908. The numeric values for the operator \name{Shi} are computed via the
  909. power series representation, which limits the argument range.
  910. \end{Comments}
  911. \end{Operator}
  912. \begin{Operator}{s_i}
  913. \index{sine integral function}\index{integral function}
  914. The \name{s_i} operator returns the Sine Integral function si.
  915. \begin{Syntax}
  916. \name{s_i}\(\meta{expression}\)
  917. \end{Syntax}
  918. \begin{Examples}
  919. s_i(xx); & (2*Si(xx) - pi) / 2 \\
  920. df(s_i(x),x); & sin(x) / x
  921. \end{Examples}
  922. \begin{Comments}
  923. The operator name \name{s_i} is simplified towards \nameref{SI}.
  924. Since REDUCE is not case sensitive by default the name ``si'' can't be
  925. used.
  926. \end{Comments}
  927. \end{Operator}
  928. \begin{Operator}{Ci}
  929. \index{cosine integral function}
  930. The \name{Ci} operator returns the Cosine Integral function.
  931. \begin{Syntax}
  932. \name{Ci}\(\meta{expression}\)
  933. \end{Syntax}
  934. \begin{Examples}
  935. defint(cos(t)/t,t,x,infinity); & - ci (x) \\
  936. on rounded; \\
  937. Ci(0.35); & - 0.50307556932
  938. \end{Examples}
  939. \begin{Comments}
  940. The numeric values for the operator \name{Ci} are computed via the
  941. power series representation, which limits the argument range.
  942. \end{Comments}
  943. \end{Operator}
  944. \begin{Operator}{Chi}
  945. \index{hyperbolic cosine integral function}\index{integral function}
  946. The \name{Chi} operator returns the Hyperbolic Cosine Integral function.
  947. \begin{Syntax}
  948. \name{Chi}\(\meta{expression}\)
  949. \end{Syntax}
  950. \begin{Examples}
  951. defint((cosh(t)-1)/t,t,0,x); & - log(x) + psi(1) + chi(x)\\
  952. on rounded; \\
  953. Chi(0.35); & - 0.44182471827
  954. \end{Examples}
  955. \begin{Comments}
  956. The numeric values for the operator \name{Chi} are computed via the
  957. power series representation, which limits the argument range.
  958. \end{Comments}
  959. \end{Operator}
  960. \begin{Operator}{ERF extended}
  961. \index{error function}
  962. The special function package supplies an extended support for the
  963. \nameref{erf} operator which implements the \nameindex{error function} \\
  964. \\
  965. defint(e**(-x**2),x,0,infinity) * 2/sqrt(pi) \\
  966. .\\
  967. \begin{Syntax}
  968. \name{erf}\(\meta{expression}\)
  969. \end{Syntax}
  970. \begin{Examples}
  971. erf(-x); & - erf(x)\\
  972. on rounded; \\
  973. erf(0.35); & 0.379382053562
  974. \end{Examples}
  975. \begin{Comments}
  976. The numeric values for the operator \name{erf} are computed via the
  977. power series representation, which limits the argument range.
  978. \end{Comments}
  979. \end{Operator}
  980. \begin{Operator}{erfc}
  981. \index{error function}\index{complementary error function}
  982. The \name{erfc} operator returns the complementary Error function\\
  983. \\
  984. 1 - defint(e**(-x**2),x,0,infinity) * 2/sqrt(pi) \\
  985. .\\
  986. \begin{Syntax}
  987. \name{erfc}\(\meta{expression}\)
  988. \end{Syntax}
  989. \begin{Examples}
  990. erfc(xx); & - erf(xx) + 1
  991. \end{Examples}
  992. \begin{Comments}
  993. The operator \name{erfc} is simplified towards the \nameref{erf} operator.
  994. \end{Comments}
  995. \end{Operator}
  996. \begin{Operator}{Ei}
  997. \index{exponential integral function}
  998. The \name{Ei} operator returns the Exponential Integral function.
  999. \begin{Syntax}
  1000. \name{Ei}\(\meta{expression}\)
  1001. \end{Syntax}
  1002. \begin{Examples}
  1003. df(ei(x),x); & \rfrac{e^x}{x}\\
  1004. on rounded; \\
  1005. Ei(0.35); & - 0.0894340019184
  1006. \end{Examples}
  1007. \begin{Comments}
  1008. The numeric values for the operator \name{Ei} are computed via the
  1009. power series representation, which limits the argument range.
  1010. \end{Comments}
  1011. \end{Operator}
  1012. \begin{Operator}{Fresnel_C}
  1013. The \name{Fresnel_C} operator represents Fresnel's Cosine function.
  1014. \begin{Syntax}
  1015. \name{Fresnel_C}\(\meta{expression}\)
  1016. \end{Syntax}
  1017. \begin{Examples}
  1018. int(cos(t^2*pi/2),t,0,x); & fresnel\_c(x) \\
  1019. on rounded; \\
  1020. fresnel_c(2.1); & 0.581564135061
  1021. \end{Examples}
  1022. \begin{Comments}
  1023. The operator \name{Fresnel_C} has a limited numeric evaluation of
  1024. large values of its argument.
  1025. \end{Comments}
  1026. \end{Operator}
  1027. \begin{Operator}{Fresnel_S}
  1028. The \name{Fresnel_S} operator represents Fresnel's Sine Integral function.
  1029. \begin{Syntax}
  1030. \name{Fresnel_S}\(\meta{expression}\)
  1031. \end{Syntax}
  1032. \begin{Examples}
  1033. int(sin(t^2*pi/2),t,0,x); & fresnel\_s(x) \\
  1034. on rounded; \\
  1035. fresnel_s(2.1); & 0.374273359378
  1036. \end{Examples}
  1037. \begin{Comments}
  1038. The operator \name{Fresnel_S} has a limited numeric evaluation of
  1039. large values of its argument.
  1040. \end{Comments}
  1041. \end{Operator}
  1042. \subsection{Combinatorial Operators}
  1043. \begin{Operator}{BINOMIAL}
  1044. The \name{Binomial} operator returns the Binomial coefficient if both
  1045. parameter are integer and expressions involving the Gamma function otherwise.
  1046. \begin{Syntax}
  1047. \name{Binomial}\(\meta{integer},\meta{integer}\)
  1048. \end{Syntax}
  1049. \begin{Examples}
  1050. Binomial(49,6); & 13983816 \\
  1051. Binomial(n,3); & \rfrac{gamma(n + 1)}{6*gamma(n - 2)}
  1052. \end{Examples}
  1053. \begin{Comments}
  1054. The operator \name{Binomial} evaluates the Binomial coefficients from
  1055. the explicit form and therefore it is not the best algorithm if you
  1056. want to compute many binomial coefficients with big indices in which
  1057. case a recursive algorithm is preferable.
  1058. \end{Comments}
  1059. \end{Operator}
  1060. \begin{Operator}{STIRLING1}
  1061. The \name{Stirling1} operator returns the Stirling Numbers S(n,m) of the first
  1062. kind, i.e. the number of permutations of n symbols which have exactly m cycles
  1063. (divided by (-1)**(n-m)).
  1064. \begin{Syntax}
  1065. \name{Stirling1}\(\meta{integer},\meta{integer}\)
  1066. \end{Syntax}
  1067. \begin{Examples}
  1068. Stirling1 (17,4); & -87077748875904 \\
  1069. Stirling1 (n,n-1); & \rfrac{-gamma(n+1)}{2*gamma(n-1)}
  1070. \end{Examples}
  1071. \begin{Comments}
  1072. The operator \name{Stirling1} evaluates the Stirling numbers of the
  1073. first kind by rulesets for special cases or by a computing the closed
  1074. form, which is a series involving the operators \nameref{BINOMIAL}
  1075. and \nameref{STIRLING2}.
  1076. \end{Comments}
  1077. \end{Operator}
  1078. \begin{Operator}{STIRLING2}
  1079. The \name{Stirling1} operator returns the Stirling Numbers S(n,m) of the
  1080. second kind, i.e. the number of ways of partitioning a set of n elements
  1081. into m non-empty subsets.
  1082. \begin{Syntax}
  1083. \name{Stirling2}\(\meta{integer},\meta{integer}\)
  1084. \end{Syntax}
  1085. \begin{Examples}
  1086. Stirling2 (17,4); & 694337290 \\
  1087. Stirling2 (n,n-1); & \rfrac{gamma(n+1)}{2*gamma(n-1)}
  1088. \end{Examples}
  1089. \begin{Comments}
  1090. The operator \name{Stirling2} evaluates the Stirling numbers of the
  1091. second kind by rulesets for special cases or by a computing the closed
  1092. form.
  1093. \end{Comments}
  1094. \end{Operator}
  1095. \subsection{3j and 6j symbols}
  1096. \begin{Operator}{ThreejSymbol}
  1097. The \name{ThreejSymbol} operator implements the 3j symbol.
  1098. \begin{Syntax}
  1099. \name{ThreejSymbol}\(\meta{list of j1,m1},\meta{list of j2,m2},
  1100. \meta{list of j3,m3}\)
  1101. \end{Syntax}
  1102. \begin{Examples}
  1103. ThreejSymbol({j+1,m},{j+1,-m},{1,0}); &
  1104. \rfrac{( - 1)^j *(abs(j - m + 1) - abs(j + m + 1))}
  1105. { 2*sqrt(2*j^3 + 9*j^2 + 13*j + 6)*( - 1)^m}\\
  1106. \end{Examples}
  1107. \end{Operator}
  1108. \begin{Operator}{Clebsch_Gordan}
  1109. The \name{Clebsch\_Gordan} operator implements the Clebsch\_Gordan
  1110. coefficients. This is closely related to the \nameref{Threejsymbol}.
  1111. \begin{Syntax}
  1112. \name{Clebsch\_Gordan}\(\meta{list of j1,m1},\meta{list of j2,m2},
  1113. \meta{list of j3,m3}\)
  1114. \end{Syntax}
  1115. \begin{Examples}
  1116. Clebsch_Gordan({2,0},{2,0},{2,0}); & \rfrac{-2}{sqrt(14)}\\
  1117. \end{Examples}
  1118. \end{Operator}
  1119. \begin{Operator}{SixjSymbol}
  1120. The \name{SixjSymbol} operator implements the 6j symbol.
  1121. \begin{Syntax}
  1122. \name{SixjSymbol}\(\meta{list of j1,j2,j3},\meta{list of l1,l2,l3}\)
  1123. \end{Syntax}
  1124. \begin{Examples}
  1125. SixjSymbol({7,6,3},{2,4,6}); & \rfrac{1}{14*sqrt(858)}\\
  1126. \end{Examples}
  1127. \begin{Comments}
  1128. The operator \name{SixjSymbol} uses the \nameref{ineq} package in order
  1129. to find minima and maxima for the summation index.
  1130. \end{Comments}
  1131. \end{Operator}
  1132. \subsection{Miscellaneous}
  1133. \begin{Operator}{HYPERGEOMETRIC}
  1134. \index{hypergeometric function}
  1135. \index{generalized hypergeometric function}
  1136. The \name{Hypergeometric} operator provides simplifications for the
  1137. generalized hypergeometric functions.
  1138. The \name{Hypergeometric} operator is included in the package specfn2.
  1139. \begin{Syntax}
  1140. \name{hypergeometric}\(\meta{list of parameters},\meta{list of parameters},
  1141. \meta{argument}\)
  1142. \end{Syntax}
  1143. \begin{Examples}
  1144. load specfn2;\\
  1145. hypergeometric ({1/2,1},{3/2},-x^2); & \rfrac{atan(x)}{x}\\
  1146. hypergeometric ({},{},z); & e^z
  1147. \end{Examples}
  1148. \begin{Comments}
  1149. The special case where the length of the first list is equal to 2 and
  1150. the length of the second list is equal to 1 is often called
  1151. ``the hypergeometric function'' (notated as 2F1(a1,a2,b;x)).
  1152. \end{Comments}
  1153. \end{Operator}
  1154. \begin{Operator}{MeijerG}
  1155. The \name{MeijerG} operator provides simplifications for Meijer's G
  1156. function. The simplifications are performed towards polynomials,
  1157. elementary or
  1158. special functions or (generalized) \nameref{hypergeometric} functions.
  1159. The \name{MeijerG} operator is included in the package specfn2.
  1160. \begin{Syntax}
  1161. \name{MeijerG}\(\meta{list of parameters},\meta{list of parameters},
  1162. \meta{argument}\)
  1163. \end{Syntax}
  1164. The first element of the lists has to be the list containing the
  1165. first group (mostly called ``m'' and ``n'') of parameters. This passes
  1166. the four parameters of a Meijer's G function implicitly via the
  1167. length of the lists.
  1168. \begin{Examples}
  1169. load specfn2;\\
  1170. MeijerG({{},1},{{0}},x); & heaviside(-x+1)\\
  1171. MeijerG({{}},{{1+1/4},1-1/4},(x^2)/4) * sqrt pi;
  1172. & \rfrac{sqrt(2)*sin(x)*x^2}{4*sqrt(x)}
  1173. \end{Examples}
  1174. \begin{Comments}
  1175. Many well-known functions can be written as G functions,
  1176. e.g. exponentials, logarithms, trigonometric functions, Bessel functions
  1177. and hypergeometric functions.
  1178. The formulae can be found e.g. in \\
  1179. A.P.Prudnikov, Yu.A.Brychkov, O.I.Marichev:
  1180. Integrals and Series, Volume 3: More special functions,
  1181. Gordon and Breach Science Publishers (1990).
  1182. \end{Comments}
  1183. \end{Operator}
  1184. \begin{Operator}{Heaviside}
  1185. The \name{Heaviside} operator returns the Heaviside function. \\
  1186. Heaviside(~w) => if (w < 0) then 0 else 1 \\
  1187. when numberp w;
  1188. \begin{Syntax}
  1189. \name{Heaviside}\(\meta{argument}\)
  1190. \end{Syntax}
  1191. \begin{Comments}
  1192. This operator is often included in the result of the simplification
  1193. of a generalized \nameref{hypergeometric} function or a
  1194. \nameref{MeijerG} function.
  1195. No simplification is done for this function.
  1196. \end{Comments}
  1197. \end{Operator}
  1198. \begin{Operator}{erfi}
  1199. The \name{erfi} operator returns the error function of an imaginary argument.
  1200. erfi(~x) => 2/sqrt(pi) * defint(e**(t**2),t,0,x);
  1201. \begin{Syntax}
  1202. \name{erfi}\(\meta{argument}\)
  1203. \end{Syntax}
  1204. \begin{Comments}
  1205. This operator is sometimes included in the result of the simplification
  1206. of a generalized \nameref{hypergeometric} function or a
  1207. \nameref{MeijerG} function.
  1208. No simplification is done for this function.
  1209. \end{Comments}
  1210. \end{Operator}