Itô's lemma for f(x) = x² — the discrete squaring identity #
For f(x) = x² the discrete Itô formula (discrete_ito_formula) collapses
to an exact algebraic identity, because the second-order Taylor expansion
of x² around any point is exact — the third-order remainder vanishes.
For any real sequence X : ℕ → ℝ and any N,
X_N² − X_0² = 2 · ∑_{k<N} X_k · (X_{k+1} − X_k) + ∑_{k<N} (X_{k+1} − X_k)².
This is the discrete Itô formula for squaring — the pre-probabilistic
content of B_t² − B_0² = 2 ∫₀ᵗ B_s dB_s + ⟨B⟩_t, the keystone Itô
identity that drives variance-swap pricing, the Black–Scholes PDE
derivation, and (via Doob's quadratic-variation theorem) the very
definition of the stochastic integral against a martingale.
The identity is pathwise (one ω at a time) and contains no
probability; the probabilistic L² version requires the continuous-time
Itô integral as a process plus the L² convergence of the partition QV
to deterministic t. That bridge is deferred to a follow-up: see the
"continuous Itô lemma" track in the resume plan.
Main results #
discreteTaylorRemainder_sq— the Taylor remainder forf = x²is0.discrete_squaring_identity— the pathwise identityX_N² − X_0² = 2·∑ X_k·ΔX_k + ∑ (ΔX_k)².
For f(x) = x², with f'(x) = 2x and f''(x) = 2, the discrete Taylor
remainder vanishes identically — x ↦ x² is its own second-order Taylor
expansion at every point.
Discrete Itô formula for squaring. For any real sequence X and N,
X_N² − X_0² = 2 · ∑_{k<N} X_k · ΔX_k + ∑_{k<N} (ΔX_k)².
Specialisation of discrete_ito_formula to f(x) = x² (where the Taylor
remainder is identically 0 — discreteTaylorRemainder_sq).
Discrete Itô-squaring rearranged (the form that directly tracks
B_T² − B_0²): writes X_N² as X_0² plus the Itô-sum-with-itself plus
the quadratic variation along the partition.