The built-in functions in this topic are for expanding polynomials, rational functions, and Boolean expressions (for details, see Expanding PolynomialsExpanding_Polynomials, Expanding Rational FunctionsExpanding_Rational_Functions, and Boolean FunctionsBoolean_Functions, respectively).  To expand expressions involving the elementary functions see Exponential FunctionsExponential_Functions, Logarithmic FunctionsLogarithmic_Functions, and Trigonometric FunctionsTrigonometric_Functions.


If u is a polynomial, EXPAND(u) expands u with respect to all its variables.  For example,

EXPAND((x + x·y + 3)^2)

simplifies to

 2  2      2      2                   
x ·y  + 2·x ·y + x  + 6·x·y + 6·x + 9 


If u is a polynomial, EXPAND(u, x, y, ...) expands u with respect to the variables x, y, ... .  For example,

EXPAND((x + x·y + 3)^2, x)

simplifies to

 2        2                   
x ·(y + 1)  + 6·x·(y + 1) + 9 


If u is a rational function and amount is Trivial, Squarefree, Rational or Radical, EXPAND(u, amount) expands u to partial fractions with respect to all its variables by factoring the denominator of u by amount.  If the amount argument is omitted, Rational is the default denominator factoring amount.  For example,

EXPAND(1/(x^4 - 4·x^2))

simplifies to

      1              1           1   
———————————— - ———————————— - —————— 
 16·(x - 2)     16·(x + 2)        2  
                               4·x   


If u is a rational function, EXPAND(u, amount, x, y, ...) expands u to partial fractions with respect to the variables x, y, ... by factoring the denominator of u by amount.  For example,

EXPAND(1/(x^4 - 4·x^2), Squarefree, x)

simplifies to

      1           1   
———————————— - —————— 
     2             2  
 4·(x  - 4)     4·x   


If u is a Boolean expression, EXPAND(u) expands u to disjunctive normal form returning the result as a Boolean expression. For example,

EXPAND(p AND (q OR r))

simplifies to

(p q) (p r)


If u is a scalar expression, TERMS(u) returns the terms of u as a vector.  If u is a set or vector of expressions, TERMS(u) distributes over the elements of u.  Note that products and powers are not necessarily expanded.  For example,

TERMS(x·(a + b)^2 + c)

simplifies to

        2  
x·(a + b) , c


If u is a polynomial or rational function and amount is Trivial, Squarefree, Rational or Radical, TERMS(u, amount, x, y, ...) actively expands u by amount with respect to the variables x, y, ... and returns the result as a vector of terms.  For example,

TERMS(x·(a + b)^2 + c, Trivial)

simplifies to

2              2    
a ·x, 2·a·b·x, b ·x, c


If u is a Boolean expression, TERMS(u) expands u to disjunctive normal form returning the result as a vector of conjuncts. For example,

TERMS(p AND (q OR r))

simplifies to

[p q , p r]


Since TERMS distributes over vectors, if v is a Boolean expression the composition TERMS(FACTORS(v)) simplifies to a vector of vectors of the literal atoms of the conjunctive normal form of v.  For example,

TERMS(FACTORS(NOT(NOT(a) OR b) OR NOT(c)))

simplifies to

 a   ¬ c
         
¬ b  ¬ c


Other Built-in Functions and ConstantsBuilt_in_Functions_and_Constants 

Created with the Personal Edition of HelpNDoc: Easily create HTML Help documents