### The Maxima on-line user's manual

Algebra Calculator

#### Dispform

Function: dispform (<expr>)

Function: dispform (<expr>, all) Returns the external representation of <expr>.

`dispform(<expr>)` returns the external representation with respect to the main (top-level) operator. `dispform(<expr>, all)` returns the external representation with respect to all operators in <expr>.

See also `part`, `inpart`, and `inflag`.

Examples:

The internal representation of `- x` is "negative one times `x`" while the external representation is "minus `x`".

```          (%i1) - x;
(%o1)                          - x
(%i2) ?format (true, "~S~%", %);
((MTIMES SIMP) -1 \$X)
(%o2)                         false
(%i3) dispform (- x);
(%o3)                          - x
(%i4) ?format (true, "~S~%", %);
((MMINUS SIMP) \$X)
(%o4)                         false```

The internal representation of `sqrt(x)` is "`x` to the power 1/2" while the external representation is "square root of `x`".

```          (%i1) sqrt (x);
(%o1)                        sqrt(x)
(%i2) ?format (true, "~S~%", %);
((MEXPT SIMP) \$X ((RAT SIMP) 1 2))
(%o2)                         false
(%i3) dispform (sqrt (x));
(%o3)                        sqrt(x)
(%i4) ?format (true, "~S~%", %);
((%SQRT SIMP) \$X)
(%o4)                         false```

Use of the optional argument `all`.

```          (%i1) expr : sin (sqrt (x));
(%o1)                     sin(sqrt(x))
(%i2) freeof (sqrt, expr);
(%o2)                         true
(%i3) freeof (sqrt, dispform (expr));
(%o3)                         true
(%i4) freeof (sqrt, dispform (expr, all));
(%o4)                         false```

```(%o1)                                true
(%i2) ```

? dispform;

Calculate

? dispform;

Calculate