Tag Info

Hot answers tagged

3

As pointed out by Artes, this integral has meaning only under Cauchy principal value. Luckily, NIntegrate has this strategy (explained here): NIntegrate[(4 Cos[\[Theta]] Sin[\[Theta]])/(1 - 16 Cos[\[Theta]]^4), {\[Theta], 0, \[Pi]/3, \[Pi]/2}, Method -> "PrincipalValue"] 0.127706 Note that the position of the sigularity has to be specified in the ...


1

g[a_] := ( 2 Sin[a]^4 - Cos[a]^2 Sin[a]^2 ) 1/( 2 Sin[a]^4 (Cot[a]^2 - 1) (Cot[a]^2 - 0.5)) (-(1/(Cos[a]^2) )); GaussLegendreQuadrature[a_, b_, n_, f_] := Module[{weights, i}, weights = GaussianQuadratureWeights[n, -1, 1]; (b - a)/2*Sum[weights[[i, 2]] f[(a + b)/2 + (b - a)/2 weights[[i, 1]]],{i,1, n}]] GaussLegendreQuadrature[0, Pi, n, g] Is it ...


1

This is not an answer but rather a comment/example on @Dr.WolfgangHintze and @halirutan posts, concerning the "weird" behaviour that was observed with NIntegrate, that is localization and symbolic evaluation of the variables which may actually lead to unwanted results: Edit I'll take an even more simple example which concerns both NIntegrate and Integrate: ...



Only top voted, non community-wiki answers of a minimum length are eligible