Numerical Integration
Approximate a definite or improper integral with Simpson, trapezoid, left, right or midpoint sums or Monte Carlo, and see the true error against an independent reference value.
- Free
- No sign-up
- Works on any device
About Numerical Integration
Approximate an integral with Simpson's rule, the trapezoid rule, left, right or midpoint Riemann sums, or random Monte Carlo sampling. Limits can be infinite for improper integrals, which are mapped to a finite interval. Simpson's rule with four subintervals gives 2.00455975 for the integral of sin(x) from 0 to pi, whose true value is 2. The true error is shown against a separate high-accuracy reference computed with tanh-sinh quadrature, together with a table that shows the error shrinking as n grows.
How to use Numerical Integration
- Pick the method and type f(x) with the lower and upper limits (use inf for infinity).
- Set the number of subintervals, or the number of random points and a seed for Monte Carlo.
- Read the approximation, the reference value, the error and the convergence table.
Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.
- Free to embed on your own website, with a ready-made code to copy.
Also known as
Frequently asked questions
Which rule is most accurate for the same number of points?
Simpson's rule usually wins for smooth functions, with error shrinking like h^4 against h^2 for the trapezoid and midpoint rules and h for left and right sums. Monte Carlo is far slower for one variable.
How can it show the error when no exact answer is known?
It compares with a second, independent calculation: tanh-sinh quadrature, which is accurate to about ten or more digits for most integrands, including those with end-point singularities.
How are improper integrals handled?
An infinite limit is substituted away, for example x = a + t/(1 - t), so the integral runs over a finite interval. The value at the singular end is replaced by its limit, and divergent integrals are flagged when the result is not finite.
Is Numerical Integration free?
Yes. Numerical Integration on Toolipedia is free to use, with no sign-up and no watermark.
Is it safe to use?
Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.
Does it work on my phone?
Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.
Do I need an account?
No. Just open the page and use the tool. There's no sign-up and no email needed.
Can I put Numerical Integration on my own website?
Yes. Use the Embed on your site button under the tool to copy a short piece of code and paste it into your page. It is free, needs no account, and the tool keeps working inside your page.