1. Metric Spaces & $\epsilon$-$\delta$ Formalism of Limits
Let $f: D \to \mathbb{R}$ be a real-valued function defined on a domain $D \subseteq \mathbb{R}$, and let $x_0 \in \mathbb{R}$ be a limit point of $D$. We formally define the limit of $f(x)$ as $x$ approaches $x_0$ using Weierstrass $\epsilon$-$\delta$ quantification:
$$\lim_{x \to x_0} f(x) = L \iff \forall \epsilon > 0, \; \exists \delta > 0 \text{ s.t. } \forall x \in D, \; 0 < |x - x_0| < \delta \implies |f(x) - L| < \epsilon$$ Weierstrass Epsilon-Delta Limit Geometry
Y ▲
│
L + ε ┼─────────────────────┌───────────┐
L ┼─────────────────────┼─── * (L) │
L - ε ┼─────────────────────└─────│─────┘
│ │
└───────────────┬───────────┼───────────┬────────► X
x_0-δ x_0 x_0+δ
Sequential Criterion for Limits
By Bolzano-Weierstrass topology, $\lim_{x \to x_0} f(x) = L$ if and only if for every sequence $(x_n)_{n=1}^\infty \subset D \setminus \{x_0\}$ converging to $x_0$ ($\lim_{n \to \infty} x_n = x_0$), the sequence of images converges to $L$:
$$\lim_{n \to \infty} f(x_n) = L$$2. Continuity & Uniform Continuity
A function $f: D \to \mathbb{R}$ is continuous at $x_0 \in D$ if:
$$\forall \epsilon > 0, \; \exists \delta > 0 \text{ s.t. } \forall x \in D, \; |x - x_0| < \delta \implies |f(x) - f(x_0)| < \epsilon$$Global Uniform Continuity
While standard continuity allows $\delta = \delta(\epsilon, x_0)$ to depend on the point $x_0$, uniform continuity requires a single $\delta$ valid uniformly across the entire domain $D$:
$$\forall \epsilon > 0, \; \exists \delta > 0 \text{ s.t. } \forall x, y \in D, \; |x - y| < \delta \implies |f(x) - f(y)| < \epsilon$$Theorem (Heine-Cantor)
Every continuous function $f: K \to \mathbb{R}$ defined on a compact metric space $K \subset \mathbb{R}$ (closed and bounded interval $[a, b]$) is uniformly continuous on $K$.
3. Differentiability & The Mean Value Theorem
A function $f: (a, b) \to \mathbb{R}$ is differentiable at $x_0 \in (a, b)$ if the difference quotient converges:
$$f'(x_0) = \lim_{h \to 0} \frac{f(x_0 + h) - f(x_0)}{h}$$Equivalently (Carathéodory formulation), $f$ is differentiable at $x_0$ iff there exists a continuous function $\varphi: (a, b) \to \mathbb{R}$ continuous at $x_0$ such that:
$$f(x) - f(x_0) = \varphi(x)(x - x_0), \quad \text{where } \varphi(x_0) = f'(x_0)$$Lagrange Mean Value Theorem (MVT)
Let $f: [a, b] \to \mathbb{R}$ be continuous on $[a, b]$ and differentiable on $(a, b)$. Then there exists at least one point $c \in (a, b)$ such that:
$$f'(c) = \frac{f(b) - f(a)}{b - a}$$Proof via Rolle’s Theorem
Define the auxiliary secant-error function $g(x) = f(x) - f(a) - \frac{f(b)-f(a)}{b-a}(x - a)$. Since $g(a) = g(b) = 0$ and $g$ is continuous on $[a, b]$ and differentiable on $(a, b)$, Rolle’s Theorem guarantees a point $c \in (a, b)$ where $g'(c) = 0$:
$$g'(c) = f'(c) - \frac{f(b) - f(a)}{b - a} = 0 \implies f'(c) = \frac{f(b) - f(a)}{b - a} \quad \blacksquare$$4. Taylor’s Theorem with Lagrange Remainder
Let $f: [a, b] \to \mathbb{R}$ be $n+1$ times continuously differentiable on $(a, b)$ ($f \in C^{n+1}(a, b)$). For any $x_0, x \in (a, b)$, $f(x)$ admits an exact polynomial expansion of degree $n$:
$$f(x) = \sum_{k=0}^n \frac{f^{(k)}(x_0)}{k!}(x - x_0)^k + R_n(x)$$where the Lagrange Remainder term $R_n(x)$ is given by:
$$R_n(x) = \frac{f^{(n+1)}(\xi)}{(n+1)!}(x - x_0)^{n+1} \quad \text{for some } \xi \text{ strictly between } x_0 \text{ and } x$$5. Python Verification: Automatic Taylor Expansion Truncation Error Bound
import numpy as np
def taylor_exp_remainder_analysis(x: float, x0: float = 0.0, max_order: int = 10):
"""Verifies Taylor polynomial convergence and Lagrange remainder bound for f(x) = exp(x)."""
exact_val = np.exp(x)
print(f"Exact Value exp({x}): {exact_val:.10f}\n" + "-"*60)
approx_val = 0.0
for n in range(max_order + 1):
term = ((x - x0) ** n) / np.math.factorial(n)
approx_val += term
actual_error = abs(exact_val - approx_val)
# Lagrange remainder bound: max derivative of exp(t) on [0, x] is exp(max(0, x))
lagrange_bound = (np.exp(max(0.0, x)) / np.math.factorial(n + 1)) * abs(x - x0)**(n + 1)
print(f"Order n={n:2d} | Approx: {approx_val:12.8f} | Actual Err: {actual_error:10.2e} | Lagrange Bound: {lagrange_bound:10.2e}")
if __name__ == "__main__":
taylor_exp_remainder_analysis(x=1.5, max_order=8)