mc_valor_promedio_2d
Estimate a double integral over a rectangular region using mean-value Monte Carlo sampling, with an optional scatter plot of sampled points colored by function value.
Instructions
Estimate the double integral of f(x, y) over [x_a,x_b]×[y_a,y_b] by mean value.
With plot=True a PNG scatter of the sampled points coloured by f(x, y)
is returned as [dict, Image] alongside the numeric result.
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>",
"x_a": "<x_a>",
"x_b": "<x_b>",
"y_a": "<y_a>",
"y_b": "<y_b>"
},
"name": "mc_valor_promedio_2d"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| N | No | ||
| x_a | Yes | ||
| x_b | Yes | ||
| y_a | Yes | ||
| y_b | Yes | ||
| plot | No | ||
| seed | No | ||
| func_str | Yes | ||
| precision | No | ||
| nivel_confianza | No |