MatheLinuxMatheLinux
Curriculum
Sign inStart free
Calculus for Quants
0%

0 of 15 lessons complete

Lessons

  • Limits & Continuity8m
  • The Derivative & Differentiation Rules8m
  • Taylor & Maclaurin Series8m
  • Optimization: Critical Points & Convexity8m
  • The Riemann Integral & the FTC8m
  • Techniques of Integration8m
  • Improper Integrals & Convergence8m
  • Integration for Probability Densities8m
  • Partial Derivatives & the Gradient8m
  • The Hessian & Second-Order Conditions8m
  • Lagrange Multipliers8m
  • Multiple Integration & the Jacobian8m
  • Vector Fields: Gradient, Divergence, Curl8m
  • Line & Surface Integrals8m
  • Green, Stokes & the Divergence Theorem8m

MatheLinux — quantitative finance, taught rigorously.

Course content credited to Ibrahim Lanre Adedimeji.

← Calculus for Quants

The idea of a limit

Before we can differentiate or integrate anything, we need a precise way to talk about what a function approaches. A limit answers the question: as the input xxx slides toward some value aaa, does the output f(x)f(x)f(x) settle near a single number LLL? Crucially, the limit ignores what happens at x=ax=ax=a itself; it cares only about the neighborhood around aa.

Knowledge check

Q1. In the epsilon-delta definition, what is the logical order of quantifiers?

Q2. Why does the two-sided limit of x/|x| fail to exist at 0?

Q3. The function (x^2-1)/(x-1) at x=1 has which kind of discontinuity?

Q4. The Intermediate Value Theorem guarantees a root of x^3 - x - 1 in (1,2) because:

Problems

P1

Compute the limit as x approaches infinity of (3x^2 + 5)/(x^2 - 1). Give a decimal.

P2

Using the epsilon-delta definition for lim_{x->3}(2x+1)=7, find the largest delta that works for epsilon = 0.1. Give a decimal.

Mark this lesson complete to track progress
a

This distinction matters for quants. A bond price as time-to-maturity shrinks, an option's implied volatility as the strike approaches the forward, a Monte Carlo estimator as the path count grows: each is a limit, and each may behave badly exactly at the point of interest while being perfectly well-behaved nearby.

Formal definition (epsilon-delta)

The rigorous definition pins down "approaches" with two tolerances.

lim⁡x→af(x)=L  ⟺  ∀ ε>0    ∃ δ>0    s.t.    0<∣x−a∣<δ  ⟹  ∣f(x)−L∣<ε.\lim_{x \to a} f(x) = L \iff \forall\, \varepsilon > 0\;\; \exists\, \delta > 0 \;\; \text{s.t.}\;\; 0 < |x - a| < \delta \implies |f(x) - L| < \varepsilon.limx→a​f(x)=L⟺∀ε>0∃δ>0s.t.0<∣x−a∣<δ⟹∣f(x)−L∣<ε.

Read it as a game: you name an output tolerance ε\varepsilonε, and I must produce an input tolerance δ\deltaδ so that every xxx within δ\deltaδ of aaa (but not equal to aaa) lands within ε\varepsilonε of LLL. If I can always win, the limit is LLL.

A worked epsilon-delta derivation

Claim: lim⁡x→3(2x+1)=7\lim_{x \to 3}(2x+1) = 7limx→3​(2x+1)=7. Given ε>0\varepsilon > 0ε>0, we need δ\deltaδ so that ∣x−3∣<δ|x-3| < \delta∣x−3∣<δ forces ∣(2x+1)−7∣<ε|(2x+1)-7| < \varepsilon∣(2x+1)−7∣<ε. Now

∣(2x+1)−7∣=∣2x−6∣=2∣x−3∣.|(2x+1) - 7| = |2x - 6| = 2|x-3|.∣(2x+1)−7∣=∣2x−6∣=2∣x−3∣.

We want 2∣x−3∣<ε2|x-3| < \varepsilon2∣x−3∣<ε, i.e. ∣x−3∣<ε/2|x-3| < \varepsilon/2∣x−3∣<ε/2. So choose δ=ε/2\delta = \varepsilon/2δ=ε/2. Then ∣x−3∣<δ|x-3| < \delta∣x−3∣<δ gives ∣(2x+1)−7∣=2∣x−3∣<2δ=ε|(2x+1)-7| = 2|x-3| < 2\delta = \varepsilon∣(2x+1)−7∣=2∣x−3∣<2δ=ε. The game is won for every ε\varepsilonε, so the limit is exactly 777.

