powsimp_expression
Simplify powers and exponentials by combining bases and exponents using algebraic rules, reducing expressions like x^2 * x^3 to x^5.
Instructions
Simplify powers and exponentials.
═══════════════════════════════════════════════════════════════════════
🆕 PHASE 1 - NOT IN SYMPY-MCP OR NSFORGE v0.2.3!
═══════════════════════════════════════════════════════════════════════
Combines and simplifies powers using algebraic rules.
Use cases:
- Combine exponentials: exp(x)*exp(y) → exp(x+y)
- Simplify powers: x²·x³ → x⁵
- Nested powers: (x^a)^b → x^(ab)
Args:
expression: Expression to simplify
deep: Apply to subexpressions (default: False)
combine: How to combine bases
- "all": Combine all (default)
- "base": Only combine same base
- "exp": Only exponentials
force: Force transformation even if not valid for all values
Returns:
Simplified expression with LaTeX
Examples:
# Combine powers
powsimp_expression("x**2 * x**3")
→ {"result": "x**5", ...}
# Nested powers
powsimp_expression("(x**a)**b")
→ {"result": "x**(a*b)", ...}
# Exponentials
powsimp_expression("exp(x)*exp(y)")
→ {"result": "exp(x + y)", ...}
# PK: Combine elimination terms
powsimp_expression("exp(-k*t)*exp(-k*τ)")
→ {"result": "exp(-k*(t + τ))", ...}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deep | No | ||
| force | No | ||
| combine | No | all | |
| expression | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||