Home/Tools/inverse_laplace_transform

Inverse Laplace transform

Compute the inverse Laplace transform ℒ⁻¹{F(s)}(t).

Endpoint: POST /api/v1/inverse_laplace_transform

When to use

ℒ⁻¹{F(s)}(t). Best results on rational `F(s)`; consider `partial_fractions` first.

Input schema

Validated server-side with Zod. The same schema feeds OpenAPI and the MCP tool list.

{
  "type": "object",
  "properties": {
    "expression": {
      "type": "string",
      "minLength": 1
    },
    "parameter": {
      "type": "string",
      "minLength": 1,
      "description": "Frequency-domain variable, e.g. 's'"
    },
    "variable": {
      "type": "string",
      "minLength": 1,
      "description": "Time-domain variable, e.g. 't'"
    }
  },
  "required": [
    "expression",
    "parameter",
    "variable"
  ],
  "additionalProperties": false
}

Response shape

All tools return { ok: true, result } on success and { ok: false, error } on failure. The result object contains:

FieldTypeDescription
resultstringResulting expression in nerdamer syntax.

Example

Request

{
  "expression": "1/(s^2 + 1)",
  "parameter": "s",
  "variable": "t"
}

Response

{
  "ok": true,
  "result": {
    "result": "sin(t)"
  }
}

curl

curl -X POST https://tools.aieo.se/api/v1/inverse_laplace_transform \
  -H 'Content-Type: application/json' \
  -d '{"expression":"1/(s^2 + 1)","parameter":"s","variable":"t"}'

MCP call (JSON-RPC)

MCP clients call this tool as tools/call against /api/mcp:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "inverse_laplace_transform",
    "arguments": {
      "expression": "1/(s^2 + 1)",
      "parameter": "s",
      "variable": "t"
    }
  }
}

Common errors

  • F(s) is not a recognised rational form.
    Returns an unevaluated `ilt(…)` placeholder.
  • A required field is missing or has the wrong type.
    Zod validation error, e.g. `Required` or `Expected string, received number`.
  • Nerdamer cannot parse the expression (unbalanced parens, unknown function, stray characters).
    `Unexpected token …` or `… is not a valid expression`.