Definite integral in this visualization
For an integrable function and limits , the definite integral is the area between the graph and the x-axis that lies above the axis, minus the area that lies below it. Here the region from a to b is drawn piece by piece: solid where it counts as plus, hatched where it counts as minus, and the readout writes the integral as solid minus hatched. Beside it is the area between the limits, , which counts every piece as plus; the two agree only when the curve stays above the axis. The integral is defined as a limit of Riemann sums; for the polynomials on this page it is computed exactly from an antiderivative.
Why below the axis counts as minus
Each term of a Riemann sum is a height times a width, . Below the axis the height is negative, so that strip counts against the total. The width has a sign too: going from a to b, , so when b lies to the left of a every piece changes sign. That is why , why a region below the axis counts as plus when it is run from right to left, and why .
Splitting the interval
For any three points, . With c between a and b this cuts the region in two. It still holds when c lies outside: the stretch beyond the interval is run out to c and back again, once with each sign, and the two cancel. The page outlines that stretch instead of shading it, so the shading always means the area between the limits.
Lifting the curve
Adding a constant to f adds a band of height m and width : . The band follows the curve, but its signed area is that of a rectangle; the dashed curve shows where f was.
Average height
Dividing the integral by the width gives the average height, for . The rectangle of height over the interval has the same signed area as the curve. It is generally not the average of the two end heights. If f is continuous, the curve takes the value somewhere between a and b; this is the mean value theorem for integrals.
Things to notice
- The integral of an odd function over an interval centred at 0 is 0: x³ − 4x from −2 to 2, where that curve starts on this page.
- Integrated forward in time, a velocity gives the displacement, not the distance travelled; the distance is the integral of the speed .
- Changing an integrable function at finitely many points does not change its integral.
Controls
- Drag a and b along the x-axis, or press Swap a and b. Drag the curve up or down, or use the Shift up fader.
- With the keyboard, Tab to a handle and use the left and right arrow keys; hold Shift for steps of 1.