Skip to content
Omnikalc

Definite integral of a polynomial, step by step

Calculate the definite integral of a polynomial up to degree 4 between two bounds, with the antiderivative at each bound and the average value of the function.

Updated on
Your inputs

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Results

Definite integral

6

Signed area between the curve and the x-axis
Antiderivative at the upper bound, F(b)
6
Antiderivative at the lower bound, F(a)
0
Average value of the function
3
Simpson's rule estimate (exact up to degree 3)
6
Value at the lower bound, f(a)
1
Value at the upper bound, f(b)
9

Area under a curve

The definite integral of a function f between two numbers a and b adds up the values of f across the interval. Geometrically, it is the signed area between the curve y = f(x) and the x-axis, from x = a to x = b: area above the axis counts as positive, area below as negative. Integrals appear wherever quantities accumulate, from distance traveled to work done and total probability.

The fundamental theorem of calculus

To compute a definite integral, find an antiderivative F, a function whose derivative is f, and subtract its values at the bounds:

∫ f(x) dx from a to b = F(b) − F(a)

For polynomials, the antiderivative follows one simple rule: the antiderivative of xⁿ is xⁿ⁺¹ ÷ (n + 1). The calculator handles any polynomial up to degree 4:

F(x) = p₄x⁵/5 + p₃x⁴/4 + p₂x³/3 + p₁x²/2 + p₀x

Worked example

Integrate f(x) = 3x² − 2x + 1 from 0 to 2:

  • Antiderivative: F(x) = x³ − x² + x.
  • F(2) = 8 − 4 + 2 = 6. F(0) = 0.
  • Definite integral: 6 − 0 = 6.
  • Average value of f on the interval: 6 ÷ 2 = 3.
  • f(0) = 1, f(1) = 2 and f(2) = 9, so Simpson’s rule gives 2 ÷ 6 × (1 + 4 × 2 + 9) = 6, exactly right because the polynomial has degree 2.

Properties worth knowing

  • Reversing the bounds changes the sign: ∫ from b to a = −∫ from a to b.
  • Splitting: ∫ from a to c = ∫ from a to b + ∫ from b to c.
  • Linearity: the integral of a sum is the sum of the integrals, and constants factor out.
  • Odd functions integrated over a symmetric interval such as −2 to 2 give 0, because the areas above and below cancel.

Signed area versus total area

If the curve crosses the x-axis, the definite integral subtracts the parts below the axis. For example, x from −1 to 1 gives 0 even though the shaded regions have a total area of 1. To get the total geometric area, find where the function equals zero, integrate each piece separately, and add the absolute values.

Average value

The average value of f on [a, b] is the integral divided by b − a. It is the height of a rectangle with the same base and the same area as the region under the curve. If f is a speed, the average value is the average speed over the time interval.

Numerical methods

For functions without a simple antiderivative, integrals are estimated numerically. Simpson’s rule fits a parabola through the two endpoints and the midpoint: (b − a) ÷ 6 × (f(a) + 4f(m) + f(b)). It is exact for polynomials up to degree 3, which makes it a good check on the exact result for cubic and lower functions. For degree 4 it is close but not exact; splitting the interval into more pieces improves the estimate.

Frequently asked questions

What is a definite integral?

The signed area between the curve y = f(x) and the x-axis from x = a to x = b. Areas above the axis count as positive and areas below it as negative.

How do you integrate a polynomial?

Raise each power by one and divide by the new power: the antiderivative of xⁿ is xⁿ⁺¹ ÷ (n + 1). Then evaluate it at both bounds and subtract: ∫ f(x) dx from a to b = F(b) − F(a). For 3x² − 2x + 1, F(x) = x³ − x² + x.

What is the average value of a function?

The definite integral divided by the length of the interval. It is the height of the rectangle with the same area as the region under the curve. In the example, 6 ÷ 2 = 3.

Why is Simpson's rule exact here?

Simpson's rule fits a parabola through three points, and it is exact for any polynomial up to degree 3. For degree 4 it gives a close estimate. Comparing it with the exact value shows how numerical integration works.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.