Everyone's AI
Machine learningAI Papers
Loading...

Learn

🏅My achievements

Chapter 09

Integral: Area and Accumulation, a Bridge to Probability

Integration is the inverse of differentiation. It is used for area under a curve, cumulative quantities, and for probability and expectation.

Math diagram by chapter

Select a chapter to see its diagram below. View the flow of basic math at a glance.

ab

The gap between the rectangles and the curve shrinks as you use more slices; in the limit you get the exact area (the integral).

The definite integral represents the area under the curve. Find an antiderivative and plug in the upper and lower limits.

What is the integral?

The integral is the inverse of differentiation. If differentiation is like slicing bread very thin (finding the rate of change), integration is putting those thin slices back together to get the original amount (area or total quantity). The symbol ∫\int∫ (integral) is a stretched letter S for Sum. The Fundamental Theorem of Calculus rigorously proves that differentiation and integration are inverse operations. Thanks to it, we can compute definite integrals by finding an antiderivative instead of taking limits directly.
It is the precise tool for area under a curve. For a wiggly curve, we add infinitely many very thin rectangles (width almost 0) to get the exact area. Mathematically it means the total of accumulated change.
A definite integral has a fixed start aaa and end bbb. To compute it we first find the antiderivative FFF (the function whose derivative is the integrand), then take F(b)−F(a)F(b) - F(a)F(b)−F(a) — i.e. “later state minus initial state” — to get the accumulated result (area or total amount).
Essential for cumulative quantities in daily life. A car’s speed vvv changes every moment; integrating it over time ttt gives total distance. Integrating the flow from a tap gives total water in the bathtub. Whenever we “add up” a changing quantity, we use integration.
Key to continuous probability. For continuous data (height, weight), “probability that height is between 170–180 cm” is the area under the probability density curve over that interval — i.e. the integral. So the integral value is the probability of that event.
It underlies AI decision-making. When AI chooses under uncertainty, it computes expectation (each outcome times its probability, summed). That sum is mathematically an integral. Generative models (VAE, Diffusion) and reinforcement learning (expected cumulative reward) cannot move a single step without integration.
In physics, work and energy: integrating force over distance gives work; integrating acceleration gives velocity, integrating velocity gives position — used to predict trajectories and motion.
In economics, integration is used to find total demand or supply over time and to compute consumer and producer surplus for market efficiency.
AI performance and optimization: AUC (Area Under Curve) is literally an integral. Normalization (making total probability 1) also involves integration over the whole range. Every time we treat data flow probabilistically inside a network, integration is at work.
For a definite integral, follow ① identify lower and upper limits →
② find the “undo” function →
③ (value at upper limit) − (value at lower limit).
What is an “antiderivative”? — It’s the function you get when you undo the derivative of the expression inside the integral. Example: the derivative of 2x2x2x is 222, so if we “undo” that, the antiderivative of 222 is 2x2x2x. You can just think of it as the function we plug the limits into and subtract — no need to worry about the name.
Step 1: Identify lower and upper limits — In ∫abf(x) dx\int_a^b f(x)\,dx∫ab​f(x)dx, aaa is the lower limit and bbb is the upper limit. If you see ∫13\int_1^3∫13​, then lower is 1 and upper is 3.
Step 2: Find the “undo” function (antiderivative) — Find a function that, when differentiated, gives the expression inside the integral. Common rules: xnx^nxn → xn+1/(n+1)x^{n+1}/(n+1)xn+1/(n+1), constant ccc → cxcxcx. exe^xex stays exe^xex (its derivative is itself). For xnx^nxn: e.g. x2→x3/3x^2 \to x^3/3x2→x3/3, x3→x4/4x^3 \to x^4/4x3→x4/4. For a sum, find the “undo” for each term and add them.
Step 3: Substitute and subtract — Plug the upper limit bbb into F(x)F(x)F(x), plug the lower limit aaa, and subtract: F(b)−F(a)F(b)-F(a)F(b)−F(a). That’s the answer.
Check and tips — Differentiate your F(x)F(x)F(x) to make sure you get the integrand back. Always use F(upper)−F(lower)F(\text{upper})-F(\text{lower})F(upper)−F(lower).
What is an "indefinite integral"? — When there are no upper/lower limits, we write the antiderivative + C only. Example: ∫2x dx=x2+C\int 2x\,dx = x^2 + C∫2xdx=x2+C. Here CCC is any constant. If a problem later asks "what is the value at x=2x=2x=2?", you just plug 2 into x2+Cx^2+Cx2+C; in this course we take C=0C=0C=0, so the answer is 22=42^2=422=4. Think of the indefinite integral as the antiderivative with +C+C+C used in definite integrals.
“Find the value of the antiderivative at a given point” — When the problem gives you the antiderivative (e.g. ∫2x dx=x2+C\int 2x\,dx = x^2+C∫2xdx=x2+C) and asks “what is the value at x=2x=2x=2?”, substitute 2 into that expression. With C=0C=0C=0, 22=42^2=422=4 is the answer.
Example problems and step-by-step solutions. (Steps
①·
②·
③ for definite integrals;
①·
② only for the substitution example.)
Ex 1. ∫023 dx\int_0^2 3\,dx∫02​3dx
① Lower 0, upper 2.
② "Undo" of 333 is 3x3x3x.
③ 3⋅2−3⋅0=63\cdot 2 - 3\cdot 0 = 63⋅2−3⋅0=6 → 6
Ex 2. ∫132x dx\int_1^3 2x\,dx∫13​2xdx
① Lower 1, upper 3.
② "Undo" of 2x2x2x is x2x^2x2.
③ 32−12=83^2 - 1^2 = 832−12=8 → 8
Ex 3. ∫02(1+x) dx\int_0^2 (1+x)\,dx∫02​(1+x)dx
① Lower 0, upper 2.
② 111→xxx, xxx→x2/2x^2/2x2/2 so x+x2/2x + x^2/2x+x2/2.
③ (2+2)−(0+0)=4(2+2)-(0+0)=4(2+2)−(0+0)=4 → 4
Ex 4. ∫2x dx=x2+C\int 2x\,dx = x^2+C∫2xdx=x2+C, value at x=2x=2x=2?
① Substitute into x2+Cx^2+Cx2+C.
② x=2x=2x=2, C=0C=0C=0 ⇒ 22=42^2 = 422=4 → 4
Problem types and how to solve
  • TypeConstant definite
  • Description∫abc dx\int_a^b c\,dx∫ab​cdx
  • How to get the answerAntiderivative cxcxcx. (upper) − (lower) = c(b−a)c(b-a)c(b−a).
  • TypeLinear definite
  • Description∫ab(mx+k) dx\int_a^b (mx+k)\,dx∫ab​(mx+k)dx
  • How to get the answerAntiderivative m2x2+kx\frac{m}{2}x^2 + kx2m​x2+kx. Compute F(b)−F(a)F(b)-F(a)F(b)−F(a).
  • TypeAntiderivative value
  • DescriptionIndefinite integral given, value at x=kx=kx=k
  • How to get the answerSubstitute kkk into that expression. (C=0C=0C=0 ⇒ F(k)F(k)F(k).)
