Expand2
Expand2[exp, x]
expands all sums containing x
.
Expand2[exp, {x1, x2, ...}]
expands all sums containing x1, x2, ...
.
See also
Overview, ExpandAll2.
Examples
Expand2[(x1 + x2 + x3) (2 x1 + 3 x2) + (y1 + y2 + y3) (2 y1 + 3 y2)]
2x12+5x1x2+2x1x3+3x22+3x2x3+2y12+5y1y2+2y1y3+3y22+3y2y3
Expand2[(x1 + x2 + x3) (2 x1 + 3 x2) + (y1 + y2 + y3) (2 y1 + 3 y2), {y1, y2}]
(2x1+3x2)(x1+x2+x3)+2y12+5y1y2+2y1y3+3y22+3y2y3
Expand2[(x1 + x2 + x3) (2 x1 + 3 x2) + (y1 + y2 + y3) (2 y1 + 3 y2), {x1, x2}]
2x12+5x1x2+2x1x3+3x22+3x2x3+(2y1+3y2)(y1+y2+y3)