About the Definite Integral Calculator
A definite integral turns a function and an interval into a single number. Geometrically it is the signed area between the curve and the horizontal axis; physically it can be a distance travelled, work done, total charge or accumulated cost. Whatever the context, the calculation follows the same pattern: find an antiderivative, evaluate it at the two ends of the interval and subtract.
This calculator carries out that pattern in full and writes down every stage. It finds the antiderivative with the same rule-based engine as the indefinite integral calculator, evaluates it at the upper and lower limits, and keeps the answer exact whenever it can, so you see , or rather than a long decimal. A decimal approximation is shown alongside so you can compare it with a textbook answer or a graph.
Not every integral is that straightforward. If a limit is infinite, or the function blows up inside the interval, the integral is improper, and the calculator rewrites it as a limit and tells you whether it converges or diverges. If the function has no elementary antiderivative, such as , it switches to adaptive numerical integration and says clearly that the result is an approximation.
What is a definite integral?
The definite integral is defined as the limit of Riemann sums: chop the interval from to into thin strips, multiply the height of the function in each strip by its width, add the products and let the strips become infinitely thin. For a continuous function this limit always exists, and it measures the signed area under the graph.
"Signed" is the important word. Area above the axis counts as positive and area below counts as negative, so even though the curve encloses two visible regions. If you want the total geometric area, integrate the absolute value or split the interval where the function changes sign.
Computing Riemann sums directly is slow, which is why the fundamental theorem of calculus matters so much. It says that if is any antiderivative of a continuous , the whole limit collapses to . Differentiation and integration are inverse processes, and the definite integral is the place where that fact becomes a practical tool.
How to use the Definite Integral Calculator
- Type the integrand in terms of x, for example x^2, sin(x) or 1/(1+x^2).
- Enter the lower limit and the upper limit. Numbers, fractions and constants such as pi, e or 2*pi are all accepted.
- For an infinite limit, type inf or -inf; the calculator will treat the integral as improper.
- Press Evaluate integral to see the antiderivative, the evaluation at both limits and the final value.
- Read the verdict on improper integrals carefully: an answer of "diverges" means the area is not finite.
Formulas
Fundamental theorem of calculus
Reversing the limits
Splitting the interval
Improper integral (infinite limit)
Average value on [a, b]
Worked example: ∫₀¹ x² dx
The worked example below is computed live by the calculator for , the area under the parabola between and . The power rule gives the antiderivative . Evaluating it gives and , so the integral equals .
That answer is easy to sanity-check. The region sits inside the unit square, so the area must be less than 1, and the parabola hugs the axis near zero, so a value well below one half is reasonable. Archimedes found this same one-third result for a parabolic segment more than two thousand years before calculus existed.
The solution below is generated by the same engine that powers the calculator above.
Final answer
How we read your problem
Evaluate the definite integral of x² from x = 0 to x = 1 (sign-adjusted area).
Step-by-step solution
Power rule: ∫ xⁿ dx = xⁿ⁺¹/(n+1)
Antiderivative
Evaluate F at the limits
Subtract: F(upper) − F(lower)
Formulas used
Fundamental theorem of calculus
The definite integral is the net signed area: regions above the axis count positively, regions below count negatively. With an antiderivative F, it equals F(b) − F(a).
Verification
- Antiderivative verified by differentiation ✓
- Adaptive Simpson's rule gives 0.3333333333 ✓
Detailed explanation
Why F(b) − F(a) gives the area
Imagine an area function that measures the area under from up to a moving point . If you nudge forward by a tiny amount , the extra area is a thin strip of height about and width , so . Dividing by and letting it shrink shows that : the area function is an antiderivative of .
Any two antiderivatives differ only by a constant, so for whichever antiderivative you found. Because , the constant is , and the full area is . This is also why the constant of integration never appears in a definite integral: it cancels in the subtraction.
Signed area and absolute area
When a graph dips below the axis, the integral subtracts that part. For the positive hump and the negative hump cancel exactly, and the answer is 0. That is the correct value of the integral, but it is not the area you would shade on a graph.
To find the total area, locate the zeros of the function inside the interval, integrate on each piece and add the absolute values of the pieces. The calculator accepts abs(), so entering abs(x-1) from 0 to 2 returns 1, the combined area of two triangles, while x-1 over the same interval returns 0.
Improper integrals: infinite limits and vertical asymptotes
An integral is improper when an endpoint is infinite or when the integrand becomes unbounded somewhere on the interval. The value is then defined as a limit. For , the calculator finds , takes the limit as , which is 0, subtracts and reports that the integral converges to 1.
The same idea handles asymptotes. converges to 2 because has a finite limit at 0, while diverges because heads to . Both integrands blow up at zero; what decides the outcome is how fast. If the singularity is in the middle of the interval, the integral must be split there and each half must converge separately.
Over the whole real line both ends need a limit. The calculator evaluates as from to and returns exactly .
When there is no formula: numerical integration
Some perfectly ordinary functions have antiderivatives that cannot be written with elementary functions. The bell-shaped , and are standard examples. Their definite integrals still exist; they simply have to be computed numerically.
In that case the calculator uses adaptive Simpson's rule, which fits parabolas to small pieces of the curve and subdivides wherever the estimate is not yet accurate, aiming for an error below . For it reports approximately 0.7468241328, labelled as a numerical approximation so it is never confused with an exact value.
Useful properties that save work
Swapping the limits changes the sign, so . An integral over an interval of zero width is zero. For an odd function such as or , the integral over a symmetric interval is zero, and for an even function it is twice the integral from 0 to . Spotting symmetry before calculating can turn a messy problem into a one-line answer.
Integrals are also linear: constants factor out and sums split into separate integrals. Combined with the interval-splitting rule, these properties let you break a complicated region into pieces that are each easy to handle.
Common mistakes
- Computing instead of , which flips the sign of the answer.
- Dropping brackets when is negative, so that is miscopied as .
- Applying the fundamental theorem across a vertical asymptote, such as integrating from to and getting .
- Treating a signed integral as the total area when part of the graph lies below the axis.
- Using degrees for trigonometric limits; calculus formulas assume radians, so use pi rather than 180.
- Forgetting to change the limits after a substitution, or changing the variable without changing the limits.
Tips
- Sketch the integrand first; it tells you the expected sign and rough size of the answer.
- Check symmetry: odd functions over integrate to zero.
- Before using , confirm the integrand is continuous on the whole closed interval.
- Keep answers exact until the very end; is more useful than 0.785 for later steps.
- Differentiate your antiderivative to confirm it gives back the integrand.
- For area between two curves, integrate the top function minus the bottom function.
Frequently asked questions
What is the difference between a definite and an indefinite integral?
An indefinite integral is a family of functions, F(x) + C. A definite integral has limits and produces a single number, F(b) − F(a). The constant C cancels, which is why it does not appear in definite integral answers.
Can a definite integral be negative?
Yes. When the graph lies below the x-axis on the interval, or when the upper limit is smaller than the lower limit, the signed area is negative. The integral of x² from 1 to 0, for example, is −1/3.
How do I enter infinity as a limit of integration?
Type inf for +∞ or -inf for −∞. The calculator then treats the problem as an improper integral, takes the limit of the antiderivative and reports whether it converges, and to what value.
Why does my integral say it diverges?
The area is not finite. For 1/x on [0, 1] the antiderivative ln x falls without bound as x approaches 0, so no number can represent the area. Divergence is a legitimate answer, not an error.
Why is the answer marked as a numerical approximation?
The integrand has no elementary antiderivative, so the exact value cannot be written with standard functions. The calculator uses adaptive Simpson's rule instead and shows the result to about ten significant digits.
Can I use pi or e as a limit?
Yes. Limits such as pi, pi/2, 2*pi, e or e^2 are accepted, and the calculator keeps them symbolic while evaluating the antiderivative, so ∫ sin x from 0 to π gives exactly 2.
How do I find the total area instead of the signed area?
Integrate the absolute value, for example abs(x-1), or find where the function crosses zero, integrate each piece separately and add the absolute values of the results.
Does the calculator check for discontinuities inside the interval?
Yes. If the integrand becomes infinite between the limits, the integral is treated as improper and the antiderivative's limits at that point decide convergence. It will not blindly apply F(b) − F(a) across an asymptote.
What is the average value of a function on an interval?
It is the definite integral divided by the interval length, (1/(b − a))∫f dx. For x² on [0, 1] the integral is 1/3 and the length is 1, so the average value is 1/3.
Evaluate your definite integral
Enter a function and two limits above to get the exact value, the antiderivative and every evaluation step, including improper integrals.