A definite integral measures the signed area under a curve between two limits. Type a function of x and the limits to evaluate it accurately with Simpson's rule.
Type f(x).
Enter the lower and upper limits.
Read the value of the integral.
Simpson's rule: ∫ₐᵇ f dx ≈ h/3 [f₀ + 4f₁ + 2f₂ + … + 4fₙ₋₁ + fₙ]
A definite integral adds up a quantity continuously between two limits. On a graph it is the signed area between the curve y = f(x) and the x-axis from x = a to x = b. This calculator evaluates it numerically for any function you type, using Simpson's rule with the number of intervals you choose, and shows the step size and the weighted sums.
Many integrals have no neat antiderivative, such as e^(−x²) or sin(x)/x, yet their values are needed in probability, physics and engineering. Even when the antiderivative exists, a numerical check catches algebra slips. Students of Class 12 calculus, engineering mathematics and numerical methods courses use Simpson's rule, and this calculator lays out the same working.
1. Choose an even number of intervals n and compute the step h = (b − a) ÷ n.
2. List the points x₀ = a, x₁ = a + h, …, xₙ = b and evaluate f at each.
3. Add the end values: f(x₀) + f(xₙ).
4. Add the values at odd-numbered points and multiply that sum by 4.
5. Add the values at even-numbered interior points and multiply that sum by 2.
6. Add the three parts and multiply by h ÷ 3: ∫ ≈ (h/3)[f₀ + 4(f₁ + f₃ + …) + 2(f₂ + f₄ + …) + fₙ].
Simpson's rule takes the strips in pairs. Over each pair it fits the unique parabola through the three points at the left edge, middle and right edge, and integrates that parabola exactly. For points spaced h apart with heights y₀, y₁, y₂, the area under the parabola works out to (h/3)(y₀ + 4y₁ + y₂). Summing over all pairs, interior even points are shared by two neighbouring pairs and get weight 2, while the midpoints get weight 4. That is why n must be even; the calculator adds one if you enter an odd number.
A parabola matches a smooth curve much better than the straight lines of the trapezium rule. The error of Simpson's rule is proportional to h⁴ times the fourth derivative of f, so doubling the number of intervals cuts the error by about sixteen times. Surprisingly, it is exact for cubic polynomials as well as quadratics, because the error term depends on the fourth derivative, which is zero for a cubic. For well-behaved functions, a few hundred intervals give eight or more correct digits.
Where the curve is below the x-axis, f(x) is negative and that area counts as negative. So ∫ sin x from 0 to 2π is zero, even though the curve encloses real area; for total area, integrate |f(x)| or split at the crossings. By the fundamental theorem of calculus, the exact answer is F(b) − F(a) for any antiderivative F. If f blows up inside the interval, as 1/x does at 0, the integral may not exist, and a numerical rule can return a meaningless number or an error.
Meera read that the integral of 4/(1 + x²) from 0 to 1 equals π, because the antiderivative is 4 tan⁻¹x. She wants to check it numerically with Simpson's rule using 50 intervals.
Step size: h = (1 − 0) ÷ 50 = 0.02
Simpson's rule: ∫ ≈ h/3 × [f(a) + 4 Σf(odd) + 2 Σf(even) + f(b)] = 0.02/3 × [4 + 4 × 78.54315 + 2 × 75.53315 + 2] = 3.14159265
Answer: Definite integral 3.14159265
Typing trigonometric limits in degrees; use radians, for example 3.14159 for π.
Expecting total area when the curve crosses the x-axis; negative parts cancel positive ones.
Using an odd number of intervals when working Simpson's rule by hand.
Swapping the limits, which flips the sign of the answer.
Integrating across a point where the function is undefined, such as 1/x across 0.
Checking Class 12 definite integral and area-under-curve answers.
Evaluating integrals with no closed form, such as normal-curve probabilities.
Computing work done by a variable force, or distance from a velocity-time graph.
Finding volumes, areas and centroids in engineering drawing and mechanics.
Numerical methods coursework comparing Simpson's rule with the trapezium rule.
Why can the answer be negative?
Area below the x-axis counts as negative in a definite integral.
What if the function blows up inside the range?
The integral may not exist; the calculator reports it as undefined.