Chapter 09
Integral
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.
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?
In short, the integral is the inverse of differentiation — it “undoes” the derivative. We use the symbol , and the definite integral over an interval is written .
It is tied to area: the area between the curve, the -axis, and the lines and is defined by the definite integral. For a positive function, that value is the “area under the curve”.
A definite integral is computed by finding the “undo” function (one whose derivative is the integrand), then plugging in the upper and lower limits and subtracting. Core formula: when , . We call an antiderivative of — you can just think of it as the function we substitute into.
We use it in daily life too. When speed varies, total distance is the integral of speed. Total quantity over time (e.g. logistics, power consumption) is also found by integrating over an interval.
In probability, the chance that a continuous variable falls in some range is the integral of the probability density over that range — e.g. “temperature between 20–25°C”, or “dimension within tolerance” in quality control.
In artificial intelligence and deep learning, integration is essential. Models that use continuous probability distributions (image generation, speech, prediction) compute interval probabilities and expectations via integration. Distribution-based models like VAE, normalizing flows, and Bayesian neural networks cannot be fully described without integrals, and in reinforcement learning the expected cumulative reward is an integral. Ch10–Ch12 on probability and distributions use integration naturally.
In physics, distance, work, charge, and flow are often “cumulative” quantities obtained by integration. Integrating acceleration gives velocity; integrating velocity gives distance.
In economics, demand or cost over time is sometimes aggregated using integration when the flow is continuous.
In AI, integration is used in these ways: (1) Generative models — VAE, diffusion models, etc. compute expectations and log-likelihood of continuous distributions by integration. (2) Bayesian inference — posterior means and probabilities are integrals. (3) Reinforcement learning — a policy’s expected reward is the integral of the reward function. (4) Continuous outputs — when a prediction is an interval, “probability of falling in that interval” is also an integral. Learning definite integrals and antiderivatives here makes Ch10+ probability and AI chapters much easier.
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 is , so if we “undo” that, the antiderivative of is . 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 , is the lower limit and is the upper limit. If you see , 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: → , constant → , → . For a sum, find the “undo” for each term and add them.
Step 3: Substitute and subtract — Plug the upper limit into , plug the lower limit , and subtract: . That’s the answer.
Check and tips — Differentiate your to make sure you get the integrand back. Always use .
What is an "indefinite integral"? — When there are no upper/lower limits, we write the antiderivative + C only. Example: . Here is any constant. If a problem later asks "what is the value at ?", you just plug 2 into ; in this course we take , so the answer is . Think of the indefinite integral as the antiderivative with used in definite integrals.
“Find the value of the antiderivative at a given point” — When the problem gives you the antiderivative (e.g. ) and asks “what is the value at ?”, substitute 2 into that expression. With , is the answer.
Example problems and step-by-step solutions. (Steps ①·②·③ for definite integrals; ①·② only for the substitution example.)
Ex 1.
① Lower 0, upper 2.
② "Undo" of is .
③ → 6
Ex 2.
① Lower 1, upper 3.
② "Undo" of is .
③ → 8
Ex 3.
① Lower 0, upper 2.
② →, → so .
③ → 4
Ex 4. , value at ?
① Substitute into .
② , ⇒ → 4