Documentation of $ev



The following flags are recognized by the function $ev and are listed in
the documentation in chapter 4. Command line:

Symbol      Type            evflag  Documentation

simp      - option variable - yes - No separate documentation
detout    - option variable - no  - 25. Matrices and Linear Algebra
float     - option variable - yes - 10. Floating Point
numer     - option variable - no  - 7. Simplification (special symbol)

noeval    - special symbol  - 7. Simplifications
nouns     - special symbol  - 7. Simplifications

pred      - special symbol  - 5. Operators (operator)
eval      - special symbol  - 5. Operators (operator)

expand    - special symbol  - 7. Simplification (no separate entry)
diff      - special symbol  - 19. Differentiation (no separate entry)
derivlist - special symbol  - 19. Differentiation (no separate entry)

Option variables:

The symbols $simp, $detout, $float, and $numer are implemented as option
variables. We can assign a value. The symbol is stored in the list
$myoptions, if we change the standard value. The symbols $simp and
$numer are declared as an evflag in addition, but not the symbols
$detout and $numer. The option variable $numer is documented as a
special symbol.

Special symbols:

The symbols $noeval, $nouns, $pred, $eval, $expand, $diff, and
$derivlist are recognized by the function $ev as special symbols and
work like other evaluation flags too. These symbols are not declared as
an evflag or an evfun. All special symbols are documented at further
places in the manual. The special symbols $pred, and $eval are
documented as an operator.

The special symbols $expand, $diff, and $derivlist represents functions
too and have no separate entry.

Undocumented special symbol:

The function $ev recognizes the special symbol $risch. It works like
$diff, but for integrals and calls the risch integrator, e.g.

(%i7) 'integrate(x^2,x),risch;
1. Trace: (RISCHINT '((MEXPT SIMP) $X 2) '$X)
1. Trace: RISCHINT ==> ((MTIMES RATSIMP) ((RAT) 1 3) ((MEXPT RATSIMP) $X
3))
(%o7) x^3/3

The following flags are summarized under the category "evaluation
flags":

%enumer, eval, evflag, evfun, infeval, noeval, nouns, pred


Suggested changes to get the documentation more consistent:

1. Separate documentation for the option variable $simp in 
   Chapter 7. Simplification.

2. $numer is an option variable not a special symbol.

3. $pred and $eval are special symbols and not operators. The
   documentation of $eval should be moved to chapter 4. Command Line, 
   the documentation of $pred to chapter 7. Simplification.

4. Adding documentation for the special symbol $risch.

5. All special symbols, which are known to the function $ev and all 
   option variables, which are declared to be an evflag should be added 
   to the category "evaluation flags". Perhaps we should extend the 
   category to "Evaluation flags and functions" and add the evaluation 
   functions too.

Two further corrections:

The manual says:

   "The @code{simp}, @code{numer}, @code{float}, and @code{pred}  
    switches may also be set locally in a block, or globally in 
    Maxima so that they will remain in effect until being reset."

$pred is not an option variable. It has no effect to set $pred. This
special symbol $pred should be cut out from the description above.

That is the actual behavior of Maxima, but the manual shows the
numerical value of sin(2): 

   (%i10) sin(x) + cos(y) + (w+1)^2 + 'diff (sin(w), w);
   (%o10) cos(y)+sin(x)+'diff(sin(w),w,1)+(w+1)^2
   (%i11) ev(%, sin, expand, diff, x=2, y=1);
   (%o11) cos(w)+w^2+2*w+sin(2)+cos(1)+1

The flag sin in (%i11) has no effect and it does not make sense to use
it, because simplifying functions like sin are not evaluated, but
simplified. We have to take the flag $numer in this example to show
numerically evaluation.

Dieter Kaiser