Adaptive Numerical Definite Integral

Integrate a real expression over finite bounds with adaptive Simpson refinement or a fixed trapezoidal or Simpson rule.

Estimated definite integral
1
Estimated numerical error
0
Function evaluations
5

Calculation and assumptions

S=(b−a)(f(a)+4f((a+b)/2)+f(b))/6; error≈abs(S_left+S_right−S)/15.

Use x, pi, e, explicit + − * / ^, parentheses, sin, cos, tan, exp, ln, log, sqrt, abs; radians. Smooth finite functions only, at most 512 characters. Reversed bounds reverse the sign. Limits: 20 subdivision levels and 60000 evaluations. Error estimates are heuristic, not proof; poles, discontinuities and oscillations can evade sampling. Improper integrals and symbolic antiderivatives are unsupported.

Fixed rules: trapezoid T = h(f(x₀)/2 + f(x₁) + … + f(xₙ₋₁) + f(xₙ)/2); Simpson S = h/3(f(x₀) + 4f(x₁) + 2f(x₂) + … + f(xₙ)), where an odd n is raised by one. The error is estimated by comparing the rule with n and 2n steps (Richardson), so 2n + 1 values are evaluated. log is the base-10 logarithm and ln the natural logarithm; PI and E may also be written in capitals.

Values must satisfy the formula’s domain. Nonzero results too small or too large for reliable representation are rejected.

Frequently asked questions

How is the result calculated?

S=(b−a)(f(a)+4f((a+b)/2)+f(b))/6; error≈abs(S_left+S_right−S)/15.

What assumptions apply?

Use x, pi, e, explicit + − * / ^, parentheses, sin, cos, tan, exp, ln, log, sqrt, abs; radians. Smooth finite functions only, at most 512 characters. Reversed bounds reverse the sign. Limits: 20 subdivision levels and 60000 evaluations. Error estimates are heuristic, not proof; poles, discontinuities and oscillations can evade sampling. Improper integrals and symbolic antiderivatives are unsupported.

What is the difference between the trapezoidal rule and Simpson’s rule?

The trapezoidal rule joins neighbouring points with straight lines; its error falls roughly with 1/n². Simpson’s rule fits parabolas through pairs of steps and needs an even n; for smooth functions its error falls roughly with 1/n⁴. Adaptive Simpson refines only where the estimated error is too large.

How precise are the results?

Results show up to ten significant digits. Display precision does not improve the accuracy of the measurements or model. Values must satisfy the formula’s domain. Nonzero results too small or too large for reliable representation are rejected.

Also try:

Back to category →