Finding a numerical integral of a function over a region.

NIntegrate[(1/(Sqrt[x])),{x,0,1}]

ListPlot[Last[Reap[NIntegrate[(1/(Sqrt[x])),{x,0,1},EvaluationMonitor:>Sow[x]]]]]

NIntegrate[(1/(2+Sin[x])),{x,0,5},Method->{"GlobalAdaptive",Method->"ClenshawCurtisRule"}]

NIntegrate[(1/(Sqrt[Abs[x-1]])),{x,0,2}]

NIntegrate[(((x-2))^2) Sin[4000 x],{x,2,3}]

Plot[(((x-2))^2) Sin[4000 x],{x,2+(2/50),2+(3/50)}]

NIntegrate[Piecewise[{{(1/(Sqrt[Abs[x-1]])),x<2},{(((x-2))^2) Sin[4000 x],2<x<3}}],{x,0,3}]

Table[NIntegrate[(1/(1+Cos[x+(x^2)])),{x,0,1},Method->rule],{rule,{"NewtonCotesRule","GaussKronrodRule","ClenshawCurtisRule"}}]

{nodes,weights}=NIntegrate`NewtonCotesRuleData[2,MachinePrecision][[{1,2}]]

NIntegrate[(1/(1+x+Cos[y])),{x,0,1},{y,0,2},Method->"MultidimensionalRule"]

NIntegrate[(1/(1+x+Cos[y])),{x,0,1},{y,0,2},Method->{"GaussKronrodRule","LobattoKronrodRule"}]

Table[ListPlot[Last[Reap[NIntegrate[(1/(1+x+Cos[y])),{x,0,1},{y,0,2},Method->rule,EvaluationMonitor:>Sow[{x,y}],MaxRecursion->0]]],PlotLabel->rule,ImageSize->250],{rule,{"MultidimensionalRule",{"GaussKronrodRule","LobattoKronrodRule"}}}]//Quiet

Plot3D[Boole[(x^2)+(y^2)<1]*(1-(Sqrt[(x^2)+(y^2)])),{x,-1,1},{y,-1,1},PlotRange->All]

NIntegrate[Boole[(x^2)+(y^2)<1]*(1-(Sqrt[(x^2)+(y^2)])),{x,-1,1},{y,-1,1}]

points=First[Last[Reap[NIntegrate[Boole[(x^2)+(y^2)<1]*(1-(Sqrt[(x^2)+(y^2)])),{x,-1,1},{y,-1,1},EvaluationMonitor:>Sow[{x,y}]]]]];

Graphics[{PointSize[0.01],Point[points]},Axes->True,PlotRange->{{-1,1},{-1,1}}]

points=First[Last[Reap[NIntegrate[Boole[(x^2)+(y^2)<1]*(1-(Sqrt[(x^2)+(y^2)])),{x,-1,1},{y,-1,1},Method->{Automatic,"SymbolicProcessing"->None},EvaluationMonitor:>Sow[{x,y}]]]]];

Graphics[{PointSize[0.005],Point[points]},Axes->True,AxesOrigin->{-1,-1}]

NIntegrate[((Sin[x+(Sqrt[x])]+x BesselJ[0,(x^2)])/(1+x)),{x,0,∞}]

Plot[((Sin[x+(Sqrt[x])]+x BesselJ[0,(x^2)])/(1+x)),{x,0,12}]

NIntegrate[(1/(Sqrt[x])),{x,0,1},PrecisionGoal->10]

Do[NIntegrate[(1/(Sqrt[x])),{x,0,1},PrecisionGoal->10],{100}]//Timing

Do[NIntegrate[(1/(Sqrt[x])),{x,0,1},Method->{"GlobalAdaptive","SingularityHandler"->None},MaxRecursion->100,PrecisionGoal->10],{100}]//Timing

NIntegrate[(1/(Sqrt[(x^2)+(y^2)+(z^2)])),{x,0,1},{y,0,1},{z,0,1},Method->"DuffyCoordinates"]//Timing

NIntegrate[(1/(Sqrt[(x^2)+(y^2)+(z^2)])),{x,0,1},{y,0,1},{z,0,1}]//Timing

exact=Integrate[((Cos[20x])^4),{x,0,2(π/20)}]

resTrap=NIntegrate[((Cos[20x])^4),{x,0,2(π/20)},PrecisionGoal->150,WorkingPrecision->200,Method->"Trapezoidal"];//Timing

Abs[exact-resTrap]

resDef=NIntegrate[((Cos[20x])^4),{x,0,2(π/20)},PrecisionGoal->150,WorkingPrecision->200];//Timing

Abs[exact-resDef]

X=Array[x,30];
NIntegrate[(1/(Total@X)),Evaluate[Sequence@@Map[{#,0,1}&,X]],Method->"AdaptiveMonteCarlo",PrecisionGoal->3]

(RefLink[NIntegrate, paclet:ref/NIntegrate]) integration strategies.

NIntegrate[(1/(Sqrt[x]))Log[(1/x)],{x,0,1},Method->{"GlobalAdaptive",Method->"ClenshawCurtisRule"}]

Integration rules that can be used with the rule-based strategies "GlobalAdaptive" and "LocalAdaptive".

NIntegrate[Log[1+x^2+y],{x,0,10},{y,0,10},Method->{"CartesianRule",Method->{"GaussKronrodRule","ClenshawCurtisRule"}}]

(RefLink[NIntegrate, paclet:ref/NIntegrate]) preprocessor strategies.

NIntegrate[Boole[(x^2)+(y^2)<1]*(1-(Sqrt[(x^2)+(y^2)])),{x,-1,1},{y,-1,1},Method->{"EvenOddSubdivision",Method->"LocalAdaptive"}]

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}}]