Continuity Throughout an Interval
Continuity at a point is a local question: compare the function’s value at that point with the values approached nearby. Continuity on an interval asks for this condition at every point that belongs to the interval. The interval’s endpoints matter because an included endpoint has nearby points from only one side within the interval, while an excluded endpoint is not a point where continuity must be checked.
That distinction determines which limit test to use. At an interior point, check a two-sided limit. At an included left endpoint, check a right-hand limit; at an included right endpoint, check a left-hand limit. This gives a systematic way to decide whether a function is continuous throughout an open, closed, or half-open interval.
Definition and Interval Test
The restriction \(x\in I\) is important. When \(c\) is an endpoint, only points of the interval are considered. The definition therefore leads to the following tests, for a nondegenerate interval with finite endpoints \(a<b\).
- On an open interval \((a,b)\), \(f\) must be continuous at every \(c\in(a,b)\), using the two-sided limit.
- On a closed interval \([a,b]\), \(f\) must be continuous at every \(c\in(a,b)\), and must satisfy \(\lim_{x\to a^+}f(x)=f(a)\) and \(\lim_{x\to b^-}f(x)=f(b)\).
- On a half-open interval \([a,b)\), use the right-hand test at \(a\) and the two-sided test at every \(c\in(a,b)\). There is no test at \(b\), because \(b\notin I\).
- On a half-open interval \((a,b]\), use the two-sided test at every \(c\in(a,b)\) and the left-hand test at \(b\). There is no test at \(a\).
In every case, the function must be defined at every point of the interval. If an input in the interval is outside the function’s domain, the function is not a function from that entire interval to \(\mathbb{R}\), so it cannot be continuous throughout that interval.
Why Interior and Endpoint Tests Differ
For a point \(c\) in the interior of \(I\), there is some positive distance around \(c\) that stays inside \(I\). Nearby inputs can therefore approach \(c\) from both sides. At a left endpoint \(a\) of \([a,b]\), nearby inputs in the interval satisfy \(x\geq a\), so they approach from the right only. The definition of continuity on \(I\) reflects precisely which inputs are available.
Here is the argument directly from the definition. At the left endpoint \(a\), the condition says that for every \(\varepsilon>0\), there is a \(\delta>0\) such that
For these \(x\), we have \(x\geq a\), so \(|x-a|=x-a\). Thus the condition is exactly the right-hand continuity condition at \(a\). In limit notation, it is \(\lim_{x\to a^+}f(x)=f(a)\). At the right endpoint \(b\), the same reasoning gives \(x\leq b\), so the condition is exactly \(\lim_{x\to b^-}f(x)=f(b)\).
At an interior point, both \(x<c\) and \(x>c\) are available in a sufficiently small neighborhood. The definition then requires the two-sided limit to equal the function value. This proves why the interval test uses two-sided limits in the interior and one-sided limits at included endpoints.
Confirm that \(f\) is defined at every point in the interval being tested.
Test every interior point, and test any endpoint that is included in the interval.
Use two-sided limits in the interior, a right-hand limit at an included left endpoint, and a left-hand limit at an included right endpoint.
At every tested point, the required limit must exist and equal \(f(c)\).
Worked Examples
Worked Example: A Rational Function on a Half-Open Interval
Determine whether \(f(x)=\frac{x^2+1}{x+3}\) is continuous on \((-2,1]\).
First check the domain. For every \(x\in(-2,1]\), \(x+3>1\), so the denominator is nonzero and \(f\) is defined throughout the interval.
Every \(c\in(-2,1)\) is an interior point. Using limit laws, since \(x\to c\) gives \(x^2+1\to c^2+1\) and \(x+3\to c+3\neq 0\),
The right endpoint \(1\) is included, so check the left-hand limit and the value there:
The left endpoint \(-2\) is excluded, so no endpoint test is required there. The function is continuous at every interior point and at the included endpoint \(1\). Therefore, \(f\) is continuous on \((-2,1]\).
Check: The endpoint limit and function value both equal \(\frac12\), as required.
Worked Example: A Square-Root Function on a Closed Interval
Determine whether \(f(x)=\sqrt{x}\) is continuous on \([0,4]\).
The function is defined at every point of \([0,4]\). First take an interior point \(c\in(0,4)\). For \(x\) near \(c\), rationalizing the difference gives
Because \(c>0\), the denominator approaches \(2\sqrt{c}>0\) as \(x\to c\). The numerator approaches \(0\), so \(\lim_{x\to c}\sqrt{x}=\sqrt{c}=f(c)\). This verifies continuity at every interior point.
At the included left endpoint \(0\), use the right-hand limit. Given \(\varepsilon>0\), choose \(\delta=\varepsilon^2\). If \(0\leq x<\delta\), then \(0\leq\sqrt{x}<\varepsilon\). Hence \(\lim_{x\to0^+}\sqrt{x}=0=f(0)\).
At the included right endpoint \(4\), use the left-hand limit. Rationalizing gives, for \(x\) near \(4\) from the left,
The denominator approaches \(4\), so the difference approaches \(0\). Thus \(\lim_{x\to4^-}\sqrt{x}=2=f(4)\).
All interior points and both included endpoints pass their required tests. Therefore, \(f\) is continuous on \([0,4]\).
Check: The endpoint values are \(f(0)=0\) and \(f(4)=2\), matching the right-hand and left-hand limits respectively.
Worked Example: Testing a Piecewise Function on a Closed Interval
Let \(f:[-1,2]\to\mathbb{R}\) be defined by
Check continuity throughout \([-1,2]\). Within \((-1,0)\), the relevant formula is \(x+1\), whose limit at any \(c\) in that interval is \(c+1=f(c)\). Within \((0,2)\), the relevant formula is \(x^2+1\), and \(x^2-c^2=(x-c)(x+c)\) tends to \(0\) as \(x\to c\). Thus \(\lim_{x\to c}(x^2+1)=c^2+1=f(c)\).
The interior point \(0\) is where the formula changes, so check both sides and the function value:
Both one-sided limits equal \(f(0)\), so the two-sided limit at \(0\) exists and equals \(f(0)\).
At the included left endpoint \(-1\), only the right-hand test is needed:
At the included right endpoint \(2\), use the left-hand test:
The formulas are continuous at their interior points, the two-sided test passes at \(0\), and both endpoint tests pass. Therefore, \(f\) is continuous on \([-1,2]\).
Check: At the formula-change point, the left limit, right limit, and assigned value are all \(1\); at the endpoints, the required one-sided limits equal the function values.
Excluded Endpoints and Common Pitfalls
An excluded endpoint is not part of the interval, so continuity at that endpoint is not part of the question. For example, when testing a function on \((a,b]\), the point \(a\) is not checked. The function must still be defined at every point in \((a,b]\), and every point inside that interval must pass the usual interior test.
A frequent mistake is to use a two-sided limit at an included endpoint, or to reject a function because inputs on the other side of that endpoint are unavailable. For instance, consider \(f(x)=\sqrt{x}\) on \([0,4]\). A mistaken argument says, “The two-sided real limit at \(0\) is unavailable because \(\sqrt{x}\) is not real for negative \(x\), so \(f\) is not continuous at \(0\).” The interval test asks for the right-hand limit instead:
Thus the endpoint passes its correct test. The reverse mistake is also possible: checking only endpoints does not establish continuity throughout an interval. Interior points must be checked too, including any points where the formula or domain changes.
Why the Interval Test Matters
Statements about an entire interval are used in calculus results that require continuity on a specified interval. The interval type tells you exactly which pointwise conditions are required: two-sided conditions throughout the interior, with one-sided conditions added only at included endpoints. Applying the test carefully prevents two common errors—demanding a limit from outside the interval and overlooking an interior discontinuity.
For an open interval, there are no included endpoints to test. For a closed interval, both endpoints require one-sided checks. For a half-open interval, only its included endpoint requires an endpoint check. In all three cases, continuity throughout means passing the appropriate test at every point that belongs to the interval.
Check Your Understanding
For each question, identify which points require a two-sided test and which require a one-sided test.
- What tests are required to establish continuity on \((1,5)\)?
- On \([2,7]\), which one-sided limits must be compared with function values?
- On \((0,3]\), why is there no endpoint continuity test at \(0\)?
- If a function is undefined at an interior point of a proposed interval, can it be continuous throughout that interval? Explain.
- For continuity on \([a,b)\), which included endpoint requires a one-sided test, and from which side?