Limits & Continuity
π’ Limits & Continuity
Limits and continuity form the rigorous foundation of all calculus. They allow us to talk about the behavior of functions βinfinitely closeβ to a point, even if the function isnβt defined there.
π’ 1. The Concept of a Limit
Definition
The limit of a function as approaches is the value that gets closer and closer to as gets closer and closer to (but not necessarily at ).
Computing Limits
- Direct Substitution: If is defined and is βniceβ (polynomial, rational, etc.), then .
- Factoring and Canceling: For indeterminate forms like .
- Example: .
- Rationalization: Using the conjugate to simplify square roots.
- LβHΓ΄pitalβs Rule: (Advanced) Used for or using derivatives.
π‘ 2. Continuity
The Three-Part Definition
A function is continuous at a point if and only if all three of the following are true:
- is defined.
- exists.
- .
Types of Discontinuity
- Removable: A βholeβ in the graph that can be filled by redefining one point.
- Jump: The left and right limits are different (e.g., step functions).
- Infinite: The function goes to at that point (e.g., at ).
π΄ 3. The Intermediate Value Theorem (IVT)
If is continuous on the closed interval and is any number between and , then there exists at least one number in such that .
Example Code: Finding a Root numerically
A common way to use IVT in programming is the Bisection Method.
def bisection(f, a, b, tol):
if f(a) * f(b) >= 0:
return None # IVT might not apply
while (b - a) / 2.0 > tol:
midpoint = (a + b) / 2.0
if f(midpoint) == 0:
return midpoint
elif f(a) * f(midpoint) < 0:
b = midpoint
else:
a = midpoint
return (a + b) / 2.0
# Example: f(x) = x^2 - 2 (finding sqrt(2))
root = bisection(lambda x: x**2 - 2, 1, 2, 0.0001)
print(f"Approximated root: {root}")π‘ Key Takeaways
- Limits describe behavior near a point.
- Continuity requires the limit to match the function value.
- IVT guarantees βexistenceβ of values in continuous functions.