TypeDescriptionHow to get the answer
Constant definite∫abc dx\int_a^b c\,dx∫ab​cdxAntiderivative cxcxcx. (upper) − (lower) = c(b−a)c(b-a)c(b−a).
Linear definite∫ab(mx+k) dx\int_a^b (mx+k)\,dx∫ab​(mx+k)dxAntiderivative m2x2+kx\frac{m}{2}x^2 + kx2m​x2+kx. Compute F(b)−F(a)F(b)-F(a)F(b)−F(a).
Antiderivative valueIndefinite integral given, value at x=kx=kx=kSubstitute kkk into that expression. (C=0C=0C=0 ⇒ F(k)F(k)F(k).)

Example (constant definite)
Find ∫023 dx\int_0^2 3\,dx∫02​3dx.
Solution
Antiderivative is 3x3x3x. (3×2)−(3×0)=6(3\times 2)-(3\times 0)=6(3×2)−(3×0)=6. → Answer 6

Example (linear definite)
Find ∫132x dx\int_1^3 2x\,dx∫13​2xdx.
Solution
Antiderivative is x2x^2x2. 32−12=9−1=83^2-1^2=9-1=832−12=9−1=8. → Answer 8

Example (antiderivative value)
Given ∫2x dx=x2+C\int 2x\,dx = x^2+C∫2xdx=x2+C, find the value at x=2x=2x=2. (C=0C=0C=0)
Solution
Substitute 222 into x2x^2x2 → 444. → Answer 4