r38_0400.html 56 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270
  1. <a name=r38_0400>
  2. <title>Tracing Groebner bases</title></a>
  3. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  4. E"></p>
  5. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  6. <b>Tracing Groebner bases</b><menu>
  7. <li><a href=r38_0350.html#r38_0396>groebprot switch</a><P>
  8. <li><a href=r38_0350.html#r38_0397>groebprotfile variable</a><P>
  9. <li><a href=r38_0350.html#r38_0398>groebnert operator</a><P>
  10. <li><a href=r38_0350.html#r38_0399>preducet operator</a><P>
  11. </menu>
  12. <a name=r38_0401>
  13. <title>Module</title></a>
  14. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  15. E"></p>
  16. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  17. <b>MODULE</b><P>
  18. <P>
  19. Given a polynomial ring, e.g. R=Z[x,y,...] and an integer n&gt;1.
  20. The vectors with n elements of R form a free MODULE under
  21. elementwise addition and multiplication with elements of R.
  22. <P>
  23. <P>
  24. For a submodule given by a finite basis a Groebner basis
  25. can be computed, and the facilities of the GROEBNER package
  26. are available except the operators
  27. <a href=r38_0350.html#r38_0391>groebnerf</a>
  28. and <em>groesolve</em>. The vectors are encoded using auxiliary
  29. variables which represent the unit vectors in the module.
  30. These are declared in the share variable
  31. <a href=r38_0400.html#r38_0402>gmodule</a>.
  32. <P>
  33. <P>
  34. <a name=r38_0402>
  35. <title>gmodule</title></a>
  36. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  37. E"></p>
  38. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  39. <b>GMODULE</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>variable</b><P>
  40. <P>
  41. The vectors of a free
  42. <a href=r38_0400.html#r38_0401>module</a> over a polynomial ring R
  43. are encoded as linear combinations with unit vectors of
  44. M which are represented by auxiliary variables. These
  45. must be collected in the variable <em>gmodule</em> before
  46. any call to an operator of the Groebner package.
  47. <P>
  48. <P>
  49. <p><pre><tt>
  50. torder({x,y,v1,v2,v3})$
  51. gmodule := {v1,v2,v3}$
  52. g:=groebner({x^2*v1 + y*v2,x*y*v1 - v3,2y*v1 + y*v3});
  53. </tt></pre><p>compute the Groebner basis of the submodule
  54. <P>
  55. <P>
  56. <p><pre><tt>
  57. ([x^2,y,0],[xy,0,-1],[0,2y,y])
  58. </tt></pre><p>The members of the list <em>gmodule</em> are automatically
  59. appended to the end of the variable list, if they are not
  60. yet members there. They take part in the actual term ordering.
  61. <P>
  62. <P>
  63. <a name=r38_0403>
  64. <title>Groebner Bases for Modules</title></a>
  65. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  66. E"></p>
  67. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  68. <b>Groebner Bases for Modules</b><menu>
  69. <li><a href=r38_0400.html#r38_0401>Module concept</a><P>
  70. <li><a href=r38_0400.html#r38_0402>gmodule variable</a><P>
  71. </menu>
  72. <a name=r38_0404>
  73. <title>gsort</title></a>
  74. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  75. E"></p>
  76. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  77. <b>GSORT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  78. <P>
  79. <P>
  80. <P>
  81. <P> <H3>
  82. syntax: </H3>
  83. <em>gsort</em>(&lt;p&gt;)
  84. <P>
  85. <P>
  86. <P>
  87. where &lt;p&gt; is a polynomial or a list of polynomials.
  88. <P>
  89. <P>
  90. The polynomials are reordered and sorted corresponding to
  91. the current
  92. <a href=r38_0350.html#r38_0353>term order</a>.
  93. <P> <H3>
  94. examples: </H3>
  95. <p><pre><tt>
  96. torder lex;
  97. gsort(x**2+2x*y+y**2,{y,x});
  98. y**2+2y*x+x**2
  99. </tt></pre><p><P>
  100. <P>
  101. <a name=r38_0405>
  102. <title>gsplit</title></a>
  103. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  104. E"></p>
  105. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  106. <b>GSPLIT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  107. <P>
  108. <P>
  109. <P>
  110. <P> <H3>
  111. syntax: </H3>
  112. <em>gsplit</em>(&lt;p&gt;[,&lt;vars&gt;]);
  113. <P>
  114. <P>
  115. <P>
  116. where &lt;p&gt; is a polynomial or a list of polynomials.
  117. <P>
  118. <P>
  119. The polynomial is reordered corresponding to the
  120. the current
  121. <a href=r38_0350.html#r38_0353>term order</a> and then
  122. separated into leading term and reductum. Result is
  123. a list with the leading term as first and the reductum
  124. as second element.
  125. <P> <H3>
  126. examples: </H3>
  127. <p><pre><tt>
  128. torder lex;
  129. gsplit(x**2+2x*y+y**2,{y,x});
  130. {y**2,2y*x+x**2}
  131. </tt></pre><p><P>
  132. <P>
  133. <a name=r38_0406>
  134. <title>gspoly</title></a>
  135. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  136. E"></p>
  137. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  138. <b>GSPOLY</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  139. <P>
  140. <P>
  141. <P>
  142. <P> <H3>
  143. syntax: </H3>
  144. <em>gspoly</em>(&lt;p1&gt;,&lt;p2&gt;);
  145. <P>
  146. <P>
  147. <P>
  148. <P>
  149. where &lt;p1&gt; and &lt;p2&gt; are polynomials.
  150. <P>
  151. <P>
  152. The <em>subtraction</em> polynomial of p1 and p2 is computed
  153. corresponding to the method of the Buchberger algorithm for
  154. computing <em>groebner bases</em>: p1 and p2 are multiplied
  155. with terms such that when subtracting them the leading terms
  156. cancel each other.
  157. <P>
  158. <P>
  159. <a name=r38_0407>
  160. <title>Computing with distributive polynomials</title></a>
  161. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  162. E"></p>
  163. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  164. <b>Computing with distributive polynomials</b><menu>
  165. <li><a href=r38_0400.html#r38_0404>gsort operator</a><P>
  166. <li><a href=r38_0400.html#r38_0405>gsplit operator</a><P>
  167. <li><a href=r38_0400.html#r38_0406>gspoly operator</a><P>
  168. </menu>
  169. <a name=r38_0408>
  170. <title>Groebner package</title></a>
  171. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  172. E"></p>
  173. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  174. <b>Groebner package</b><menu>
  175. <li><a href=r38_0350.html#r38_0351>Groebner bases introduction</a><P>
  176. <li><a href=r38_0350.html#r38_0352>Ideal Parameters concept</a><P>
  177. <li><a href=r38_0350.html#r38_0366>Term order</a><P>
  178. <li><a href=r38_0350.html#r38_0390>Basic Groebner operators</a><P>
  179. <li><a href=r38_0350.html#r38_0395>Factorizing Groebner bases</a><P>
  180. <li><a href=r38_0400.html#r38_0400>Tracing Groebner bases</a><P>
  181. <li><a href=r38_0400.html#r38_0403>Groebner Bases for Modules</a><P>
  182. <li><a href=r38_0400.html#r38_0407>Computing with distributive polynomials</a>
  183. <P>
  184. </menu>
  185. <a name=r38_0409>
  186. <title>HEPHYS</title></a>
  187. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  188. E"></p>
  189. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  190. <b>HEPHYS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>introduction</b><P>
  191. <P>
  192. The High-energy Physics package is historic for REDUCE, since REDUCE
  193. originated as a program to aid in computations with Dirac expressions.
  194. The commutation algebra of the gamma matrices is independent of their
  195. representation, and is a natural subject for symbolic mathematics. Dirac
  196. theory is applied to beta decay and the computation of
  197. cross-sections and scattering. The high-energy physics operators are
  198. available in the REDUCE main program, rather than as a module which must
  199. be loaded.
  200. <P>
  201. <P>
  202. <a name=r38_0410>
  203. <title>HE_dot</title></a>
  204. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  205. E"></p>
  206. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  207. <b>.</b> _ _ _ <b>HE-DOT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  208. <P>
  209. The . operator is used to denote the scalar product of two Lorentz
  210. four-vectors.
  211. <P> <H3>
  212. syntax: </H3>
  213. <P>
  214. <P>
  215. &lt;vector&gt; <em>.</em> &lt;vector&gt;
  216. <P>
  217. <P>
  218. <P>
  219. &lt;vector&gt; must be an identifier declared to be of type <em>vector</em> to h
  220. ave
  221. the scalar product definition. When applied to arguments that are not
  222. vectors, the
  223. <a href=r38_0001.html#r38_0043>cons</a> operator is used,
  224. whose symbol is also ``dot.''
  225. <P>
  226. <P>
  227. <P> <H3>
  228. examples: </H3>
  229. <p><pre><tt>
  230. vector aa,bb,cc;
  231. let aa.bb = 0;
  232. aa.bb;
  233. 0
  234. aa.cc;
  235. AA.CC
  236. q := aa.cc;
  237. Q := AA.CC
  238. q;
  239. AA.CC
  240. </tt></pre><p>Since vectors are special high-energy physics entities that do not
  241. contain
  242. values, the . product will not return a true scalar product. You can
  243. assign a scalar identifier to the result of a . operation, or assign a .
  244. operation to have the value of the scalar you supply, as shown above. Note
  245. that the result of a . operation is a scalar, not a vector.
  246. <P>
  247. <P>
  248. The metric tensor g(u,v) can be represented by <em>u.v</em>. If contraction
  249. over the indices is required, <em>u</em> and <em>v</em> should be declared to
  250. be of type
  251. <a href=r38_0400.html#r38_0413>index</a>.
  252. <P>
  253. <P>
  254. The dot operator has the highest precedence of the infix operators, so
  255. expressions involving . and other operators have the scalar product
  256. evaluated first before other operations are done.
  257. <P>
  258. <P>
  259. <P>
  260. <a name=r38_0411>
  261. <title>EPS</title></a>
  262. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  263. E"></p>
  264. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  265. <b>EPS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  266. <P>
  267. The <em>eps</em> operator denotes the completely antisymmetric tensor of
  268. order 4 and its contraction with Lorentz four-vectors, as used in
  269. high-energy physics calculations.
  270. <P> <H3>
  271. syntax: </H3>
  272. <P>
  273. <P>
  274. <em>eps</em>(&lt;vector-expr&gt;,&lt;vector-expr&gt;,&lt;vector-expr&gt;,
  275. &lt;vector-expr&gt;)
  276. <P>
  277. <P>
  278. <P>
  279. &lt;vector-expr&gt; must be a valid vector expression, and may be an index.
  280. <P>
  281. <P>
  282. <P> <H3>
  283. examples: </H3>
  284. <p><pre><tt>
  285. vector g0,g1,g2,g3;
  286. eps(g1,g0,g2,g3);
  287. - EPS(G0,G1,G2,G3);
  288. eps(g1,g2,g0,g3);
  289. EPS(G0,G1,G2,G3);
  290. eps(g1,g2,g3,g1);
  291. 0
  292. </tt></pre><p>Vector identifiers are ordered alphabetically by REDUCE. When an o
  293. dd number
  294. of transpositions is required to restore the canonical order to the four
  295. arguments of <em>eps</em>, the term is ordered and carries a minus sign. When an
  296. even number of transpositions is required, the term is returned ordered and
  297. positive. When one of the arguments is repeated, the value 0 is returned.
  298. A contraction of the form
  299. eps(_i j mu nu p_mu q_nu)
  300. is represented by <em>eps(i,j,p,q)</em> when <em>i</em> and <em>j</em> have been
  301. declared to be of type
  302. <a href=r38_0400.html#r38_0413>index</a>.
  303. <P>
  304. <P>
  305. <P>
  306. <a name=r38_0412>
  307. <title>G</title></a>
  308. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  309. E"></p>
  310. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  311. <b>G</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  312. <P>
  313. <em>g</em> is an n-ary operator used to denote a product of gamma matrices
  314. contracted with Lorentz four-vectors, in high-energy physics.
  315. <P> <H3>
  316. syntax: </H3>
  317. <P>
  318. <P>
  319. <em>g</em>(&lt;identifier&gt;,&lt;vector-expr&gt;
  320. {,&lt;vector-expr&gt;}*)
  321. <P>
  322. <P>
  323. <P>
  324. &lt;identifier&gt; is a scalar identifier representing a fermion line
  325. identifier, &lt;vector-expr&gt; can be any valid vector expression,
  326. representing a vector or a gamma matrix.
  327. <P>
  328. <P>
  329. <P> <H3>
  330. examples: </H3>
  331. <p><pre><tt>
  332. vector aa,bb,cc;
  333. vector a;
  334. g(line1,aa,bb);
  335. AA.BB
  336. g(line2,aa,a);
  337. 0
  338. g(id,aa,bb,cc);
  339. 0
  340. g(li1,aa,bb) + k;
  341. AA.BB + K
  342. let aa.bb = m*k;
  343. g(ln1,aa)*g(ln1,bb);
  344. K*M
  345. g(ln1,aa)*g(ln2,bb);
  346. 0
  347. </tt></pre><p>The vector <em>A</em> is reserved in arguments of <em>g</em> to de
  348. note the
  349. special gamma matrix gamma_5. It must be declared to
  350. be a vector before you use it.
  351. <P>
  352. <P>
  353. Gamma matrix expressions are associated with fermion lines in a Feynman
  354. diagram. If more than one line occurs in an expression, the gamma
  355. matrices involved are separate (operating in independent spin space), as
  356. shown in the last two example lines above. A product of gamma matrices
  357. associated with a single line can be entered either as a single <em>g</em>
  358. command with several vector arguments, or as products of separate <em>g</em>
  359. commands each with a single argument.
  360. <P>
  361. <P>
  362. While the product of vectors is not defined, the product, sum and
  363. difference of several gamma expressions are defined, as is the product of
  364. a gamma expression with a scalar. If an expression involving gamma
  365. matrices includes a scalar, the scalar is treated as if it were the
  366. product of itself with a unit 4 x 4 matrix.
  367. <P>
  368. <P>
  369. Dirac expressions are evaluated by computing the trace of the expression
  370. using the commutation algebra of gamma matrices. The algorithms used are
  371. described in articles by J. S. R. Chisholm in &lt;Il Nuovo Cimento X,&gt; Vol.
  372. 30, p. 426, 1963, and J. Kahane, &lt;Journal of Mathematical Physics&gt;,
  373. Vol. 9, p. 1732, 1968. The trace is then divided by 4 to distinguish
  374. between the trace of a scalar and the trace of an expression that is the
  375. product of a scalar with a unit 4 x 4 matrix.
  376. <P>
  377. <P>
  378. Trace calculations may be prevented over any line identifier by declaring it
  379. to be
  380. <a href=r38_0400.html#r38_0416>nospur</a>. If it is later desired to evaluate th
  381. ese traces,
  382. the declaration can be undone with the
  383. <a href=r38_0400.html#r38_0418>spur</a> declaration.
  384. <P>
  385. <P>
  386. The notation of Bjorken and Drell, &lt;Relativistic Quantum Mechanics,&gt;
  387. 1964, is assumed in all operations involving gamma matrices. For an
  388. example of the use of <em>g</em> in a calculation, see the &lt;REDUCE
  389. User's Manual&gt;.
  390. <P>
  391. <P>
  392. <P>
  393. <a name=r38_0413>
  394. <title>INDEX</title></a>
  395. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  396. E"></p>
  397. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  398. <b>INDEX</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  399. <P>
  400. The declaration <em>index</em> flags a four-vector as an index for subsequent
  401. high-energy physics calculations.
  402. <P> <H3>
  403. syntax: </H3>
  404. <P>
  405. <P>
  406. <em>index</em>&lt;vector-id&gt;{,&lt;vector-id&gt;}*
  407. <P>
  408. <P>
  409. <P>
  410. &lt;vector-id&gt; must have been declared of type <em>vector</em>.
  411. <P>
  412. <P>
  413. <P> <H3>
  414. examples: </H3>
  415. <p><pre><tt>
  416. vector aa,bb,cc;
  417. index uu;
  418. let aa.bb = 0;
  419. (aa.uu)*(bb.uu);
  420. 0
  421. (aa.uu)*(cc.uu);
  422. AA.CC
  423. </tt></pre><p>Index variables are used to represent contraction over components
  424. of
  425. vectors when scalar products are taken by the . operator, as well as
  426. indicating contraction for the
  427. <a href=r38_0400.html#r38_0411>eps</a> operator or metric tensor.
  428. <P>
  429. <P>
  430. The special status of a vector as an index can be revoked with the
  431. declaration
  432. <a href=r38_0400.html#r38_0417>remind</a>. The object remains a vector, however.
  433. <P>
  434. <P>
  435. <P>
  436. <a name=r38_0414>
  437. <title>MASS</title></a>
  438. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  439. E"></p>
  440. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  441. <b>MASS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>command</b><P>
  442. <P>
  443. The <em>mass</em> command associates a scalar variable as a mass with
  444. the corresponding vector variable, in high-energy physics calculations.
  445. <P> <H3>
  446. syntax: </H3>
  447. <P>
  448. <P>
  449. <em>mass</em>&lt;vector-var&gt;<em>=</em>&lt;scalar-var&gt;
  450. {,&lt;vector-var&gt;<em>=</em>&lt;scalar-var&gt;}*
  451. <P>
  452. <P>
  453. <P>
  454. &lt;vector-var&gt; can be a declared vector variable; <em>mass</em> will declare
  455. it to be of type <em>vector</em> if it is not. This may override an existing
  456. matrix variable by that name. &lt;scalar-var&gt; must be a scalar variable.
  457. <P>
  458. <P>
  459. <P> <H3>
  460. examples: </H3>
  461. <p><pre><tt>
  462. vector bb,cc;
  463. mass cc=m;
  464. mshell cc;
  465. cc.cc;
  466. 2
  467. M
  468. </tt></pre><p>Once a mass has been attached to a vector with a <em>mass</em> dec
  469. laration,
  470. the
  471. <a href=r38_0400.html#r38_0415>mshell</a> declaration puts the associated partic
  472. le ``on the mass
  473. shell.'' Subsequent scalar (.) products of the vector with itself will be
  474. replaced by the square of the mass expression.
  475. <P>
  476. <P>
  477. <P>
  478. <a name=r38_0415>
  479. <title>MSHELL</title></a>
  480. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  481. E"></p>
  482. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  483. <b>MSHELL</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>command</b><P>
  484. <P>
  485. The <em>mshell</em> command puts particles on the mass shell in high-energy
  486. physics calculations.
  487. <P> <H3>
  488. syntax: </H3>
  489. <P>
  490. <P>
  491. <em>mshell</em>&lt;vector-var&gt;{,&lt;vector-var&gt;}*
  492. <P>
  493. <P>
  494. <P>
  495. &lt;vector-var&gt; must have had a mass attached to it by a
  496. <a href=r38_0400.html#r38_0414>mass</a>
  497. declaration.
  498. <P>
  499. <P>
  500. <P> <H3>
  501. examples: </H3>
  502. <p><pre><tt>
  503. vector v1,v2;
  504. mass v1=m,v2=q;
  505. mshell v1;
  506. v1.v1;
  507. 2
  508. M
  509. v2.v2;
  510. V2.V2
  511. mshell v2;
  512. v1.v1*v2.v2;
  513. 2 2
  514. M *Q
  515. </tt></pre><p>Even though a mass is attached to a vector variable representing a
  516. particle, the replacement does not take place until the <em>mshell</em>
  517. declaration is given for that vector variable.
  518. <P>
  519. <P>
  520. <P>
  521. <a name=r38_0416>
  522. <title>NOSPUR</title></a>
  523. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  524. E"></p>
  525. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  526. <b>NOSPUR</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  527. <P>
  528. The <em>nospur</em> declaration prevents the trace calculation over the given
  529. line identifiers in high-energy physics calculations.
  530. <P> <H3>
  531. syntax: </H3>
  532. <P>
  533. <P>
  534. <em>nospur</em>&lt;line-id&gt;{,&lt;line-id&gt;}*
  535. <P>
  536. <P>
  537. <P>
  538. &lt;line-id&gt; is a scalar identifier that will be used as a line identifier.
  539. <P>
  540. <P>
  541. <P> <H3>
  542. examples: </H3>
  543. <p><pre><tt>
  544. vector a1,b1,c1;
  545. g(line1,a1,b1)*g(line2,b1,c1);
  546. A1.B1*B1.C1
  547. nospur line2;
  548. g(line1,a1,b1)*g(line2,b1,c1);
  549. A1.B1*G(LINE2,B1,C1)
  550. </tt></pre><p>Nospur declarations can be removed by making the declaration
  551. <a href=r38_0400.html#r38_0418>spur</a>.
  552. <P>
  553. <P>
  554. <P>
  555. <a name=r38_0417>
  556. <title>REMIND</title></a>
  557. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  558. E"></p>
  559. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  560. <b>REMIND</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  561. <P>
  562. The <em>remind</em> declaration removes the special status of its arguments
  563. as indices, which was set in the
  564. <a href=r38_0400.html#r38_0413>index</a> declaration, in
  565. high-energy physics calculations.
  566. <P> <H3>
  567. syntax: </H3>
  568. <P>
  569. <P>
  570. <em>remind</em>&lt;identifier&gt;{,&lt;identifier&gt;}*
  571. <P>
  572. <P>
  573. <P>
  574. &lt;identifier&gt; must have been declared to be of type
  575. <a href=r38_0400.html#r38_0413>index</a>.
  576. <P>
  577. <P>
  578. <a name=r38_0418>
  579. <title>SPUR</title></a>
  580. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  581. E"></p>
  582. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  583. <b>SPUR</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  584. <P>
  585. The <em>spur</em> declaration removes the special exemption from trace
  586. calculations that was declared by
  587. <a href=r38_0400.html#r38_0416>nospur</a>, in high-energy physics
  588. calculations.
  589. <P> <H3>
  590. syntax: </H3>
  591. <P>
  592. <P>
  593. <em>spur</em>&lt;line-id&gt;{,&lt;line-id&gt;}*
  594. <P>
  595. <P>
  596. <P>
  597. &lt;line-id&gt; must be a line-identifier that has previously been declared
  598. <em>nospur</em>.
  599. <P>
  600. <P>
  601. <a name=r38_0419>
  602. <title>VECDIM</title></a>
  603. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  604. E"></p>
  605. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  606. <b>VECDIM</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>command</b><P>
  607. <P>
  608. The command <em>vecdim</em> changes the vector dimension from 4 to an arbitrary
  609. integer or symbol. Used in high-energy physics calculations.
  610. <P> <H3>
  611. syntax: </H3>
  612. <P>
  613. <P>
  614. <em>vecdim</em>&lt;dimension&gt;
  615. <P>
  616. <P>
  617. <P>
  618. &lt;dimension&gt; must be either an integer or a valid scalar identifier that
  619. does not have a floating-point value.
  620. <P>
  621. <P>
  622. The
  623. <a href=r38_0400.html#r38_0411>eps</a> operator and the gamma_5
  624. symbol (<em>A</em>) are not properly defined in anything except four
  625. dimensions and will print an error message if you use them that way. The
  626. other high-energy physics operators should work without problem.
  627. <P>
  628. <P>
  629. <P>
  630. <a name=r38_0420>
  631. <title>VECTOR</title></a>
  632. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  633. E"></p>
  634. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  635. <b>VECTOR</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  636. <P>
  637. The <em>vector</em> declaration declares that its arguments are of type <em>vect
  638. or</em>.
  639. <P> <H3>
  640. syntax: </H3>
  641. <P>
  642. <P>
  643. <em>vector</em>&lt;identifier&gt;{,&lt;identifier&gt;}*
  644. <P>
  645. <P>
  646. <P>
  647. &lt;identifier&gt; must be a valid REDUCE identifier. It may have already been
  648. used for a matrix, array, operator or scalar variable. After an identifier
  649. has been declared to be a vector, it may not be used as a scalar variable.
  650. <P>
  651. <P>
  652. Vectors are special entities for high-energy physics calculations. You
  653. cannot put values into their coordinates; they do not have coordinates.
  654. They are legal arguments for the high-energy physics operators
  655. <a href=r38_0400.html#r38_0411>eps</a>,
  656. <a href=r38_0400.html#r38_0412>g</a> and <em>.</em> (dot). Vector variables are
  657. used to represent gamma matrices and gamma matrices contracted with Lorentz
  658. 4-vectors, since there are no Dirac variables per se in the system.
  659. Vectors do follow the usual vector rules for arithmetic operations:
  660. <em>+</em> and <em>-</em> operate upon two or more vectors, producing a
  661. vector; <em>*</em> and <em>/</em> cannot be used between vectors; the
  662. scalar product is represented by the . operator; and the product of a
  663. scalar and vector expression is well defined, and is a vector.
  664. <P>
  665. <P>
  666. You can represent components of vectors by including representations of unit
  667. vectors in your system. For instance, letting <em>E0</em> represent the unit
  668. vector (1,0,0,0), the command
  669. <P>
  670. <P>
  671. <em>V1.E0 := 0;</em>would set up the substitution of zero for the first componen
  672. t of the vector
  673. <em>V1</em>.
  674. <P>
  675. <P>
  676. Identifiers that are declared by the <em>index</em> and <em>mass</em> declaratio
  677. ns are
  678. automatically declared to be vectors.
  679. <P>
  680. <P>
  681. The following errors can occur in calculations using the high energy
  682. physics package:
  683. <P>
  684. <P>
  685. <em>A represents only gamma5 in vector expressions</em>You have tried to use A i
  686. n some way other than gamma5 in a
  687. high-energy physics expression.
  688. <P>
  689. <P>
  690. <P>
  691. <em>Gamma5 not allowed unless vecdim is 4</em>You have used gamma_5 in a high-en
  692. ergy physics
  693. computation involving a vector dimension other than 4.
  694. <P>
  695. <P>
  696. <P>
  697. &lt;ID&gt; <em>has no mass</em>
  698. <P>
  699. <P>
  700. One of the arguments to
  701. <a href=r38_0400.html#r38_0415>mshell</a> has had no mass assigned to it, in
  702. high-energy physics calculations.
  703. <P>
  704. <P>
  705. <P>
  706. <em>Missing arguments for G operator</em>A line symbol is missing in a gamma mat
  707. rix expression in high-energy physics
  708. calculations.
  709. <P>
  710. <P>
  711. <P>
  712. <em>Unmatched index</em>&lt;list&gt;
  713. <P>
  714. <P>
  715. The parser has found unmatched indices during the evaluation of a
  716. gamma matrix expression in high-energy physics calculations.
  717. <P>
  718. <P>
  719. <P>
  720. <P>
  721. <P>
  722. <a name=r38_0421>
  723. <title>High Energy Physics</title></a>
  724. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  725. E"></p>
  726. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  727. <b>High Energy Physics</b><menu>
  728. <li><a href=r38_0400.html#r38_0409>HEPHYS introduction</a><P>
  729. <li><a href=r38_0400.html#r38_0410>HE-dot operator</a><P>
  730. <li><a href=r38_0400.html#r38_0411>EPS operator</a><P>
  731. <li><a href=r38_0400.html#r38_0412>G operator</a><P>
  732. <li><a href=r38_0400.html#r38_0413>INDEX declaration</a><P>
  733. <li><a href=r38_0400.html#r38_0414>MASS command</a><P>
  734. <li><a href=r38_0400.html#r38_0415>MSHELL command</a><P>
  735. <li><a href=r38_0400.html#r38_0416>NOSPUR declaration</a><P>
  736. <li><a href=r38_0400.html#r38_0417>REMIND declaration</a><P>
  737. <li><a href=r38_0400.html#r38_0418>SPUR declaration</a><P>
  738. <li><a href=r38_0400.html#r38_0419>VECDIM command</a><P>
  739. <li><a href=r38_0400.html#r38_0420>VECTOR declaration</a><P>
  740. </menu>
  741. <a name=r38_0422>
  742. <title>Numeric_Package</title></a>
  743. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  744. E"></p>
  745. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  746. <b>NUMERIC PACKAGE</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>introduction</b><P>
  747. <P>
  748. The numeric package supplies algorithms based on approximation
  749. techniques of numerical mathematics. The algorithms use
  750. the
  751. <a href=r38_0300.html#r38_0330>rounded</a> mode arithmetic of REDUCE, including
  752. the variable precision feature which is exploited in some
  753. algorithms in an adaptive manner in order to reach the
  754. desired accuracy.
  755. <P>
  756. <P>
  757. <a name=r38_0423>
  758. <title>Interval</title></a>
  759. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  760. E"></p>
  761. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  762. <b>INTERVAL</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>type</b><P>
  763. <P>
  764. Intervals are generally coded as lower bound and
  765. upper bound connected by the operator <em>..</em>, usually
  766. associated to a variable in an
  767. equation.
  768. <P>
  769. <P>
  770. <P> <H3>
  771. syntax: </H3>
  772. &lt;var&gt; = (&lt;low&gt; .. &lt;high&gt;)
  773. <P>
  774. <P>
  775. <P>
  776. where &lt;var&gt; is a
  777. <a href=r38_0001.html#r38_0002>kernel</a> and &lt;low&gt;, &lt;high&gt; are
  778. numbers or expression which evaluate to numbers with &lt;low&gt;&lt;=&lt;high
  779. &gt;.
  780. <P>
  781. <P>
  782. <P> <H3>
  783. examples: </H3>
  784. <p><pre><tt></tt></pre><p>means that the variable x is taken in the range from 2
  785. .5 up to
  786. 3.5.
  787. <P>
  788. <P>
  789. <a name=r38_0424>
  790. <title>numeric_accuracy</title></a>
  791. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  792. E"></p>
  793. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  794. <b>NUMERIC ACCURACY</b><P>
  795. <P>
  796. The keyword parameters <em>accuracy=a</em> and <em>iterations=i</em>,
  797. where <em>a</em>and <em>i</em> must be positive integer numbers, control the
  798. iterative algorithms: the iteration is continued until
  799. the local error is below 10**-a; if that is impossible
  800. within <em>i</em> steps, the iteration is terminated with an
  801. error message. The values reached so far are then returned
  802. as the result.
  803. <P>
  804. <P>
  805. <a name=r38_0425>
  806. <title>TRNUMERIC</title></a>
  807. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  808. E"></p>
  809. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  810. <b>TRNUMERIC</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  811. <P>
  812. Normally the algorithms produce only a minimum of printed
  813. output during their operation. In cases of an unsuccessful
  814. or unexpected long operation a <em>trace of the iteration</em> can be
  815. printed by setting <em>trnumeric</em> <em>on</em>.
  816. <P>
  817. <P>
  818. <a name=r38_0426>
  819. <title>num_min</title></a>
  820. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  821. E"></p>
  822. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  823. <b>NUM_MIN</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  824. <P>
  825. <P>
  826. <P>
  827. The Fletcher Reeves version of the <em>steepest descent</em>
  828. algorithms is used to find the <em>minimum</em> of a
  829. function of one or more variables. The
  830. function must have continuous partial derivatives with respect to all
  831. variables. The starting point of the search can be
  832. specified; if not, random values are taken instead.
  833. The steepest descent algorithms in general find only local
  834. minima.
  835. <P>
  836. <P>
  837. <P> <H3>
  838. syntax: </H3>
  839. <em>num_min</em>(&lt;exp&gt;,
  840. &lt;var&gt;[=&lt;val&gt;] [,&lt;var&gt;[=&lt;val&gt;] ...
  841. [,accuracy=&lt;a&gt;] [,iterations=&lt;i&gt;])
  842. <P>
  843. <P>
  844. or
  845. <P>
  846. <P>
  847. <em>num_min</em>(exp, {
  848. &lt;var&gt;[=&lt;val&gt;] [,&lt;var&gt;[=&lt;val&gt;] ...] }
  849. [,accuracy=&lt;a&gt;] [,iterations=&lt;i&gt;])
  850. <P>
  851. <P>
  852. <P>
  853. where &lt;exp&gt; is a function expression,
  854. &lt;var&gt; are the variables in &lt;exp&gt; and
  855. &lt;val&gt; are the (optional) start values.
  856. For &lt;a&gt; and &lt;i&gt; see
  857. <a href=r38_0400.html#r38_0424>numeric accuracy</a>.
  858. <P>
  859. <P>
  860. <em>Num_min</em>tries to find the next local minimum along the descending
  861. path starting at the given point. The result is a
  862. <a href=r38_0050.html#r38_0053>list</a>
  863. with the minimum function value as first element followed by a list
  864. of
  865. <a href=r38_0001.html#r38_0045>equation</a><em>s</em>, where the variables are e
  866. quated to the coordinates
  867. of the result point.
  868. <P>
  869. <P>
  870. <P> <H3>
  871. examples: </H3>
  872. <p><pre><tt>
  873. num_min(sin(x)+x/5, x)
  874. {4.9489585606,{X=29.643767785}}
  875. num_min(sin(x)+x/5, x=0)
  876. { - 1.3342267466,{X= - 1.7721582671}}
  877. </tt></pre><p>
  878. <a name=r38_0427>
  879. <title>num_solve</title></a>
  880. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  881. E"></p>
  882. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  883. <b>NUM_SOLVE</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  884. <P>
  885. <P>
  886. <P>
  887. An adaptively damped Newton iteration is used to find
  888. an approximative root of a function (function vector) or the
  889. solution of an
  890. <a href=r38_0001.html#r38_0045>equation</a> (equation system). The expressions
  891. must have continuous derivatives for all variables.
  892. A starting point for the iteration can be given. If not given
  893. random values are taken instead. When the number of
  894. forms is not equal to the number of variables, the
  895. Newton method cannot be applied. Then the minimum
  896. of the sum of absolute squares is located instead.
  897. <P>
  898. <P>
  899. With
  900. <a href=r38_0250.html#r38_0274>complex</a> on, solutions with imaginary parts ca
  901. n be
  902. found, if either the expression(s) or the starting point
  903. contain a nonzero imaginary part.
  904. <P>
  905. <P>
  906. <P> <H3>
  907. syntax: </H3>
  908. <em>num_solve</em>(&lt;exp&gt;, &lt;var&gt;[=&lt;val&gt;][,accuracy=&lt;a&gt;][,
  909. iterations=&lt;i&gt;])
  910. <P>
  911. <P>
  912. or
  913. <P>
  914. <P>
  915. <em>num_solve</em>({&lt;exp&gt;,...,&lt;exp&gt;}, &lt;var&gt;[=&lt;val&gt;],...,
  916. &lt;var&gt;[=&lt;val&gt;]
  917. [,accuracy=&lt;a&gt;][,iterations=&lt;i&gt;])
  918. <P>
  919. <P>
  920. or
  921. <P>
  922. <P>
  923. <em>num_solve</em>({&lt;exp&gt;,...,&lt;exp&gt;}, {&lt;var&gt;[=&lt;val&gt;],...
  924. ,&lt;var&gt;[=&lt;val&gt;]}
  925. [,accuracy=&lt;a&gt;][,iterations=&lt;i&gt;])
  926. <P>
  927. <P>
  928. <P>
  929. <P>
  930. where &lt;exp&gt; are function expressions,
  931. &lt;var&gt; are the variables,
  932. &lt;val&gt; are optional start values.
  933. For &lt;a&gt; and &lt;i&gt; see
  934. <a href=r38_0400.html#r38_0424>numeric accuracy</a>.
  935. <P>
  936. <P>
  937. <em>num_solve</em>tries to find a zero/solution of the expression(s).
  938. Result is a list of equations, where the variables are
  939. equated to the coordinates of the result point.
  940. <P>
  941. <P>
  942. The <em>Jacobian matrix</em> is stored as side effect the shared
  943. variable <em>jacobian</em>.
  944. <P>
  945. <P>
  946. <P> <H3>
  947. examples: </H3>
  948. <p><pre><tt>
  949. num_solve({sin x=cos y, x + y = 1},{x=1,y=2});
  950. {X= - 1.8561957251,Y=2.856195584}
  951. jacobian;
  952. [COS(X) SIN(Y)]
  953. [ ]
  954. [ 1 1 ]
  955. </tt></pre><p>
  956. <a name=r38_0428>
  957. <title>num_int</title></a>
  958. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  959. E"></p>
  960. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  961. <b>NUM_INT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  962. <P>
  963. <P>
  964. <P>
  965. For the numerical evaluation of univariate integrals
  966. over a finite interval the following strategy is used:
  967. If
  968. <a href=r38_0150.html#r38_0154>int</a> finds a formal antiderivative
  969. which is bounded in the integration interval, this
  970. is evaluated and the end points and the difference
  971. is returned.
  972. Otherwise a
  973. <a href=r38_0400.html#r38_0431>Chebyshev fit</a> is computed,
  974. starting with order 20, eventually up to order 80.
  975. If that is recognized as sufficiently convergent
  976. it is used for computing the integral by directly
  977. integrating the coefficient sequence.
  978. If none of these methods is successful, an
  979. adaptive multilevel quadrature algorithm is used.
  980. <P>
  981. <P>
  982. For multivariate integrals only the adaptive quadrature is used.
  983. This algorithm tolerates isolated singularities.
  984. The value <em>iterations</em> here limits the number of
  985. local interval intersection levels.
  986. &lt;a&gt; is a measure for the relative total discretization
  987. error (comparison of order 1 and order 2 approximations).
  988. <P>
  989. <P>
  990. <P> <H3>
  991. syntax: </H3>
  992. <em>num_int</em>(&lt;exp&gt;,&lt;var&gt;=(&lt;l&gt; .. &lt;u&gt;)
  993. [,&lt;var&gt;=(&lt;l&gt; .. &lt;u&gt;),...]
  994. [,accuracy=&lt;a&gt;][,iterations=&lt;i&gt;])
  995. <P>
  996. <P>
  997. <P>
  998. where &lt;exp&gt; is the function to be integrated,
  999. &lt;var&gt; are the integration variables,
  1000. &lt;l&gt; are the lower bounds,
  1001. &lt;u&gt; are the upper bounds.
  1002. <P>
  1003. <P>
  1004. Result is the value of the integral.
  1005. <P>
  1006. <P>
  1007. <P> <H3>
  1008. examples: </H3>
  1009. <p><pre><tt>
  1010. num_int(sin x,x=(0 .. 3.1415926));
  1011. 2.0000010334
  1012. </tt></pre><p>
  1013. <a name=r38_0429>
  1014. <title>num_odesolve</title></a>
  1015. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1016. E"></p>
  1017. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1018. <b>NUM_ODESOLVE</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1019. <P>
  1020. <P>
  1021. <P>
  1022. The <em>Runge-Kutta</em> method of order 3 finds an approximate graph for
  1023. the solution of real <em>ODE initial value problem</em>.
  1024. <P>
  1025. <P>
  1026. <P> <H3>
  1027. syntax: </H3>
  1028. <em>num_odesolve</em>(&lt;exp&gt;,&lt;depvar&gt;=&lt;start&gt;,
  1029. &lt;indep&gt;=(&lt;from&gt; .. &lt;to&gt;)
  1030. [,accuracy=&lt;a&gt;][,iterations=&lt;i&gt;])
  1031. <P>
  1032. <P>
  1033. or
  1034. <P>
  1035. <P>
  1036. <em>num_odesolve</em>({&lt;exp&gt;,&lt;exp&gt;,...},
  1037. { &lt;depvar&gt;=&lt;start&gt;,&lt;depvar&gt;=&lt;start&gt;,...}
  1038. &lt;indep&gt;=(&lt;from&gt; .. &lt;to&gt;)
  1039. [,accuracy=&lt;a&gt;][,iterations=&lt;i&gt;])
  1040. <P>
  1041. <P>
  1042. <P>
  1043. <P>
  1044. where
  1045. &lt;depvar&gt; and &lt;start&gt; specify the dependent variable(s)
  1046. and the starting point value (vector),
  1047. &lt;indep&gt;, &lt;from&gt; and &lt;to&gt; specify the independent variable
  1048. and the integration interval (starting point and end point),
  1049. &lt;exp&gt; are equations or expressions which
  1050. contain the first derivative of the independent variable
  1051. with respect to the dependent variable.
  1052. <P>
  1053. <P>
  1054. The ODEs are converted to an explicit form, which then is
  1055. used for a Runge Kutta iteration over the given range. The
  1056. number of steps is controlled by the value of &lt;i&gt;
  1057. (default: 20). If the steps are too coarse to reach the desired
  1058. accuracy in the neighborhood of the starting point, the number is
  1059. increased automatically.
  1060. <P>
  1061. <P>
  1062. Result is a list of pairs, each representing a point of the
  1063. approximate solution of the ODE problem.
  1064. <P>
  1065. <P>
  1066. <P> <H3>
  1067. examples: </H3>
  1068. <p><pre><tt>
  1069. depend(y,x);
  1070. num_odesolve(df(y,x)=y,y=1,x=(0 .. 1), iterations=5);
  1071. ,{0.2,1.2214},{0.4,1.49181796},{0.6,1.8221064563},
  1072. {0.8,2.2255208258},{1.0,2.7182511366}}
  1073. </tt></pre><p>In most cases you must declare the dependency relation
  1074. between the variables explicitly using
  1075. <a href=r38_0150.html#r38_0192>depend</a>;
  1076. otherwise the formal derivative might be converted to zero.
  1077. <P>
  1078. <P>
  1079. The operator
  1080. <a href=r38_0150.html#r38_0179>solve</a> is used to convert the form into
  1081. an explicit ODE. If that process fails or if it has no unique result,
  1082. the evaluation is stopped with an error message.
  1083. <P>
  1084. <P>
  1085. <a name=r38_0430>
  1086. <title>bounds</title></a>
  1087. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1088. E"></p>
  1089. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1090. <b>BOUNDS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1091. <P>
  1092. <P>
  1093. <P>
  1094. Upper and lower bounds of a real valued function over an
  1095. <a href=r38_0400.html#r38_0423>interval</a> or a rectangular multivariate domain
  1096. are computed
  1097. by the operator <em>bounds</em>. The algorithmic basis is the computation
  1098. with inequalities: starting from the interval(s) of the
  1099. variables, the bounds are propagated in the expression
  1100. using the rules for inequality computation. Some knowledge
  1101. about the behavior of special functions like ABS, SIN, COS, EXP, LOG,
  1102. fractional exponentials etc. is integrated and can be evaluated
  1103. if the operator <em>bounds</em> is called with rounded mode on
  1104. (otherwise only algebraic evaluation rules are available).
  1105. <P>
  1106. <P>
  1107. If <em>bounds</em> finds a singularity within an interval, the evaluation
  1108. is stopped with an error message indicating the problem part
  1109. of the expression.
  1110. <P>
  1111. <P>
  1112. <P> <H3>
  1113. syntax: </H3>
  1114. <em>bounds</em>(&lt;exp&gt;,&lt;var&gt;=(&lt;l&gt; .. &lt;u&gt;)
  1115. [,&lt;var&gt;=(&lt;l&gt; .. &lt;u&gt;) ...])
  1116. <P>
  1117. <P>
  1118. or
  1119. <P>
  1120. <P>
  1121. <em>bounds</em>(&lt;exp&gt;,{&lt;var&gt;=(&lt;l&gt; .. &lt;u&gt;)
  1122. [,&lt;var&gt;=(&lt;l&gt; .. &lt;u&gt;) ...]})
  1123. <P>
  1124. <P>
  1125. <P>
  1126. <P>
  1127. where &lt;exp&gt; is the function to be investigated,
  1128. &lt;var&gt; are the variables of &lt;exp&gt;,
  1129. &lt;l&gt; and &lt;u&gt; specify the area as set of
  1130. <a href=r38_0400.html#r38_0423>interval</a><em>s</em>.
  1131. <P>
  1132. <P>
  1133. <em>bounds</em>computes upper and lower bounds for the expression in the
  1134. given area. An
  1135. <a href=r38_0400.html#r38_0423>interval</a> is returned.
  1136. <P>
  1137. <P>
  1138. <P> <H3>
  1139. examples: </H3>
  1140. <p><pre><tt>
  1141. bounds(sin x,x=(1 .. 2));
  1142. -1 .. 1
  1143. on rounded;
  1144. bounds(sin x,x=(1 .. 2));
  1145. 0.84147098481 .. 1
  1146. bounds(x**2+x,x=(-0.5 .. 0.5));
  1147. - 0.25 .. 0.75
  1148. </tt></pre><p>
  1149. <a name=r38_0431>
  1150. <title>Chebyshev_fit</title></a>
  1151. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1152. E"></p>
  1153. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1154. <b>CHEBYSHEV FIT</b><P>
  1155. <P>
  1156. <P>
  1157. <P>
  1158. The operator family <em>Chebyshev_...</em> implements approximation
  1159. and evaluation of functions by the Chebyshev method.
  1160. Let <em>T(n,a,b,x)</em> be the Chebyshev polynomial of order <em>n</em>
  1161. transformed to the interval <em>(a,b)</em>.
  1162. Then a function <em>f(x)</em> can be
  1163. approximated in <em>(a,b)</em> by a series
  1164. <P>
  1165. <P>
  1166. <p><pre><tt>
  1167. for i := 0:n sum c(i)*T(i,a,b,x)
  1168. </tt></pre><p>The operator <em>chebyshev_fit</em> computes this approximation an
  1169. d
  1170. returns a list, which has as first element the sum expressed
  1171. as a polynomial and as second element the sequence
  1172. of Chebyshev coefficients.
  1173. <em>Chebyshev_df</em> and <em>Chebyshev_int</em> transform a Chebyshev
  1174. coefficient list into the coefficients of the corresponding
  1175. derivative or integral respectively. For evaluating a Chebyshev
  1176. approximation at a given point in the basic interval the
  1177. operator <em>Chebyshev_eval</em> can be used.
  1178. <em>Chebyshev_eval</em> is based on a recurrence relation which is
  1179. in general more stable than a direct evaluation of the
  1180. complete polynomial.
  1181. <P>
  1182. <P>
  1183. <P> <H3>
  1184. syntax: </H3>
  1185. <em>chebyshev_fit</em>(&lt;fcn&gt;,&lt;var&gt;=(&lt;lo&gt; .. &lt;hi&gt;),&lt;n
  1186. &gt;)
  1187. <P>
  1188. <P>
  1189. <em>chebyshev_eval</em>(&lt;coeffs&gt;,&lt;var&gt;=(&lt;lo&gt; .. &lt;hi&gt;),
  1190. &lt;var&gt;=&lt;pt&gt;)
  1191. <P>
  1192. <P>
  1193. <em>chebyshev_df</em>(&lt;coeffs&gt;,&lt;var&gt;=(&lt;lo&gt; .. &lt;hi&gt;))
  1194. <P>
  1195. <P>
  1196. <em>chebyshev_int</em>(&lt;coeffs&gt;,&lt;var&gt;=(&lt;lo&gt; .. &lt;hi&gt;))
  1197. <P>
  1198. <P>
  1199. <P>
  1200. where &lt;fcn&gt; is an algebraic expression (the target function),
  1201. &lt;var&gt; is the variable of &lt;fcn&gt;,
  1202. &lt;lo&gt; and &lt;hi&gt; are
  1203. numerical real values which describe an
  1204. <a href=r38_0400.html#r38_0423>interval</a> &lt;lo&gt; &lt;&lt;hi&gt;,
  1205. the integer &lt;n&gt; is the approximation order (set to 20 if missing),
  1206. &lt;pt&gt; is a number in the interval and &lt;coeffs&gt; is
  1207. a series of Chebyshev coefficients.
  1208. <P>
  1209. <P>
  1210. <P> <H3>
  1211. examples: </H3>
  1212. <p><pre><tt>
  1213. on rounded;
  1214. w:=chebyshev_fit(sin x/x,x=(1 .. 3),5);
  1215. 3 2
  1216. w := {0.03824*x - 0.2398*x + 0.06514*x + 0.9778,
  1217. {0.8991,-0.4066,-0.005198,0.009464,-0.00009511}}
  1218. chebyshev_eval(second w, x=(1 .. 3), x=2.1);
  1219. 0.4111
  1220. </tt></pre><p>
  1221. <a name=r38_0432>
  1222. <title>num_fit</title></a>
  1223. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1224. E"></p>
  1225. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1226. <b>NUM_FIT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1227. <P>
  1228. <P>
  1229. <P>
  1230. The operator <em>num_fit</em> finds for a set of
  1231. points the linear combination of a given set of
  1232. functions (function basis) which approximates the
  1233. points best under the objective of the <em>least squares</em>
  1234. criterion (minimum of the sum of the squares of the deviation).
  1235. The solution is found as zero of the
  1236. gradient vector of the sum of squared errors.
  1237. <P>
  1238. <P>
  1239. <P> <H3>
  1240. syntax: </H3>
  1241. <em>num_fit</em>(&lt;vals&gt;,&lt;basis&gt;,&lt;var&gt;=&lt;pts&gt;)
  1242. <P>
  1243. <P>
  1244. <P>
  1245. where &lt;vals&gt; is a list of numeric values,
  1246. &lt;var&gt; is a variable used for the approximation,
  1247. &lt;pts&gt; is a list of coordinate values which correspond to
  1248. &lt;var&gt;,
  1249. &lt;basis&gt; is a set of functions varying in <em>var</em> which is used
  1250. for the approximation.
  1251. <P>
  1252. <P>
  1253. The result is a list containing as first element the
  1254. function which approximates the given values, and as
  1255. second element a list of coefficients which were used
  1256. to build this function from the basis.
  1257. <P>
  1258. <P>
  1259. <P> <H3>
  1260. examples: </H3>
  1261. <p><pre><tt>
  1262. pts:=for i:=1 step 1 until 5 collect i$
  1263. vals:=for i:=1 step 1 until 5 collect
  1264. for j:=1:i product j$
  1265. num_fit(vals,{1,x,x**2},x=pts);
  1266. 2
  1267. {14.571428571*X - 61.428571429*X + 54.6,{54.6,
  1268. - 61.428571429,14.571428571}}
  1269. </tt></pre><p>
  1270. <a name=r38_0433>
  1271. <title>Numeric Package</title></a>
  1272. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1273. E"></p>
  1274. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1275. <b>Numeric Package</b><menu>
  1276. <li><a href=r38_0400.html#r38_0422>Numeric Package introduction</a><P>
  1277. <li><a href=r38_0400.html#r38_0423>Interval type</a><P>
  1278. <li><a href=r38_0400.html#r38_0424>numeric accuracy concept</a><P>
  1279. <li><a href=r38_0400.html#r38_0425>TRNUMERIC switch</a><P>
  1280. <li><a href=r38_0400.html#r38_0426>num_min operator</a><P>
  1281. <li><a href=r38_0400.html#r38_0427>num_solve operator</a><P>
  1282. <li><a href=r38_0400.html#r38_0428>num_int operator</a><P>
  1283. <li><a href=r38_0400.html#r38_0429>num_odesolve operator</a><P>
  1284. <li><a href=r38_0400.html#r38_0430>bounds operator</a><P>
  1285. <li><a href=r38_0400.html#r38_0431>Chebyshev fit concept</a><P>
  1286. <li><a href=r38_0400.html#r38_0432>num_fit operator</a><P>
  1287. </menu>
  1288. <a name=r38_0434>
  1289. <title>Roots_Package</title></a>
  1290. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1291. E"></p>
  1292. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1293. <b>ROOTS PACKAGE</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>introduction</b><P>
  1294. <P>
  1295. <P>
  1296. <P>
  1297. The root finding package is designed so that it can
  1298. be used to find some or all of the roots of univariate
  1299. polynomials with real or complex coefficients, to the accuracy
  1300. specified by the user.
  1301. <P>
  1302. <P>
  1303. Not all operators of <em>roots package</em> are described here. For using
  1304. the operators
  1305. <P>
  1306. <P>
  1307. <em>isolater</em>(intervals isolating real roots)
  1308. <P>
  1309. <P>
  1310. <em>rlrootno</em>(number of real roots in an interval)
  1311. <P>
  1312. <P>
  1313. <em>rootsat-prec</em>(roots at system precision)
  1314. <P>
  1315. <P>
  1316. <em>rootval</em>(result in equation form)
  1317. <P>
  1318. <P>
  1319. <em>firstroot</em>(computing only one root)
  1320. <P>
  1321. <P>
  1322. <em>getroot</em>(selecting roots from a collection)
  1323. <P>
  1324. <P>
  1325. please consult the full documentation of the package.
  1326. <P>
  1327. <P>
  1328. <a name=r38_0435>
  1329. <title>MKPOLY</title></a>
  1330. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1331. E"></p>
  1332. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1333. <b>MKPOLY</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1334. <P>
  1335. <P>
  1336. <P>
  1337. Given a roots list as returned by
  1338. <a href=r38_0400.html#r38_0439>roots</a>,
  1339. the operator <em>mkpoly</em> constructs a
  1340. polynomial which has these numbers as roots.
  1341. <P> <H3>
  1342. syntax: </H3>
  1343. <P>
  1344. <P>
  1345. <em>mkpoly</em>&lt;rl&gt;
  1346. <P>
  1347. <P>
  1348. <P>
  1349. where &lt;rl&gt; is a
  1350. <a href=r38_0050.html#r38_0053>list</a> with equations, which
  1351. all have the same
  1352. <a href=r38_0001.html#r38_0002>kernel</a> on their left-hand sides
  1353. and numbers as right-hand sides.
  1354. <P>
  1355. <P>
  1356. <P> <H3>
  1357. examples: </H3>
  1358. <p><pre><tt>
  1359. mkpoly{x=1,x=-2,x=i,x=-i};
  1360. x**4 + x**3 - x**2 + x - 2
  1361. </tt></pre><p>Note that this polynomial is unique only up to a numeric
  1362. factor.
  1363. <P>
  1364. <P>
  1365. <a name=r38_0436>
  1366. <title>NEARESTROOT</title></a>
  1367. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1368. E"></p>
  1369. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1370. <b>NEARESTROOT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1371. <P>
  1372. <P>
  1373. <P>
  1374. The operator <em>nearestroot</em> finds one root of a polynomial
  1375. with an iteration using a given starting point.
  1376. <P>
  1377. <P>
  1378. <P> <H3>
  1379. syntax: </H3>
  1380. <em>nearestroot</em>(&lt;p&gt;,&lt;pt&gt;)
  1381. <P>
  1382. <P>
  1383. <P>
  1384. where &lt;p&gt; is a univariate polynomial
  1385. and &lt;pt&gt; is a number.
  1386. <P>
  1387. <P>
  1388. <P> <H3>
  1389. examples: </H3>
  1390. <p><pre><tt>
  1391. nearestroot(x^2+2,2);
  1392. {x=1.41421*i}
  1393. </tt></pre><p>The minimal accuracy of the result values is controlled by
  1394. <a href=r38_0400.html#r38_0438>rootacc</a>.
  1395. <P>
  1396. <P>
  1397. <a name=r38_0437>
  1398. <title>REALROOTS</title></a>
  1399. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1400. E"></p>
  1401. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1402. <b>REALROOTS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1403. <P>
  1404. <P>
  1405. <P>
  1406. The operator <em>realroots</em> finds that real roots of a polynomial
  1407. to an accuracy that is sufficient to separate them and which is
  1408. a minimum of 6 decimal places.
  1409. <P>
  1410. <P>
  1411. <P> <H3>
  1412. syntax: </H3>
  1413. <em>realroots</em>(&lt;p&gt;) or
  1414. <P>
  1415. <P>
  1416. <em>realroots</em>(&lt;p&gt;,&lt;from&gt;,&lt;to&gt;)
  1417. <P>
  1418. <P>
  1419. <P>
  1420. where &lt;p&gt; is a univariate polynomial.
  1421. The optional parameters &lt;from&gt; and &lt;to&gt; classify
  1422. an interval: if given, exactly the real roots in this
  1423. interval will be returned. &lt;from&gt; and &lt;to&gt;
  1424. can also take the values <em>infinity</em> or <em>-infinity</em>.
  1425. If omitted all real roots will be returned.
  1426. Result is a
  1427. <a href=r38_0050.html#r38_0053>list</a>
  1428. of equations which represent the roots of the polynomial at the
  1429. given accuracy.
  1430. <P>
  1431. <P>
  1432. <P> <H3>
  1433. examples: </H3>
  1434. <p><pre><tt>
  1435. realroots(x^5-2);
  1436. {x=1.1487}
  1437. realroots(x^3-104*x^2+403*x-300,2,infinity);
  1438. {x=3.0,x=100.0}
  1439. realroots(x^3-104*x^2+403*x-300,-infinity,2);
  1440. {x=1}
  1441. </tt></pre><p>The minimal accuracy of the result values is controlled by
  1442. <a href=r38_0400.html#r38_0438>rootacc</a>.
  1443. <P>
  1444. <P>
  1445. <a name=r38_0438>
  1446. <title>ROOTACC</title></a>
  1447. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1448. E"></p>
  1449. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1450. <b>ROOTACC</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1451. <P>
  1452. <P>
  1453. <P>
  1454. The operator <em>rootacc</em> allows you to set the accuracy
  1455. up to which the roots package computes its results.
  1456. <P> <H3>
  1457. syntax: </H3>
  1458. <P>
  1459. <P>
  1460. <em>rootacc</em>(&lt;n&gt;)
  1461. <P>
  1462. <P>
  1463. <P>
  1464. Here &lt;n&gt; is an integer value. The internal accuracy of
  1465. the <em>roots</em> package is adjusted to a value of
  1466. <em>max(6,n)</em>. The default value is <em>6</em>.
  1467. <P>
  1468. <P>
  1469. <a name=r38_0439>
  1470. <title>ROOTS</title></a>
  1471. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1472. E"></p>
  1473. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1474. <b>ROOTS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1475. <P>
  1476. <P>
  1477. <P>
  1478. The operator <em>roots</em>
  1479. is the main top level function of the roots package.
  1480. It will find all roots, real and complex, of the polynomial p
  1481. to an accuracy that is sufficient to separate them and which is
  1482. a minimum of 6 decimal places.
  1483. <P>
  1484. <P>
  1485. <P> <H3>
  1486. syntax: </H3>
  1487. <em>roots</em>(&lt;p&gt;)
  1488. <P>
  1489. <P>
  1490. <P>
  1491. where &lt;p&gt; is a univariate polynomial. Result is a
  1492. <a href=r38_0050.html#r38_0053>list</a>
  1493. of equations which represent the roots of the polynomial at the
  1494. given accuracy. In addition, <em>roots</em> stores
  1495. separate lists of real roots and complex roots in the global
  1496. variables
  1497. <a href=r38_0400.html#r38_0442>rootsreal</a> and
  1498. <a href=r38_0400.html#r38_0441>rootscomplex</a>.
  1499. <P>
  1500. <P>
  1501. <P> <H3>
  1502. examples: </H3>
  1503. <p><pre><tt>
  1504. roots(x^5-2);
  1505. {x=-0.929316 + 0.675188*i,
  1506. x=-0.929316 - 0.675188*i,
  1507. x=0.354967 + 1.09248*i,
  1508. x=0.354967 - 1.09248*i,
  1509. x=1.1487}
  1510. </tt></pre><p>The minimal accuracy of the result values is controlled by
  1511. <a href=r38_0400.html#r38_0438>rootacc</a>.
  1512. <P>
  1513. <P>
  1514. <a name=r38_0440>
  1515. <title>ROOT_VAL</title></a>
  1516. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1517. E"></p>
  1518. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1519. <b>ROOT\_VAL</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1520. <P>
  1521. <P>
  1522. <P>
  1523. The operator <em>root_val</em> computes the roots of a
  1524. univariate polynomial at system precision
  1525. (or greater if required for root separation) and presents
  1526. its result as a list of numbers.
  1527. <P> <H3>
  1528. syntax: </H3>
  1529. <P>
  1530. <P>
  1531. <em>roots</em>(&lt;p&gt;)
  1532. <P>
  1533. <P>
  1534. <P>
  1535. where &lt;p&gt; is a univariate polynomial.
  1536. <P>
  1537. <P>
  1538. <P> <H3>
  1539. examples: </H3>
  1540. <p><pre><tt>
  1541. root_val(x^5-2);
  1542. {-0.929316490603 + 0.6751879524*i,
  1543. -0.929316490603 - 0.6751879524*i,
  1544. 0.354967313105 + 1.09247705578*i,
  1545. 0.354967313105 - 1.09247705578*i,
  1546. 1.148698355}
  1547. </tt></pre><p>
  1548. <a name=r38_0441>
  1549. <title>ROOTSCOMPLEX</title></a>
  1550. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1551. E"></p>
  1552. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1553. <b>ROOTSCOMPLEX</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>variable</b><P>
  1554. <P>
  1555. <P>
  1556. <P>
  1557. When the operator
  1558. <a href=r38_0400.html#r38_0439>roots</a> is called the complex
  1559. roots are collected in the global variable <em>rootscomplex</em>
  1560. as
  1561. <a href=r38_0050.html#r38_0053>list</a>.
  1562. <P>
  1563. <P>
  1564. <a name=r38_0442>
  1565. <title>ROOTSREAL</title></a>
  1566. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1567. E"></p>
  1568. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1569. <b>ROOTSREAL</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>variable</b><P>
  1570. <P>
  1571. <P>
  1572. <P>
  1573. When the operator
  1574. <a href=r38_0400.html#r38_0439>roots</a> is called the real
  1575. roots are collected in the global variable <em>rootreal</em>
  1576. as
  1577. <a href=r38_0050.html#r38_0053>list</a>.
  1578. <P>
  1579. <P>
  1580. <a name=r38_0443>
  1581. <title>Roots Package</title></a>
  1582. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1583. E"></p>
  1584. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1585. <b>Roots Package</b><menu>
  1586. <li><a href=r38_0400.html#r38_0434>Roots Package introduction</a><P>
  1587. <li><a href=r38_0400.html#r38_0435>MKPOLY operator</a><P>
  1588. <li><a href=r38_0400.html#r38_0436>NEARESTROOT operator</a><P>
  1589. <li><a href=r38_0400.html#r38_0437>REALROOTS operator</a><P>
  1590. <li><a href=r38_0400.html#r38_0438>ROOTACC operator</a><P>
  1591. <li><a href=r38_0400.html#r38_0439>ROOTS operator</a><P>
  1592. <li><a href=r38_0400.html#r38_0440>ROOT\_VAL operator</a><P>
  1593. <li><a href=r38_0400.html#r38_0441>ROOTSCOMPLEX variable</a><P>
  1594. <li><a href=r38_0400.html#r38_0442>ROOTSREAL variable</a><P>
  1595. </menu>
  1596. <a name=r38_0444>
  1597. <title>Special_Function_Package</title></a>
  1598. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1599. E"></p>
  1600. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1601. <b>SPECIAL FUNCTION PACKAGE</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>introduction</b>
  1602. <P>
  1603. <P>
  1604. The REDUCE <em>Special Function Package</em> supplies extended
  1605. algebraic and numeric support for a wide class of objects.
  1606. This package was released together with REDUCE 3.5 (October 1993)
  1607. for the first time, a major update is released with REDUCE 3.6.
  1608. <P>
  1609. <P>
  1610. The functions included in this package are in most cases (unless otherwise
  1611. stated) defined and named like in the book by Abramowitz and Stegun:
  1612. Handbook of Mathematical Functions, Dover Publications.
  1613. <P>
  1614. <P>
  1615. The aim is to collect as much information on the special functions
  1616. and simplification capabilities as possible,
  1617. i.e. algebraic simplifications and numeric (rounded mode) code, limits
  1618. of the functions together
  1619. with the definitions of the functions, which are in most cases a power
  1620. series, a (definite) integral and/or a differential equation.
  1621. <P>
  1622. <P>
  1623. What can be found: Some famous constants, a variety of Bessel functions,
  1624. special polynomials,
  1625. the Gamma function, the (Riemann) Zeta function, Elliptic Functions, Elliptic
  1626. Integrals, 3J symbols (Clebsch-Gordan coefficients) and integral functions.
  1627. <P>
  1628. <P>
  1629. What is missing: Mathieu functions, LerchPhi, etc..
  1630. The information about the special functions which solve certain
  1631. differential equation is very limited.
  1632. In several cases numerical approximation is restricted to real
  1633. arguments or is missing completely.
  1634. <P>
  1635. <P>
  1636. The implementation of this package uses REDUCE rule sets to a large extent,
  1637. which guarantees a high 'readability' of the functions definitions in the
  1638. source file directory. It makes extensions to the special
  1639. functions code easy in most cases too. To look at these rules
  1640. it may be convenient to use the showrules operator e.g.
  1641. <P>
  1642. <P>
  1643. <a href=r38_0150.html#r38_0178>showrules</a>Besseli;
  1644. <P>
  1645. <P>
  1646. .
  1647. <P>
  1648. <P>
  1649. Some evaluations are improved if the special function package is loaded,
  1650. e.g. some (infinite) sums and products leading to expressions including
  1651. special functions are known in this case.
  1652. <P>
  1653. <P>
  1654. Note: The special function package has to be loaded explicitly by calling
  1655. <p><pre><tt>
  1656. load_package specfn;
  1657. </tt></pre><p><P>
  1658. <P>
  1659. The functions
  1660. <a href=r38_0500.html#r38_0530>MeijerG</a> and
  1661. <a href=r38_0500.html#r38_0529>hypergeometric</a> require
  1662. additionally
  1663. <p><pre><tt>
  1664. load_package specfn2;
  1665. </tt></pre><p><P>
  1666. <P>
  1667. <a name=r38_0445>
  1668. <title>Constants</title></a>
  1669. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1670. E"></p>
  1671. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1672. <b>CONSTANTS</b><P>
  1673. <P>
  1674. <P>
  1675. <P>
  1676. There are a few constants known to the special function package, namely
  1677. <P>
  1678. <P>
  1679. _ _ _ <em>Euler's constant </em>(which can be computed as -
  1680. <a href=r38_0450.html#r38_0494>Psi</a>(1)) and
  1681. <P>
  1682. _ _ _ <em>Khinchin's constant</em> (which is defined in Khinchin's book
  1683. ``Continued Fractions'') and
  1684. <P>
  1685. _ _ _ <em>Golden_Ratio</em> (which can be computed as (1 + sqrt 5)/2) and
  1686. <P>
  1687. _ _ _ <em>Catalan's constant</em> (which is known as an infinite sum of recipro
  1688. cal
  1689. powers)
  1690. <P>
  1691. <P>
  1692. <P> <H3>
  1693. examples: </H3>
  1694. <p><pre><tt>
  1695. on rounded;
  1696. Euler_Gamma;
  1697. 0.577215664902
  1698. Khinchin;
  1699. 2.68545200107
  1700. Catalan
  1701. 0.915965594177
  1702. Golden_Ratio
  1703. 1.61803398875
  1704. </tt></pre><p>
  1705. <a name=r38_0446>
  1706. <title>BERNOULLI</title></a>
  1707. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1708. E"></p>
  1709. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1710. <b>BERNOULLI</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1711. <P>
  1712. The <em>bernoulli</em> operator returns the nth Bernoulli number.
  1713. <P>
  1714. <P>
  1715. <P> <H3>
  1716. syntax: </H3>
  1717. <em>Bernoulli</em>(&lt;integer&gt;)
  1718. <P>
  1719. <P>
  1720. <P>
  1721. <P>
  1722. <P> <H3>
  1723. examples: </H3>
  1724. <p><pre><tt>
  1725. bernoulli 20;
  1726. - 174611 / 330
  1727. bernoulli 17;
  1728. 0
  1729. </tt></pre><p>All Bernoulli numbers with odd indices except for 1 are zero.
  1730. <P>
  1731. <P>
  1732. <P>
  1733. <a name=r38_0447>
  1734. <title>BERNOULLIP</title></a>
  1735. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1736. E"></p>
  1737. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1738. <b>BERNOULLIP</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1739. <P>
  1740. The <em>BernoulliP</em> operator returns the nth Bernoulli Polynomial
  1741. evaluated at x.
  1742. <P>
  1743. <P>
  1744. <P> <H3>
  1745. syntax: </H3>
  1746. <em>BernoulliP</em>(&lt;integer&gt;,&lt;expression&gt;)
  1747. <P>
  1748. <P>
  1749. <P>
  1750. <P>
  1751. <P> <H3>
  1752. examples: </H3>
  1753. <p><pre><tt>
  1754. BernoulliP(3,z);
  1755. 2
  1756. z*(2*z - 3*z + 1)/2
  1757. BernoulliP(10,3);
  1758. 338585 / 66
  1759. </tt></pre><p>The value of the nth Bernoulli Polynomial at 0 is the nth Bernoull
  1760. i number.
  1761. <P>
  1762. <P>
  1763. <P>
  1764. <a name=r38_0448>
  1765. <title>EULER</title></a>
  1766. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1767. E"></p>
  1768. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1769. <b>EULER</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1770. <P>
  1771. The <em>EULER</em> operator returns the nth Euler number.
  1772. <P>
  1773. <P>
  1774. <P> <H3>
  1775. syntax: </H3>
  1776. <em>Euler</em>(&lt;integer&gt;)
  1777. <P>
  1778. <P>
  1779. <P>
  1780. <P> <H3>
  1781. examples: </H3>
  1782. <p><pre><tt>
  1783. Euler 20;
  1784. 370371188237525
  1785. Euler 0;
  1786. 1
  1787. </tt></pre><p>The <em>Euler</em> numbers are evaluated by a recursive algorithm
  1788. which
  1789. makes it hard to compute Euler numbers above say 200.
  1790. <P>
  1791. <P>
  1792. Euler numbers appear in the coefficients of the power series
  1793. representation of 1/cos(z).
  1794. <P>
  1795. <P>
  1796. <P>
  1797. <a name=r38_0449>
  1798. <title>EULERP</title></a>
  1799. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1800. E"></p>
  1801. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1802. <b>EULERP</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1803. <P>
  1804. The <em>EulerP</em> operator returns the nth Euler Polynomial.
  1805. <P>
  1806. <P>
  1807. <P> <H3>
  1808. syntax: </H3>
  1809. <em>EulerP</em>(&lt;integer&gt;,&lt;expression&gt;)
  1810. <P>
  1811. <P>
  1812. <P>
  1813. <P> <H3>
  1814. examples: </H3>
  1815. <p><pre><tt>
  1816. EulerP(2,xx);
  1817. xx*(xx - 1)
  1818. EulerP(10,3);
  1819. 2046
  1820. </tt></pre><p>The Euler numbers are the values of the Euler Polynomials at 1/2
  1821. multiplied by 2**n.
  1822. <P>
  1823. <P>
  1824. <P>