Elysia Tools Docs
ZH
语言
ZHESPTRUFRDEEN
返回主站
浏览工具

Math & Numbers

部分分式分解计算器(有理函数)

对有理函数 F(x) = N(x)/D(x) 做部分分式分解(分母次数 ≤ 6,分子次数 ≤ 8,假分式自动先做多项式长除):Durand-Kerner 求分母根并按重数/共轭对分组,解多项式系数线性方程组得到 A/(x−r)^j 与 (Bx+C)/((x−α)²+β²) 形式的分解,并在代数探针点做数值残差验证。经典例:(3x+5)/(x²+3x+2) = 2/(x+1) + 1/(x+2);(x³+2x)/(x²+1) = x + x/(x²+1);1/(x(x+1)²) = 1/x − 1/(x+1) − 1/(x+1)²。

text· 文本结果打开工具

快速开始

用三种语言从你的代码中调用此工具。

cURL
curl -X POST 'https://api.elysiatools.com/zh/api/tools/partial-fraction-decomposer' \
  -H 'Content-Type: application/json' \
  -d '{"numCoeffs":"5,3","denCoeffs":"2,3,1","decimalPlaces":4}'

API 参考

以 JSON 形式 POST 提交输入参数。文件类型参数需先单独上传。

请求端点

HTTP
POST https://api.elysiatools.com/zh/api/tools/partial-fraction-decomposer

请求参数

参数名类型必填说明
numCoeffstext是Comma-separated numerator coefficients, constant term first, degree ≤ 8, e.g. 5,3 → 3x + 5.
denCoeffstext是Comma-separated denominator coefficients, constant term first, degree 1–6, e.g. 2,3,1 → x² + 3x + 2.
decimalPlacesnumber否—

响应格式

文本结果

JSON
{
  "result": "Processed text content",
  "error": "Error message (optional)",
  "message": "Notification message (optional)",
  "metadata": {
    "key": "value"
  }
}

MCP 集成

将此工具加入你的 Model Context Protocol 服务,让 AI 智能体可以列出并调用它。

服务配置

将以下内容加入你的 MCP 客户端配置:

mcp.json
{
  "mcpServers": {
    "elysiatools-partial-fraction-decomposer": {
      "name": "partial-fraction-decomposer",
      "description": "对有理函数 F(x) = N(x)/D(x) 做部分分式分解(分母次数 ≤ 6,分子次数 ≤ 8,假分式自动先做多项式长除):Durand-Kerner 求分母根并按重数/共轭对分组,解多项式系数线性方程组得到 A/(x−r)^j 与 (Bx+C)/((x−α)²+β²) 形式的分解,并在代数探针点做数值残差验证。经典例:(3x+5)/(x²+3x+2) = 2/(x+1) + 1/(x+2);(x³+2x)/(x²+1) = x + x/(x²+1);1/(x(x+1)²) = 1/x − 1/(x+1) − 1/(x+1)²。",
      "baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=partial-fraction-decomposer",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

列出可用工具

连接到 SSE 端点后,列出已开放的工具:

tools/list
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/list"
}

调用此工具

通过工具 id 调用,参数由其参数表构建:

tools/call
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "partial-fraction-decomposer",
    "arguments": {
  "numCoeffs": "5,3",
  "denCoeffs": "2,3,1",
  "decimalPlaces": 4
}
  }
}
可用逗号分隔的 toolId 在一个会话中串联多个工具,例如 /mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp(最多 20 个)。

有问题或反馈?请联系 [email protected]

浏览工具打开工具

© 2026 Elysia Tools. 开发者文档。

返回主站浏览工具