NIntegrate::slwcon
Examples
Basic Examples (2)
A warning message is generated because the integral has a singularity inside the integration region:
NIntegrate[Log[(x - 1 / 3) ^ 2], {x, 0, 1}, PrecisionGoal -> 12, MaxRecursion -> 40]The integral is computed without issuing the message if the singular point is specified in the integration range:
NIntegrate[Log[(x - 1 / 3) ^ 2], {x, 0, 1 / 3, 1}, PrecisionGoal -> 12]Alternatively, singular points can be specified as Exclusions:
NIntegrate[Log[(x - 1 / 3) ^ 2], {x, 0, 1}, PrecisionGoal -> 12, Exclusions -> {1 / 3}]NIntegrate returns a more precise result faster if the singular point is specified in the singular range:
NIntegrate[Log[(x - 1 / 3) ^ 2], {x, 0, 1}, PrecisionGoal -> 12, MaxRecursion -> 40] - (-2 + Log[(2 * 2 ^ (1 / 3)) / 9])//TimingNIntegrate[Log[(x - 1 / 3) ^ 2], {x, 0, 1 / 3, 1}, PrecisionGoal -> 12] - (-2 + Log[(2 * 2 ^ (1 / 3)) / 9])//Timing