# Uniform Continuity of Functions
Uniform continuity is a stronger form of continuity that applies uniformly over the entire domain of a function.
## Definition
A function $f: A \to \mathbb{R}$ is **uniformly continuous** on $A$ if for every $\varepsilon > 0$, there exists a $\delta > 0$ such that for all $x, y \in A$,
$$|x - y| < \delta \implies |f(x) - f(y)| < \varepsilon.$$
Unlike regular continuity, $\delta$ depends only on $\varepsilon$, not on the choice of points in $A$.
## Examples
### Example 1: Uniformly Continuous Function
The function $f(x) = 2x$ on $\mathbb{R}$ is uniformly continuous.
*Proof sketch:* Given $\varepsilon > 0$, choose $\delta = \frac{\varepsilon}{2}$. Then for any $x,y$,
$$|x-y| < \delta \implies |f(x)-f(y)| = 2|x-y| < 2 \cdot \frac{\varepsilon}{2} = \varepsilon.$$
### Example 2: Continuous but Not Uniformly Continuous
The function $f(x) = \frac{1}{x}$ on $(0,1)$ is continuous but **not** uniformly continuous.
*Reason:* Near zero, the function values change rapidly. No fixed $\delta$ works for all points.
---
## Python Demonstration
```python
import numpy as np
import matplotlib.pyplot as plt
def uniform_continuity_demo(f, domain, name):
x = np.linspace(domain[0], domain[1], 500)
y = f(x)
# Pick pairs with small differences to illustrate uniform continuity
diffs = [0.1, 0.05, 0.01]
print(f"Checking uniform continuity behavior for {name}")
for delta in diffs:
max_diff_f = 0
for xi in x:
# Check points xi and xi+delta if in domain
if xi + delta <= domain[1]:
diff_f = abs(f(xi) - f(xi + delta))
max_diff_f = max(max_diff_f, diff_f)
print(f"For delta = {delta}, max |f(x)-f(x+delta)| = {max_diff_f:.4f}")
plt.plot(x, y, label=name)
plt.title(f"Function: {name}")
plt.xlabel("x")
plt.ylabel("f(x)")
plt.grid()
plt.legend()
plt.show()
# Example 1: f(x) = 2x on [-5,5]
uniform_continuity_demo(lambda x: 2*x, (-5, 5), "f(x) = 2x")
# Example 2: f(x) = 1/x on (0.01, 1)
uniform_continuity_demo(lambda x: 1/x, (0.01, 1), "f(x) = 1/x")
In this blog we share informations, materials and sample problems regarding competitive examinations on Mathematics.
Comments
Post a Comment