Qurak

N integrate introduction strategies rules and preprocessors

Tutorial 4 steps, run in order in one session. Every step was executed against the engine and the output below is what it produced.

Step 1
NIntegrate[(1/Sqrt[x])Log[(1/x)], {x, 0, 1}, Method -> {"GlobalAdaptive", Method -> "ClenshawCurtisRule"}]
Output
4.
Step 2
NIntegrate[Log[1 + x ^ 2 + y], {x, 0, 10}, {y, 0, 10}, Method -> {"CartesianRule", Method -> {"GaussKronrodRule", "ClenshawCurtisRule"}}]
Output
NIntegrate[Log[1 + x^2 + y], {x, 0, 10}, {y, 0, 10}, Method -> {CartesianRule, Method -> {GaussKronrodRule, ClenshawCurtisRule}}]
Step 3
NIntegrate[Boole[x^2 + y^2 < 1] * (1 - Sqrt[x^2 + y^2]), {x, -1, 1}, {y, -1, 1}, Method -> {"EvenOddSubdivision", Method -> "LocalAdaptive"}]
Output
NIntegrate[Boole[x^2 + y^2 < 1]*(1 - Sqrt[x^2 + y^2]), {x, -1, 1}, {y, -1, 1}, Method -> {EvenOddSubdivision, Method -> LocalAdaptive}]
Step 4
Graphics[{PointSize[0.005], Point[Reap[NIntegrate[Boole[x^2 + y^2 < 1] * (1 - Sqrt[x^2 + y^2]), {x, -1, 1}, {y, -1, 1}, Method -> {"EvenOddSubdivision", Method -> "LocalAdaptive"}, EvaluationMonitor :> Sow[{x, y}]]][[2, 1]]]}, Axes -> True, PlotRange -> {{-1, 1}, {-1, 1}}]
Output
-Graphics-

Functions used

Related recipes

All recipes · Function reference · Use this from an MCP client