redref1.tex 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. %%%
  2. %%% The tree structure for the information browser is
  3. %%% given by the \section, \subsection, \subsubsection commands
  4. %%%
  5. \section{System interaction}
  6. %%%
  7. %%% Environments like Switch serve a triple purpose:
  8. %%% - the node is defined
  9. %%% - an index entry "demo switch" is generated
  10. %%% - a cross reference with symbolic name "switch:demo" is generated.
  11. %%% This can be used used the \ref, \pageref, \nameref,
  12. %%% and \see commands.
  13. %%% Additional \index entries or cross reference keys can be generated
  14. %%% with the \index and \label commands.
  15. %%%
  16. \begin{Switch}{demo}
  17. The \name{demo} switch is used for interactive files, causing
  18. the system to pause after each command in the file until you type a
  19. \key{Return}. Default is \name{off}.
  20. %%%
  21. %%% The parts of a node are given as environments. Defined are:
  22. %%% Comments, Examples, Related
  23. %%%
  24. \begin{Comments}
  25. The switch \name{demo} has no effect on top level interactive
  26. statements. Use it when you want to slow down operations in a file
  27. so you can see what is happening.
  28. You can either include the \name{on demo} command in the file,
  29. or enter it from the top level before bringing in any file. Unlike
  30. the \name{pause} command, \name{on demo} does not permit you to
  31. interrupt the file for questions of your own.
  32. \end{Comments}
  33. %%%
  34. %%% The Related environment points to related information. It should
  35. %%% also use a cross ref, but that is not yet implemented
  36. %%%
  37. \begin{Related}
  38. \item [\name{in} command] Reading from files.
  39. \item [\name{echo} switch] Seeing what is read in.
  40. \end{Related}
  41. \end{Switch}
  42. \section{Polynomials}
  43. \subsection{Polynomial operators}
  44. \begin{Operator}{den}
  45. The {den} operator returns the denominator of its argument.
  46. %%%
  47. %%% The syntax description needs perhaps a bit more work.
  48. %%% \name and \arg are purely for printing (i.e. selecting a different
  49. %%% typeface
  50. %%%
  51. \begin{Syntax}
  52. \name{den}\(\arg{expression}\)
  53. \end{Syntax}
  54. \arg{expression} is ordinarily a rational expression, but may be
  55. any valid scalar \REDUCE\ expression.
  56. \begin{Examples}
  57. a := x**3 + 3*x**2 + 12*x; & A := X*(X^2 + 3*X + 12) \\
  58. b := 4*x*y + x*sin(x); & B := X*(SIN(X) + 4*Y) \\
  59. den(a/b); & SIN(X) + 4*Y \\
  60. den(a/4 + b/5); & 20 \\
  61. den(100/6); & 3 \\
  62. den(sin(x)); & 1 \\
  63. for i := 1:3 sum part(firstlis,i)*part(secondlis,i); &
  64. A*X + B*Y + C*Z
  65. \end{Examples}
  66. \end{Operator}
  67. \begin{Comments}
  68. \name{den} returns the denominator of the expression after it has
  69. been simplified by \REDUCE. As seen in the examples, this includes
  70. putting sums of rational expressions over a common denominator, and
  71. reducing common factors where possible. If the expression does not
  72. have any other denominator, $1$ is returned.
  73. Switch settings, such as \name{mcd} or \name{rational}, have an
  74. effect on the denominator of an expression.
  75. \end{Comments}
  76. \subsection{Dependency information}
  77. \begin{Declaration}{depend}
  78. \name{depend} declares that its first argument depends on the rest
  79. of its arguments.
  80. \begin{Syntax}
  81. \name{depend} \arg{kernel}\{,\arg{kernel}\}\repeated
  82. \end{Syntax}
  83. \arg{kernel} must be a legal variable name or a prefix operator
  84. \see{kernel}).
  85. \begin{Examples}
  86. depend y,x; \\
  87. df(y**2,x); & 2*DF(Y,X)*Y \\
  88. depend z,cos(x),y; \\
  89. df(sin(z),cos(x)); & COS(Z)*DF(Z,COS(X)) \\
  90. df(z**2,x); & 2*DF(Z,X)*Z \\
  91. nodepend z,y; \\
  92. df(z**2,x); & 2*DF(Z,X)*Z \\
  93. cc := df(y**2,x); & CC := 2*DF(Y,x)*Y \\
  94. y := tan x; & Y := TAN(X) \\
  95. cc; & 2*TAN(X)*(TAN(X)^{2} + 1)
  96. \end{Examples}
  97. \begin{Comments}
  98. Dependencies can be removed by using the declaration
  99. \nameref{nodepend}. The differentiation opeartor uses this
  100. information, as shown in the examples above. Linear operators alos
  101. use knowledge of dependencies (see \nameref{linear}). Note that
  102. dependencies can be nested: Having declared $y$ to depend on $x$,
  103. and $z$ to depend on $y$, we see that the chain rule was applied
  104. to the derivative of a function of $z$ with respect to $x$. If the
  105. explicit function of the dependencyis later entered into the
  106. system, terms with \name{DF(Y,X)}, for example, are expanded when
  107. they are displayed again, as shown in the last example.
  108. \end{Comments}
  109. \end{Declaration}
  110. \section{The Taylor package}
  111. \begin{Operator}{taylor}
  112. The \name{taylor} operator is used for expansion in power
  113. series\index{series}.
  114. \begin{Syntax}
  115. \name{taylor}\(\arg{expression},%
  116. \{\arg{kernel},\arg{expression},\arg{integer}\}%
  117. \repeated\)
  118. \end{Syntax}
  119. This returns the expansion of the first argument with respect to
  120. \arg{kernel} about \arg{expression} to order \arg{integer}.
  121. \begin{Examples}
  122. taylor(e^(x^2+y^2),x,0,2,y,0,2); &
  123. 1 + Y^2 + X^2 + Y^2*X^2 + O(X^{3},Y^{3})\\
  124. taylor(log(1+x),x,0,2); & X - \rfrac{1}{2}*X^{2} + O(X^{3})
  125. \end{Examples}
  126. \begin{Comments}
  127. The expansion is performed variable per variable, i.e.\ in the
  128. example above by first expanding $\exp(x^{2}+y^{2})$ with respect
  129. to $x$ and then expanding every coefficient with respect to $y$.
  130. If the switch \nameref{taylorkeeporiginal} is set to \name{on} the
  131. original expression is kept for later reference.
  132. Printing is controlled by the variable \nameref{taylorprintterms}.
  133. \end{Comments}
  134. \begin{Related}
  135. \item[tps] Truncated Power Series.
  136. \item[Koepf] Complete power series
  137. \end{Related}
  138. \end{Operator}
  139. \subsection{Controlling the package}
  140. \begin{Switch}{taylorkeeporiginal}
  141. The \name{taylorkeeporiginal} switch determines whether the
  142. \nameref{taylor} operator keeps the expression to be expanded for
  143. later use. Default is \name{on}.
  144. \end{Switch}
  145. \begin{Operator}{taylororiginal}
  146. \name{taylororiginal} extracts the original expression from a Taylor
  147. kernel.
  148. \begin{Syntax}
  149. \name{taylororiginal}\(\arg{taylor\_kernel}\)
  150. \end{Syntax}
  151. If the argument is not a Taylor kernel, or if the expression was not
  152. kept, an error is signaled.
  153. \end{Operator}
  154. \begin{Variable}{taylorprintterms}
  155. Only a certain number of (non-zero) coefficients of a Taylor
  156. kernel are printed usually. If there are more, \verb|...| is
  157. printed as part of the expression to indicate this. The number of
  158. terms printed is given by the value of the shared algebraic
  159. variable \nameref{taylorprintterms}. Allowed values are integers
  160. and the special identifier \name{all}. The latter setting
  161. specifies that all terms are to be printed. The default setting is
  162. $5$.
  163. \end{Variable}