This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Expand

Expand[expr]
expands out products and positive integer powers in expr.
Expand
leaves unexpanded any parts of expr that are free of the pattern patt. »
  • Expand works only on positive integer powers.
  • Expand applies only to the top level in expr.
  • Expand automatically threads over lists in expr, as well as equations, inequalities and logic functions.
Expand polynomial expressions:
Expand polynomial expressions:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
Variables need not be symbols:
Some powers can be symbolic:
Expand does not go into subexpressions; ExpandAll does:
Leave parts free of unexpanded:
Leave parts free of unexpanded:
Leave anything not matching unexpanded:
Work in the field GF(2):
The modulus does not have to be a prime:
Expand a trigonometric expression:
Many functions give results in unexpanded form:
Factor is essentially the inverse of Expand:
When no powers are involved, Distribute gives the same results as Expand:
Direct application of the distributive law often generates far more terms than are needed:
Create a nested pattern corresponding to an additive cellular automaton (rule 60):
New in 1 | Last modified in 6