CALCULUS / 1. LIMITS & CONTINUITY
Limits & Continuity
The foundation — what happens as we get infinitely close
EXPLANATION
A limit describes the value a function approaches as the input approaches some value — even if the function is not defined there. lim(x→a) f(x) = L means: as x gets arbitrarily close to a, f(x) gets arbitrarily close to L. One-sided limits: • lim(x→a⁻) f(x) → approach from the LEFT • lim(x→a⁺) f(x) → approach from the RIGHT • Limit exists only if both sides agree Continuity: f is continuous at a if: 1. f(a) is defined 2. lim(x→a) f(x) exists 3. lim(x→a) f(x) = f(a) Why limits matter for calculus: The derivative is defined as a limit: f'(x) = lim(Δx→0) [f(x+Δx) - f(x)] / Δx This is the "instantaneous rate of change" — the slope at exactly one point, not between two points. Important limits to know: • lim(x→0) sin(x)/x = 1 • lim(x→0) (eˣ - 1)/x = 1 • lim(x→∞) (1 + 1/x)ˣ = e
DIAGRAM
f(x) = (x²-1)/(x-1) — undefined at x=1 But as x→1: (x²-1)/(x-1) = (x+1)(x-1)/(x-1) = x+1 → 2 lim(x→1) f(x) = 2 even though f(1) is undefined Left and right limits: f(x) = |x|/x x→0⁻: f(x) = -1 (approach from negative side) x→0⁺: f(x) = +1 (approach from positive side) Limits disagree → limit does NOT exist at x=0 → function not differentiable at x=0 (like ReLU!) Derivative as a limit: slope of tangent = lim(Δx→0) [f(x+Δx) - f(x)] / Δx
CODE