EXPAN

Member Of Menu: 
Algebra
Argument Types: 
Real
Complex
Symbol
Expression
Result Type(s): 
Real
Complex
Symbol
Expression
Invertible: 
No
Valid In Expression: 
No
Stack Diagram: 
Real1 Real2
Complex1 Complex2
Symbol1 Symbol2
Expression1 Expression2

The EXPAN operation expands an expression using a series of different strategies:

  • If the expression has a multiplication or division and one of the arguments to that is a addition or subtraction operation, it will distribute that multiplication or division. So, '(X+Y)*Z' will become 'X*Z+Y*Z'. Similarly, '(X-Y)/Z' will become 'X/Z-Y/Z'.
  • If the expression has a power operation and the exponent of that operation is an addition or subtraction operation, it will turn that into a pair of power operation factors. So, 'X^(Y+Z)' will become 'X^Y*X^Z'. Similarly, 'X^(Y-Z)' will become 'X^Y/X^Z'.
  • If the expression has a power operation and the exponent of that operation is a positive integer, it will pull one factor out of that power operation. So, 'X^10' will become 'X*X^9'.
  • If the expression is a square of addition or subtraction, the square will be expanded. So, 'SQ(X+Y)' or '(X+Y)^2' will become 'X^2+2*X*Y+Y^2'. Similarly, 'SQ(X-Y)' or '(X-Y)^2' will become 'X^2-2*X*Y+Y^2'.
  • Note that the EXPAN operation only perform a single expansion on the expression. The first rule above which it can apply, it will and then it returns this slightly more expanded expression. This behaviour differs from COLCT which fully collects an expression as much as possible on a single execution.