trigsimp_expression
Apply trigonometric identities to simplify expressions, reducing complex forms like sin²(x)+cos²(x) to 1.
Instructions
Simplify trigonometric expressions.
═══════════════════════════════════════════════════════════════════════
🆕 PHASE 1 - NOT IN SYMPY-MCP OR NSFORGE v0.2.3!
═══════════════════════════════════════════════════════════════════════
Applies trigonometric identities to simplify expressions.
Use cases:
- Simplify sin²+cos² → 1
- Simplify tan(x) → sin(x)/cos(x)
- Oscillating chemical reactions
- Phase analysis in PK/PD
Args:
expression: Expression to simplify
deep: Apply to subexpressions (default: False)
recursive: Apply repeatedly (default: False)
method: Simplification method
- "matching": Pattern matching (default, fast)
- "groebner": Gröbner basis (slower, more powerful)
- "combined": Try both
Returns:
Simplified expression with LaTeX
Examples:
# Pythagorean identity
trigsimp_expression("sin(x)**2 + cos(x)**2")
→ {"result": "1", ...}
# Tan identity
trigsimp_expression("sin(x)/cos(x)")
→ {"result": "tan(x)", ...}
# Double angle
trigsimp_expression("2*sin(x)*cos(x)")
→ {"result": "sin(2*x)", ...}
# Oscillating kinetics
trigsimp_expression("sin(omega*t)**2 + cos(omega*t)**2")
→ {"result": "1", ...}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deep | No | ||
| method | No | matching | |
| recursive | No | ||
| expression | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||