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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"expr_key": "<expr_key>"
},
"name": "expand_expression"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expr_key | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |