1 Limits and continuity
1.1 What a limit says
Let \(f:D\to\mathbb R\), and let \(a\) be an accumulation point of \(D\): every punctured neighborhood of \(a\) contains a point of \(D\). We write \[\lim_{x\to a}f(x)=L\] if for every \(\varepsilon>0\) there is \(\delta>0\) such that, for \(x\in D\), \[0<|x-a|<\delta\quad\Longrightarrow\quad |f(x)-L|<\varepsilon.\] The value \(f(a)\) need not exist. The limit describes nearby inputs, not the value at the center. A two-sided limit in an interval exists exactly when the left and right limits both exist and agree. One-sided limits restrict \(x\) to the indicated side.
1.1.1 Worked example: choosing a delta
Prove \(\lim_{x\to2}x^2=4\). Factor the error: \[|x^2-4|=|x-2||x+2|.\] First require \(|x-2|<1\), which forces \(1<x<3\) and hence \(|x+2|<5\). Given \(\varepsilon>0\), choose \(\delta=\min(1,\varepsilon/5)\). Then \(0<|x-2|<\delta\) gives \(|x^2-4|<5\delta\le\varepsilon\). The preliminary bound makes the second factor manageable.
1.2 Limit laws and removable singularities
If \(f(x)\to L\) and \(g(x)\to M\) as \(x\to a\), with finite \(L,M\), then \(f+g\to L+M\), \(fg\to LM\), and \(cf\to cL\) for every constant \(c\). If \(M\ne0\), then \(f/g\to L/M\). The nonzero denominator hypothesis matters: division is only controlled when \(g\) stays away from zero near \(a\).
These laws follow from triangle inequalities and the fact that a function with a finite limit is bounded sufficiently near the limit point. Limits are unique: if two proposed limits differ, disjoint small neighborhoods around them contradict the definition.
For \(x\ne1\), \[\frac{x^2-1}{x-1}=x+1.\] Therefore the limit at \(1\) is \(2\), even though the original quotient is undefined there. Assigning the value \(2\) at \(1\) removes the discontinuity. Assigning any other value leaves the same limit but fails continuity.
1.2.1 Squeeze theorem
Suppose \(g(x)\le f(x)\le h(x)\) for all domain points sufficiently close to \(a\), apart from possibly \(a\) itself. If \(g(x)\to L\) and \(h(x)\to L\), then \(f(x)\to L\). Indeed, when both outer functions lie within \(\varepsilon\) of \(L\), so does \(f\).
Since \(-x^2\le x^2\sin(1/x)\le x^2\) for \(x\ne0\), its limit at \(0\) is \(0\). The oscillating sine factor need not have a limit.
1.3 Continuity and existence theorems
A function is continuous at \(a\in D\) if for every \(\varepsilon>0\) there exists \(\delta>0\) such that \(x\in D\) and \(|x-a|<\delta\) imply \(|f(x)-f(a)|<\varepsilon\). At an accumulation point this is equivalent to \(\lim_{x\to a}f(x)=f(a)\). At endpoints we use the limit from within the domain.
Polynomials are continuous everywhere. Rational functions are continuous wherever their denominators are nonzero. Sums, products and compositions of continuous functions are continuous on their appropriate domains.
Intermediate Value Theorem. If \(f\) is continuous on \([a,b]\) and \(y\) lies between \(f(a)\) and \(f(b)\), then some \(c\in[a,b]\) satisfies \(f(c)=y\). If \(y\) lies strictly between the endpoint values, \(c\) can be chosen in \((a,b)\).
Proof idea. For \(f(a)<y<f(b)\), repeatedly bisect an interval whose endpoint values bracket \(y\). The nested intervals have lengths tending to zero. Completeness of \(\mathbb R\) gives a common limit point, and continuity forces its value to be \(y\). This also motivates bisection in Numerical Analysis (planned).
Extreme Value Theorem. A continuous real function on a closed, bounded interval \([a,b]\) attains a maximum and a minimum. The compact interval hypothesis cannot simply be dropped: \(f(x)=x\) on \((0,1)\) attains neither.
1.3.1 Worked example: a root exists, and is unique
Let \(p(x)=x^3+x-1\). It is continuous, \(p(0)=-1\) and \(p(1)=1\), so it has a root in \((0,1)\). If \(y>x\), then \[p(y)-p(x)=(y-x)(y^2+xy+x^2+1)>0,\] because \(y^2+xy+x^2=(y+x/2)^2+3x^2/4\ge0\). Thus \(p\) is strictly increasing and has at most one root. The existence theorem alone would not establish uniqueness.
1.4 Exercises
- Prove \(\lim_{x\to3}(2x-1)=5\) using the definition.
- Find \(\lim_{x\to0}(\sqrt{1+x}-1)/x\).
- Define \(f(x)=\sin x\) for \(x<0\) and \(f(x)=c+x\) for \(x\ge0\). Which \(c\) makes \(f\) continuous at \(0\)?
- Does \(f(x)=1/x\) on \([-1,1]\setminus\{0\}\) contradict the Intermediate Value Theorem because it takes \(-1\) and \(1\) but never \(0\)?
- Choose \(\delta=\varepsilon/2\); the output error is exactly \(2|x-3|\).
- Rationalization gives \(1/(\sqrt{1+x}+1)\) for \(x\ne0\), so the limit is \(1/2\).
- \(c=0\): the left limit is \(0\), and the right limit and value are \(c\).
- No. The function is not defined and continuous on the entire interval \([-1,1]\), as the theorem requires.