Controlling the Display of Large Expressions

When you do symbolic calculations, it is quite easy to end up with extremely complicated expressions. Often, you will not even want to see the complete result of a computation.

If you end your input with a semicolon, the Wolfram Language will do the computation you asked for, but will not display the result. You can nevertheless use % or (RefLink[Out, paclet:ref/Out])[n] to refer to the result.

By default, the Wolfram System front end will display any outputs which are excessively large in a shortened form inside an interface which allows you to refine the display of the output.

The Wolfram System shows this output with 5138 of the terms omitted:

Expand[(x + 2 y +1)^100]

The large output suppression feature is implemented using the Wolfram Language function (RefLink[Short, paclet:ref/Short]). You can use (RefLink[Short, paclet:ref/Short]) directly for finer control over the display of expressions. You can also use it for outputs that are not large enough to be suppressed by the default suppression scheme.

Ending your input with ; stops the Wolfram Language from displaying the complicated result of the computation:

Expand[(x+5 y+10)^8];

You can still refer to the result as %. //(RefLink[Short, paclet:ref/Short]) displays a one-line outline of the result. The <<n>> stands for n terms that have been left out:

%//Short

This shows a three-line version of the expression. More parts are now visible:

Short[%,3]

This gives the total number of terms in the sum:

Length[%]

Some ways to shorten your output.