Expand an expression (expand)
Multiply out products and powers into a sum.
With this function, the solver shows the steps whenever it finds them.
How to write it
expand(expr)
- expr
- Any expression: a number, a formula, a list or a matrix. Takes an expression.
Examples
expand((x + 1)^3)In the solver,
Open in the solverexpand((x + 1)^3)givesx^3 + 3x^2 + 3x + 1.expand((x - 1)(x + 2))In the solver,
Open in the solverexpand((x - 1)(x + 2))givesx^2 + x - 2.
Related functions
- function_expand
Rewrite special functions of shifted arguments in terms of simpler ones.
- complex_expand
Expand an expression assuming its variables are real.
- power_expand
Expand powers and logarithms of products and powers.
- factor
Factor a polynomial into irreducible factors.
- discriminant
Discriminant of a polynomial in a variable.
- full_simplify
Search harder than simplify for a simpler form, under assumptions.