# Automatic simplification: autosimplify

### 5.12.15 Automatic simplification: autosimplify

The autosimplify command determines how much simplification Xcas will do automatically when you enter an expression. Note that autosimplify only works with Xcas, it doesn’t work with icas or any other frontend.

By default, Xcas will apply the regroup command (see Section 5.12.12) to your input, but the autosimplify command can change this to applying another rewriting command to your input, such as simplify (see Section 5.12.14), factor (see Section 5.12.10), or even nop for no simplification. With no arguments, autosimplify will return the current rewriting command. Otherwise:

- autosimplify command takes one argument:
  cmd, a command that will be used to rewrite the results in Xcas.
- autosimplify(cmd) will tell Xcas to apply cmd to subsequent inputs. To change the simplification mode during a session, the autosimplify command should be on its own line.

#### Examples.

- Input:
  autosimplify(nop)
  then:
  1 + x^2 - 2
  Output:

  1 + x2 − 2

- Input:
  autosimplify(simplify)
  then:
  1 + x^2 - 2
  Output:

  x2−1

- Input:
  autosimplify(factor)
  then:
  1 + x^2 - 2
  Output:

  | ⎛ ⎝ | x−1 | ⎞ ⎠ | ⎛ ⎝ | x+1 | ⎞ ⎠

- Input:
  autosimplify(regroup)
  then:
  1 + x^2 - 2
  Output:

  x2−1