ode_euler
Solve first-order ODEs y'(x)=f(x,y) with initial condition using the explicit Euler method, returning numerical solution, exact solution when available, and error estimates.
Instructions
Solve y'(x) = f(x, y), y(x0) = y0 with the explicit Euler method (1st order).
Args: ecuacion_str: Right-hand side f(x, y). x0, y0: Initial condition. xf: Final x (must be > x0). h: Step size (must be positive). tol: Optional tolerance flag for the final error. precision: Rounding digits.
Returns: Dict with the numerical solution, exact solution (when available) and errors.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| h | Yes | ||
| x0 | Yes | ||
| xf | Yes | ||
| y0 | Yes | ||
| tol | No | ||
| precision | No | ||
| ecuacion_str | Yes |