integral_trapecio
Numerically integrate a function over an interval using the composite trapezoidal rule, obtaining the approximate integral, error bounds, and a table.
Instructions
Approximate ∫ₐᵇ f(x) dx with the composite trapezoidal rule.
Args: func_str: Math expression in x. a, b: Integration limits (b > a). n: Number of subintervals. epsilon: Optional point in [a, b] for the truncation error bound. precision: Rounding digits.
Returns: Dict with the integral, error estimates and table.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes | ||
| n | Yes | ||
| epsilon | No | ||
| func_str | Yes | ||
| precision | No |