Skip to content
AI360XpertBeta

Definite and Indefinite Integrals

An indefinite integral is the whole family of curves sharing one slope pattern; a definite integral picks two endpoints and returns one number.

Three parallel cubic curves differing by vertical shifts stand for one indefinite integral family, while a shaded band under x squared from 0 to 2 shows the definite integral collapsing to the single number 8 thirds
Three parallel cubic curves differing by vertical shifts stand for one indefinite integral family, while a shaded band under x squared from 0 to 2 shows the definite integral collapsing to the single number 8 thirds

Why Does This Exist?

Expected values, marginal probabilities and cumulative metrics are definite integrals. Each returns one number with units. Recovering position from velocity, or a loss from its gradient field, is an indefinite integral. It returns a family of curves that differ by a starting offset. Mix the two and you hand back the wrong shape entirely, a function where a number belongs or a number where a curve belongs.

Integration and area builds the area picture. This page draws the boundary both notations share: with limits you compute, without limits you describe.

The one idea you need first

An antiderivative of ff is any FF with F′=fF' = f. Constants differentiate to zero, so antiderivatives come in families. If x3/3x^3/3 works for x2x^2, so does x3/3+5x^3/3 + 5. That +C+C is the whole difference between the two integral kinds.

Think of It Like This

A speedometer with and without a trip meter

An indefinite integral is a speed history with no starting odometer. From speeds alone you rebuild the route shape but not its position, and every rebuild shifts by the unknown start. The +C+C is that unknown start.

A definite integral presses the trip meter at mile 00 and mile 22 and reports one number. Same speeds, but endpoints pin the answer to 8/38/3 miles. Limits are the trip meter. Without them you own a shape, with them you own a measurement.

How It Actually Works

Indefinite integral: a function family. ∫f(x) dx=F(x)+C\int f(x)\,dx = F(x) + C collects every antiderivative. Example: ∫x2 dx=x3/3+C\int x^2\,dx = x^3/3 + C, because differentiating x3/3+Cx^3/3 + C returns x2x^2 for any constant CC. No limits, no number, just the family.

Definite integral: one number. ∫abf(x) dx=F(b)−F(a)\int_a^b f(x)\,dx = F(b) - F(a) evaluates the family at both ends and subtracts, so every CC cancels: (F(b)+C)−(F(a)+C)=F(b)−F(a)(F(b) + C) - (F(a) + C) = F(b) - F(a). Limits, one number, units of ff times units of xx.

Worked example

Integrate f(x)=x2f(x) = x^2 both ways.

Indefinite: ∫x2 dx=x3/3+C\int x^2\,dx = x^3/3 + C. Check by differentiating: ddx(x3/3+C)=x2\frac{d}{dx}(x^3/3 + C) = x^2. Members include x3/3x^3/3, x3/3+1x^3/3 + 1 and x3/3−7x^3/3 - 7. They are parallel curves with identical slopes everywhere, as drawn up top.

Definite from 00 to 22: ∫02x2 dx=[x3/3]02=8/3−0=8/3≈2.667\int_0^2 x^2\,dx = [x^3/3]_0^2 = 8/3 - 0 = 8/3 \approx 2.667. One number, about 2.672.67 square units. Any CC you carried cancels in the subtraction, which is why definite answers never mention it.

Watch Out For

Dropping the plus C in the indefinite case

The symptom is a general solution that misses most solutions. You report x3/3x^3/3 as the antiderivative and silently drop every vertical shift, then initial conditions have nothing to grip. In ML this bites when you rebuild potentials or integrate gradient fields: one constant per component, each needing its own condition.

Write +C+C every time limits are absent, and trade it for a fitted constant the moment data arrives.

Handing a function where a number belongs

The symptom is a probability or expectation left as an unevaluated antiderivative. The shape is right and the type is wrong, so every consumer breaks. Definite integrals answer how much, indefinite integrals answer what shape.

If the question names endpoints, evaluate at both and subtract. If it asks for the family, keep CC and stop.

The Quick Version

  • Indefinite integrals return curve families: ∫x2 dx=x3/3+C\int x^2\,dx = x^3/3 + C.
  • Definite integrals return numbers: ∫02x2 dx=8/3≈2.667\int_0^2 x^2\,dx = 8/3 \approx 2.667.
  • The +C+C cancels in F(b)−F(a)F(b) - F(a), so definite answers never carry it.
  • No limits means describe the family, limits mean compute the measurement.
  • Always verify by differentiating the antiderivative back.
  • Shape questions want +C+C, how much questions want endpoints evaluated.