Skip to main content
Glama
agmonetti

mathmethods-mcp

by agmonetti

ode_rk4

Solve ODE initial value problems using the Runge-Kutta 4 method. Input equation, x0, y0, xf, and step size to get numerical solution, exact solution, and per-step errors.

Instructions

Solve an initial value problem y'(x) = f(x, y) with the Runge-Kutta 4 method.

Args: ecuacion_str: Right-hand side f(x, y), e.g. "y" or "-2xy". x0: Initial x. y0: Initial y(x0). xf: Final x (must be > x0). h: Step size (must be positive). The endpoint xf is always reached. tol: Optional tolerance to flag whether the final error meets it. precision: Rounding digits.

Returns: Dict with the numerical solution table, exact solution (when SymPy can solve it) and per-step errors.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hYes
x0Yes
xfYes
y0Yes
tolNo
precisionNo
ecuacion_strYes

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/agmonetti/mathmethods-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server