Click to show tips
Try an Example
Pick a scenario to see how the calculator works, then adjust the values
Basic Polynomial
Integrate x^2 from 0 to 1 using Simpson's rule. Exact answer: 1/3.
Key values: x^2 · [0, 1] · Simpson's rule
Trigonometric Integral
Integrate sin(x) from 0 to pi. Exact answer: 2.
Key values: sin(x) · [0, pi] · Exact: 2
Area Under a Bell Curve
Approximate the Gaussian integral e^(-x^2) from -3 to 3.
Key values: e^(-x^2) · [-3, 3] · Gaussian
What Is a Definite Integral?
A definite integral computes the signed area between a function and the -axis over the interval . It is denoted:
The Fundamental Theorem of Calculus (Part 2) connects antiderivatives to definite integrals: if , then
However, many functions have no elementary antiderivative. For example, and cannot be integrated symbolically. In these cases, numerical integration methods approximate the integral to high precision, which is exactly what this calculator does.
How to Use This Calculator
- Enter an expression in the input field. Use standard math notation:
x^2,sin(x),exp(-x^2),x*exp(x). The variable must bex. - Set the lower bound and upper bound .
- Choose an integration method (default: Simpson's 1/3 rule, the most accurate option).
- Click Calculate to see the numerical result, error estimate, and interactive shaded area graph.
- Adjust the Riemann rectangles slider to visualize how rectangles approximate the area under the curve. Watch the approximation converge as you increase the number of rectangles.
Formulas: Numerical Integration Methods
Simpson's 1/3 Rule (Default)
The most accurate of the three methods, with convergence, exact for polynomials up to degree 3. For the full formula, error bounds, and guidance on when Simpson's rule is the best choice, see the Simpson's Rule Calculator guide.
Trapezoidal Rule
Simple and robust with convergence, exact for linear functions. Especially effective for periodic functions over complete periods. For the full formula, error analysis, and strengths, see the Trapezoidal Rule Calculator guide.
Midpoint Rule
Same convergence as trapezoidal but with half the error constant. Naturally robust for endpoint singularities. For the full formula, error analysis, and comparison with the trapezoidal rule, see the Midpoint Rule Calculator guide.
Richardson Extrapolation Error Estimate
This calculator estimates error by comparing results at and subdivisions:
This approximates the truncation error. It is not a statistical confidence interval. Smaller values indicate higher accuracy.
Convergence Comparison
| Method | Convergence | Error at n=100 | Exact for |
|---|---|---|---|
| Simpson's 1/3 | Polynomials up to degree 3 | ||
| Trapezoidal | Linear functions | ||
| Midpoint | Linear functions |
Real-World Examples
1. Parabolic Hill Cross-Section Area
A road cuts through a hill with cross-section described by meters, where runs from 0 to 60 m.
Integration is needed because the height varies continuously — you cannot use a simple base-times-height formula.
2. Work Done by a Spring
A spring with constant N/m is compressed 0.15 m. The work done equals:
Because force varies with displacement (), integration is required to accumulate the total work.
3. Velocity to Displacement
A particle has velocity m/s. The displacement over 6 seconds:
Displacement is the integral of velocity because velocity is the derivative of position.
4. Gaussian Integral (Probability)
The function has no elementary antiderivative. The integral from 0 to 1 is:
This value is related to the error function and is fundamental in probability and statistics.
5. Consumer Surplus (Economics)
A demand curve is with equilibrium at , . Consumer surplus:
Signed Area vs. Total Area
This is the most common student misconception in integral calculus. The definite integral computes signed area: regions above the -axis are positive, and regions below are negative.
Example:
The positive lobe (from 0 to ) and the negative lobe (from to ) cancel exactly. However, the total area (integral of ) is:
This calculator displays both values. If you expected a positive area but got zero (or a small number), check the Total Area result.
Common Integration Techniques
When computing integrals by hand, these techniques help find antiderivatives:
| Technique | Formula | Use When |
|---|---|---|
| u-Substitution | Composite function with inner derivative present | |
| Integration by Parts | Product of two functions (use LIATE rule) | |
| Partial Fractions | Rational functions where deg(P) < deg(Q) | |
| Trig Substitution | Integrands with radical expressions |
Frequently Asked Questions
What if my function has no elementary antiderivative?
Functions like and are proven non-elementary by Liouville's theorem. The calculator uses numerical methods automatically. The result is an approximation shown with the symbol.
Why is my result 0 when I expected a positive area?
The integral computes signed area. If is negative over part of , those regions subtract. Use the "Total Area" result, which computes instead.
What does the error estimate mean?
The error estimate is , comparing results at and subdivisions. It approximates the truncation error from the numerical method, not a statistical confidence interval. Smaller is better.
Why does my integral appear to diverge?
If has a vertical asymptote within (e.g., on ), the integral diverges and the calculator reports an error. Try excluding the singularity from the bounds.
Which method should I use?
Use Simpson's rule (default) for smooth functions — it achieves approximately 11 correct digits with . Use Midpoint rule when is undefined at the endpoints (e.g., at ). Trapezoidal is rarely preferred over either but is included for educational comparison.
References
- OpenStax. “The Fundamental Theorem of Calculus.” Calculus Volume 1, Section 5.3. https://openstax.org/books/calculus-volume-1/pages/5-3-the-fundamental-theorem-of-calculus
- Wikipedia. “Fundamental theorem of calculus.” https://en.wikipedia.org/wiki/Fundamental_theorem_of_calculus
- Wikipedia. “Simpson’s rule.” https://en.wikipedia.org/wiki/Simpson%27s_rule
- Mathematics LibreTexts. “Numerical Integration.” https://math.libretexts.org/Courses/Community_College_of_Denver/MAT_2420_Calculus_II/03:_Techniques_of_Integration/3.06:_Numerical_Integration
- Wikipedia. “Romberg’s method.” https://en.wikipedia.org/wiki/Romberg%27s_method
Disclaimer
All results are numerical approximations. The accuracy depends on the smoothness of , the interval width, and the number of subdivisions. For integrals with singularities or highly oscillatory behavior, results may be less accurate. Verify critical calculations with additional methods. This calculator is intended for educational use.
Specialized Calculators
Choose from 7 specialized versions of this calculator, each optimized for specific use cases and calculation methods.
Purpose
3 CalculatorsMethod
4 CalculatorsAlternative methods and approaches
Related Calculators
6 CalculatorsMore Math calculators