mc_convergencia_1d
Estimate a 1D integral via mean-value Monte Carlo and track how the cumulative average converges as samples increase; optionally plot the running average.
Instructions
Show how the mean-value Monte Carlo estimate converges as samples accumulate.
Args: func_str: Math expression in x. a, b: Integration limits (b > a). N: Total number of samples. seed: Optional RNG seed. precision: Rounding digits. plot: When True, also return a PNG of the running average.
Returns:
Dict with the cumulative running average over the samples. With
plot=True a list [dict, Image] is returned instead.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"func_str": "<func_str>",
"a": "<a>",
"b": "<b>"
},
"name": "mc_convergencia_1d"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| N | No | ||
| a | Yes | ||
| b | Yes | ||
| plot | No | ||
| seed | No | ||
| func_str | Yes | ||
| precision | No |