Trading Dev AcademyFree quant education

Free lesson · Integral calculus

Antiderivatives and the fundamental theorem

Open interactive lessonPractice calculationsExplore labs

Start with the idea

  • Differentiation extracts a rate from an accumulated quantity.
  • Integration reconstructs the accumulated change from that rate.
  • The fundamental theorem connects these operations under continuity assumptions.
Symbols, units & horizon
  • F: an antiderivative of f
  • F′: its derivative
  • a,b: fixed bounds
  • A(x): accumulated integral up to x
  • t: dummy integration variable
  • C: arbitrary additive constant, not a closing price
  • F(b)−F(a): ending accumulated value minus starting value
  • d/dx: derivative with respect to the upper-bound variable

When and why to use this

Use antiderivatives for exact integrals when available, and use initial conditions to recover absolute levels from rates. Always differentiate a proposed antiderivative to check it.

  • An antiderivative F of f satisfies F′=f.
  • Any added constant has zero derivative, so an indefinite integral is a family F(x)+C.
  • A definite integral returns a number for fixed bounds; the arbitrary constant cancels.
  • For continuous f, A(x)=∫ from a to x of f(t)dt has derivative f(x).
  • This explains why evaluating an antiderivative at two endpoints produces the accumulated change.
  • The integration variable t is a dummy label and differs from the moving upper endpoint x.
F′=f⇒∫abf(x)dx=F(b)−F(a),ddx∫axf(t)dt=f(x)
Calculus: derivation and arithmetic

Antiderivatives and the fundamental theorem

  1. First reverse the power rule: f(x)=3x2 has antiderivative F(x)=x3+C, since F′(x)=3x2.
  2. Evaluate both endpoints and subtract: ∫123x2dx=F(2)−F(1)=(8+C)−(1+C)=7. The arbitrary constant cancels.
  3. Define accumulated area A(x)=∫axf(t)dt. Additivity gives A(x+h)−A(x)=∫xx+hf(t)dt.
  4. Divide by the nonzero interval width: A(x+h)−A(x)h=1h∫xx+hf(t)dt. This is the local average of the rate.
  5. For continuous f, let h→0: the local average tends to f(x), so A′(x)=f(x). This limit is the calculus step; endpoint subtraction above is algebra.
Work it by hand

If velocity is v(t)=3t² metres/second with t in seconds and the coefficient carrying the required units, displacement from t=1 to t=2 is 7 metres. An initial position of 100 metres makes the final position 107, not 7.

Architecture pseudocode

def integrate_antiderivative(antiderivative,a,b):
    return antiderivative(b)-antiderivative(a)

def recover_level(initial_level,antiderivative,start,end):
    return initial_level+integrate_antiderivative(antiderivative,start,end)

print(integrate_antiderivative(lambda x:x**3,1,2),recover_level(100,lambda t:t**3,1,2))

An analogy to remember

The slope of an odometer reading is speed. Integrating the speed reconstructs distance travelled, while the starting odometer reading supplies the missing constant.

How this becomes a building block

The theorem is a bridge between rate equations and accumulated values. For deterministic continuous growth, integrating the log-growth rate gives a log wealth factor, which must then be exponentiated. It is also used to evaluate density integrals and continuous cash-flow formulas.

Python implementation

Self-contained teaching example. Python 3.10+; dependencies and input conventions are shown in the code and notation. Run in your own Python environment.

def integrate_antiderivative(antiderivative,a,b):
    return antiderivative(b)-antiderivative(a)

def recover_level(initial_level,antiderivative,start,end):
    return initial_level+integrate_antiderivative(antiderivative,start,end)

print(integrate_antiderivative(lambda x:x**3,1,2),recover_level(100,lambda t:t**3,1,2))

Continue learning

Integral Calculus: Accumulation & Area — all lessons
  1. Start with rectangles: rate × time = amount
  2. Definite integrals: adding many small contributions
  3. Core integral rules: undo a derivative, then check
  4. Antiderivatives and the fundamental theorem
  5. Integration techniques: substitution and integration by parts
  6. Improper integrals, densities and continuous expectations
  7. Numerical integration and a continuous cash-flow building block
  8. Substitution: reverse the chain rule without losing the bounds
  9. Integration by parts: transfer a derivative

Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations