Name:

expand expands polynomial subexpressions

Library name:

sollya_obj_t sollya_lib_expand(sollya_obj_t)

Usage:

expand(function) : function -> function

Parameters:

Description:

Example 1:

   > print(expand(x^3));
   x * x * x

Example 2:

   > print(expand((x + 2)^3 + 2 * x));
   8 + 12 * x + 6 * x * x + x * x * x + 2 * x

Example 3:

   > print(expand(exp((x + (x + 3))^5)));
   exp(243 + 405 * x + 270 * x * x + 90 * x * x * x + 15 * x * x * x * x + x * x * x * x * x + x * 405 + 108 * x * 5 * x + 54 * x * x * 5 * x + 12 * x * x * x * 5 * x + x * x * x * x * 5 * x + x * x * 270 + 27 * x * x * x * 10 + 9 * x * x * x * x * 10 + x * x * x * x * x * 10 + x * x * x * 90 + 6 * x * x * x * x * 10 + x * x * x * x * x * 10 + x * x * x * x * 5 * x + 15 * x * x * x * x + x * x * x * x * x)
See also: simplify, simplifysafe, horner, coeff, degree
Go back to the list of commands