Elysia Tools Docs
EN
Language
ZHESPTRUFRDEEN
Back to site
Browse tools

Math & Numbers

Simpson's Rule Integrator (∫f(x)dx)

Composite Simpson's 1/3 rule for ∫f(x)dx (even n): node table with weights, integral estimate, optional exact value, O(h⁴) accuracy.

text· Text resultOpen tool

Quick start

Call this tool from your code in three languages.

cURL
curl -X POST 'https://api.elysiatools.com/en/api/tools/numerical-integration-simpson' \
  -H 'Content-Type: application/json' \
  -d '{"fx":"x^2","a":0,"b":1,"n":4,"exactF":"x^3/3","decimalPlaces":6}'

API reference

Send a POST request with your inputs as JSON. File parameters require a separate upload first.

Endpoint

HTTP
POST https://api.elysiatools.com/en/api/tools/numerical-integration-simpson

Parameters

NameTypeRequiredDescription
fxtextYesIntegrand in x (functions: sin, cos, exp, ln, sqrt, …).
anumberYes—
bnumberYesMay be less than a (the integral flips sign, as in calculus).
nnumberYesMust be even. h = (b − a)/n; global error is O(h⁴) — halving h divides the error by ~16.
exactFtextNo

MCP integration

Add this tool to your Model Context Protocol server so AI agents can list and call it.

Server configuration

Add this block to your MCP client configuration:

mcp.json
{
  "mcpServers": {
    "elysiatools-numerical-integration-simpson": {
      "name": "numerical-integration-simpson",
      "description": "Composite Simpson's 1/3 rule for ∫f(x)dx (even n): node table with weights, integral estimate, optional exact value, O(h⁴) accuracy.",
      "baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=numerical-integration-simpson",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

List available tools

After connecting to the SSE endpoint, list the exposed tools:

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

Call this tool

Invoke the tool by its id, passing arguments built from its parameters:

tools/call
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "numerical-integration-simpson",
    "arguments": {
  "fx": "x^2",
  "a": 0,
  "b": 1,
  "n": 4,
  "exactF": "x^3/3",
  "decimalPlaces": 6
}
  }
}
Chain multiple tools in one session with a comma-separated toolId list, e.g. /mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp (max 20).

Questions or issues? Contact [email protected]

Browse toolsOpen tool

© 2026 Elysia Tools. Developer documentation.

Back to siteBrowse tools
Exact antiderivative in x; the tool reports F(b) − F(a) and the absolute error. Leave empty to skip.
decimalPlacesnumberNo—

Response format

Text result

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