One-sided limits and limits at infinity

Sometimes the approach direction matters. The right-hand limit lim⁡x→a+f(x)\lim_{x \to a^+} f(x)limx→a+​f(x) restricts to x>ax > ax>a; the left-hand limit lim⁡x→a−f(x)\lim_{x \to a^-} f(x)limx→a−​f(x) restricts to x<ax < ax<a. The two-sided limit exists if and only if both one-sided limits exist and agree.

Example: for f(x)=x/∣x∣f(x) = x/|x|f(x)=x/∣x∣, the right limit at 000 is +1+1+1 and the left limit is −1-1−1, so lim⁡x→0f(x)\lim_{x \to 0} f(x)limx→0​f(x) does not exist.

A limit at infinity describes long-run behavior: lim⁡x→∞f(x)=L\lim_{x \to \infty} f(x) = Llimx→∞​f(x)=L means f(x)f(x)f(x) can be forced within ε\varepsilonε of LLL for all sufficiently large xxx. Formally, for every ε>0\varepsilon > 0ε>0 there is an MMM such that x>Mx > Mx>M implies ∣f(x)−L∣<ε|f(x) - L| < \varepsilon∣f(x)−L∣<ε; the threshold MMM plays the role δ\deltaδ played before. For instance

lim⁡x→∞3x2+5x2−1=3,\lim_{x \to \infty} \frac{3x^2 + 5}{x^2 - 1} = 3,limx→∞​x2−13x2+5​=3,

found by dividing numerator and denominator by x2x^2x2 and noting the 5/x25/x^25/x2 and 1/x21/x^21/x2 terms vanish. The same technique handles the asymptotic yield of a perpetuity or the limiting price of a long-dated cash flow.

Limits also obey clean algebraic laws that let us avoid epsilon-delta for routine work. If lim⁡x→af(x)\lim_{x\to a} f(x)limx→a​f(x) and lim⁡x→ag(x)\lim_{x\to a} g(x)limx→a​g(x) both exist, then the limit of a sum, difference, product, or quotient (denominator limit nonzero) is the corresponding combination of the limits. These laws, provable from the definition, are why we can compute most limits by substitution once continuity is established.

Continuity and its failures

A function fff is continuous at aaa when the limit exists, the value exists, and they coincide:

lim⁡x→af(x)=f(a).\lim_{x \to a} f(x) = f(a).limx→a​f(x)=f(a).

Three standard ways this breaks:

  • Removable: the limit exists but differs from (or is missing) the value, e.g. g(x)=x2−1x−1g(x) = \frac{x^2-1}{x-1}g(x)=x−1x2−1​ at x=1x=1x=1, where the limit is 222 but g(1)g(1)g(1) is undefined. Redefining the point patches the hole.
  • Jump: left and right limits exist but disagree, as with x/∣x∣x/|x|x/∣x∣ at 000.
  • Infinite (essential): a limit blows up, e.g. 1/x1/x1/x at 000.

Intermediate Value Theorem

If fff is continuous on a closed interval [a,b][a,b][a,b] and NNN lies between f(a)f(a)f(a) and f(b)f(b)f(b), then there exists ccc in (a,b)(a,b)(a,b) with f(c)=Nf(c) = Nf(c)=N. Concretely, take f(x)=x3−x−1f(x) = x^3 - x - 1f(x)=x3−x−1. Since f(1)=−1<0f(1) = -1 < 0f(1)=−1<0 and f(2)=5>0f(2) = 5 > 0f(2)=5>0, continuity guarantees a root somewhere in (1,2)(1,2)(1,2). This is the theoretical engine behind bisection root-finding.

Why quants care

Continuity is the license to use calculus at all. Pricing functions must be continuous in their inputs for hedge ratios (derivatives) to exist and for interpolation of yield curves to be sound. The IVT underpins bisection, the workhorse for inverting Black-Scholes to recover implied volatility from a market price: because price is continuous and monotone in volatility, a bracketed root must exist and can be squeezed numerically. Jump discontinuities flag genuine modeling hazards: a payoff with a jump (a digital option) cannot be delta-hedged smoothly near the strike, which is exactly where risk concentrates.

Adapted from MIT OpenCourseWare (18.01 / 18.02 Calculus), CC BY-NC-SA.