together_expression
Combine rational expressions into a single fraction over a common denominator, simplifying sums of fractions.
Instructions
Combine rational expressions over a common denominator.
═══════════════════════════════════════════════════════════════════════
🆕 PHASE 1 - NOT IN SYMPY-MCP OR NSFORGE v0.2.3!
═══════════════════════════════════════════════════════════════════════
Combines separate fractions into a single fraction.
Use cases:
- Combine clearance terms
- Total bioavailability
- Multiple dosing routes
- Fraction addition
Args:
expression: Sum of rational expressions
deep: Apply to subexpressions (default: False)
Returns:
Combined expression with LaTeX
Examples:
# Simple addition
together_expression("1/x + 1/y")
→ {"result": "(x + y)/(x*y)", ...}
# Multiple clearances
together_expression("CL_renal/V + CL_hepatic/V")
→ {"result": "(CL_renal + CL_hepatic)/V", ...}
# Complex fractions
together_expression("1/(x-1) + 1/(x+1)")
→ {"result": "2*x/(x**2 - 1)", ...}
# PK: Total clearance
together_expression("Q/V1 + CL/V1")
→ {"result": "(Q + CL)/V1", ...}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deep | No | ||
| expression | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||