expand_expression
Expands algebraic expressions by distributing products and integer powers of sums, including expanding equations side by side.
Instructions
Expands an expression algebraically using SymPy's expand function.
Distributes products and expands integer powers of sums. Equations are expanded side by side.
Args:
expr_key: The key of the expression (previously introduced) to expand.
Example:
intro("x", [Assumption.REAL], [])
expr_key = introduce_expression("(x + 1)**3")
result_key = expand_expression(expr_key)
# x^3 + 3x^2 + 3x + 1
Returns:
A key for the expanded expression.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expr_key | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |