Skip to content
AI360Xpert
Beta

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: single numbers with units. Recovering a position from velocity data, or a loss from its gradient field, is an indefinite integral: a family of curves differing by a starting offset. Confusing the two produces answers with the wrong shape entirely, a function where a number belongs or a number where a curve belongs.

Integration and area builds the area intuition. This page draws the boundary both notations share: when the integral sign carries limits it computes, and when it does not it describes.

The one idea you need first

An antiderivative of ff is any FF with F′=fF' = f. Since constants differentiate to zero, 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 not decoration; it 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 speedometer history with no starting odometer: from speeds alone you reconstruct the route's shape but not its position, every reconstruction shifted by the unknown starting mile. The +C+C is that unknown start.

A definite integral sets two trip-meter presses, at mile 0 and mile 2, and reports one number: distance covered between presses. Same speeds, but the endpoints pin the answer down 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 endpoints 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. Verify 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, x3/3−7x^3/3 - 7: parallel curves, identical slopes everywhere.

Definite from 0 to 2: ∫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.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: reporting x3/3x^3/3 as the antiderivative silently discards every vertical shift, and downstream initial conditions then have nothing to grip. In ML this bites when reconstructing potentials or integrating gradient fields: one integration constant per component, each needing its own condition. Write +C+C every time the 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: correct shape, wrong type, and every consumer breaks. Definite integrals answer "how much"; indefinite integrals answer "what shape." If the question names endpoints ("from 0 to 2," "over the batch," "expected value"), evaluate at both and subtract. If it asks for the family ("solve," "recover," "find all"), 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.