Qurak

NIntegrate

Tersedia, berbeda dari referensi .wl

Numerically integrates an expression over a range.

`NIntegrate` on well-behaved finite ranges agrees with the reference. The known failure class is oscillatory integrands over infinite ranges, where it can return a wildly wrong value while reporting success. Two ways to check an answer you rely on: evaluate the same integral over two finite truncations of the range and compare - they should agree with each other and with the infinite-range value - or compute the integral symbolically with `Integrate` when a closed form exists. On the Fresnel case above the symbolic route is exact where the numeric one fails. A finite range is not automatically safe: an integrand that oscillates unboundedly towards an endpoint can make the whole-range answer disagree with the sum of its own halves, which is the cheapest self-check an integrator has and costs one extra evaluation. ```wolfram NIntegrate[(1/x) Cos[Log[x]/x], {x, 0, 1}] (* 2.5186 *) NIntegrate[(1/x) Cos[Log[x]/x], {x, 0, 1/2}] + NIntegrate[(1/x) Cos[Log[x]/x], {x, 1/2, 1}] (* 2.2398 - 11% apart *) ``` Neither call warns. When the two disagree, at least one is wrong and the disagreement does not say which - treat the value as unverified rather than picking the one you prefer.

Dapat diperiksa secara independen: jawaban untuk fungsi ini diturunkan ulang melalui jalur lain lalu dibandingkan - workbench dan alat verify melakukannya otomatis, sehingga jawaban yang salah tertangkap alih-alih dipercaya. Riwayat →

NIntegrate[f, {x, xmin, xmax}]
NIntegrate[f, {x, xmin, xmax}, {y, ymin, ymax}, …]
NIntegrate[f, {x, y, …}∈ reg]
NIntegrate[x^2, {x, 0, 1}] → 0\.333333333333333[0-9] (regex)NIntegrate[1/Sqrt[x], {x, 0, 1}] → 2\.(0+\d*)? (regex)NIntegrate[Log[x]/Sqrt[x], {x, 0, 1}] → -4\.(0+\d*)? (regex)NIntegrate[Sqrt[Tan[x]], {x, 0, Pi/2}] → 2\.2214414[0-9]+ (regex)NIntegrate[1/Abs[Sqrt[x]], {x, -1, 0, 1}] → 4\.(0+\d*)? (regex)

Dipakai di

Topik

Terkait

Semua 6300 fungsi · Pakai ini dari klien MCP