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

Math & Numbers

一阶微分方程求解器(分离变量法)

用分离变量法求解 dy/dx = g(x)·h(y):分离变量、两侧逐项积分得 H(y) = G(x) + C,能反解时给出显式解 y = f(x)。支持单项 h(y)(y、y^n、e^(ky)、ky+m)以及可用部分分式分解的二次多项式(如逻辑斯蒂方程的 y(1−y));给定初始条件 y(x₀)=y₀ 时算出常数 C,并检测平衡解。示例:dy/dx = 2x·y → y = e^(x²+C)。

text· 文本结果打开工具

快速开始

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

cURL
curl -X POST 'https://api.elysiatools.com/zh/api/tools/first-order-ode-solver' \
  -H 'Content-Type: application/json' \
  -d '{"gx":"2x","hy":"y","x0":0,"y0":1}'

API 参考

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

请求端点

HTTP
POST https://api.elysiatools.com/zh/api/tools/first-order-ode-solver

请求参数

参数名类型必填说明
gxtext是x-dependent factor of dy/dx = g(x)·h(y). Terms: constants, x^n, (kx+m)^n, e^(kx), sin(kx+m), cos(kx+m), ln(kx+m), sqrt(kx+m).
hytext是y-dependent factor. Single terms (y, y^n, (ky+m)^n, e^(ky)) or a degree ≤ 2 polynomial with real roots, or c/D(y).
x0number否Only used together with y₀ to pin down the constant C.
y0number否Initial value. Leave empty for the general solution; provide with x₀ for the particular solution.

响应格式

文本结果

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-first-order-ode-solver": {
      "name": "first-order-ode-solver",
      "description": "用分离变量法求解 dy/dx = g(x)·h(y):分离变量、两侧逐项积分得 H(y) = G(x) + C,能反解时给出显式解 y = f(x)。支持单项 h(y)(y、y^n、e^(ky)、ky+m)以及可用部分分式分解的二次多项式(如逻辑斯蒂方程的 y(1−y));给定初始条件 y(x₀)=y₀ 时算出常数 C,并检测平衡解。示例:dy/dx = 2x·y → y = e^(x²+C)。",
      "baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=first-order-ode-solver",
      "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": "first-order-ode-solver",
    "arguments": {
  "gx": "2x",
  "hy": "y",
  "x0": 0,
  "y0": 1
}
  }
}
可用逗号分隔的 toolId 在一个会话中串联多个工具,例如 /mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp(最多 20 个)。

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

浏览工具打开工具

© 2026 Elysia Tools. 开发者文档。

返回主站浏览工具