Introduction
Many functions used in calculus are built by combining a small collection of familiar functions. A polynomial might be multiplied by an exponential, a logarithm might take a trigonometric function as its input, or a quotient might involve several of these pieces.
To determine where such an expression is continuous, keep two questions separate: where is the expression defined? and where is it continuous on that domain? The domain can be restricted by a logarithm’s input or by a zero denominator. Once the domain is known, continuity rules for the component functions and their combinations do the rest.
Continuity of the Standard Functions
Here, \(\mathbb{R}\) denotes the real numbers, and trigonometric arguments are measured in radians. The following facts provide the starting point for analyzing more complicated expressions.
| Function | Domain | Where it is continuous |
|---|---|---|
| Polynomial \(p(x)\) | \(\mathbb{R}\) | Every real number |
| Exponential \(e^x\) | \(\mathbb{R}\) | Every real number |
| Natural logarithm \(\ln x\) | \((0,\infty)\) | Every positive real number |
| \(\sin x\) and \(\cos x\) | \(\mathbb{R}\) | Every real number |
| \(\tan x=\frac{\sin x}{\cos x}\) and \(\sec x=\frac{1}{\cos x}\) | Real \(x\) with \(\cos x\ne 0\) | Every point in their domains |
| \(\cot x=\frac{\cos x}{\sin x}\) and \(\csc x=\frac{1}{\sin x}\) | Real \(x\) with \(\sin x\ne 0\) | Every point in their domains |
In particular, the natural logarithm is not defined for zero or negative inputs. The tangent and secant functions are not defined where cosine is zero; the cotangent and cosecant functions are not defined where sine is zero. These restrictions are part of the functions’ domains, not exceptions to their continuity there.
A polynomial is a finite sum of constant multiples of powers of \(x\), with nonnegative integer exponents. The identity function \(x\mapsto x\) and constant functions are continuous, and repeated products show that each power \(x^n\) is continuous. The sum and product rules for continuous functions then give continuity for every polynomial. This illustrates how the continuity of more complicated functions follows from simpler components.
Why Sine and Cosine Are Continuous
The continuity of sine and cosine can be seen from their addition identities. We use the standard inequalities \(|\sin u|\leq |u|\) and \(|\sin u|\leq 1\). The identity \(1-\cos h=2\sin^2(h/2)\) then gives \(|1-\cos h|\leq h^2/2\).
Since \(|\sin a|\leq 1\) and \(|\cos a|\leq 1\), the triangle inequality gives
Given any \(\varepsilon>0\), choose \(\delta=\min(1,2\varepsilon/3)\). If \(|h|<\delta\), then \(|h|<1\), so \(h^2/2\leq |h|/2\). Therefore
This proves that sine is continuous at the arbitrary point \(a\). For cosine, the other addition identity gives
The same bounds yield \(|\cos(a+h)-\cos a|\leq h^2/2+|h|\), so the same choice of \(\delta\) proves continuity of cosine at \(a\). Since \(a\) was arbitrary, both functions are continuous on \(\mathbb{R}\). Tangent and the other trigonometric quotients are continuous wherever their denominators are nonzero, by the quotient rule for continuous functions.
Combining Continuity Rules
Suppose \(f\) and \(g\) are continuous at a point \(a\). Their sum \(f+g\) and product \(fg\) are continuous at \(a\). If \(g(a)\ne 0\), then \(f/g\) is also continuous at \(a\). If \(g\) is continuous at \(a\), and \(f\) is continuous at \(g(a)\), then the composition \(f\circ g\), defined by \((f\circ g)(x)=f(g(x))\), is continuous at \(a\).
These rules let us work through a formula from its inner functions outward. The domain must be tracked at each stage: for example, a composition with \(\ln\) requires its input to be positive, and a quotient requires its denominator to be nonzero.
Recognize polynomial, exponential, logarithmic, and trigonometric pieces, including their inputs.
Require every logarithm’s input to be positive and every denominator to be nonzero. Apply any other domain restrictions from the component functions.
Use sums, products, quotients, and compositions to establish continuity at each point of the domain.
Say whether the function is continuous on its domain or continuous on all of \(\mathbb{R}\).
Worked Examples
Worked Example: A Polynomial, an Exponential, and Sine
Determine where \(f(x)=(x^2-3x+1)e^{2x}+\sin(5x)\) is continuous.
The polynomial \(x^2-3x+1\) is defined and continuous for every real \(x\). The inner function \(2x\) is a polynomial, so it is continuous everywhere; composing it with the exponential shows that \(e^{2x}\) is continuous everywhere. The product \((x^2-3x+1)e^{2x}\) is therefore continuous on \(\mathbb{R}\). Similarly, \(5x\) is continuous everywhere and sine is continuous for every real input, so \(\sin(5x)\) is continuous on \(\mathbb{R}\).
The sum of these two continuous expressions is continuous on \(\mathbb{R}\). There are no logarithms or denominators that add domain restrictions. Thus the domain is \(\mathbb{R}\), and \(f\) is continuous at every real number.
Check: At \(x=0\), the polynomial factor is \(0^2-3(0)+1=1\), the exponential factor is \(e^{2(0)}=e^0=1\), and the trigonometric term is \(\sin(5(0))=\sin 0=0\). Hence \(f(0)=1\cdot1+0=1\), and all three component functions are defined there, consistent with continuity on \(\mathbb{R}\).
Worked Example: A Logarithm Whose Input Is Always Positive
Determine the domain and continuity set of \(g(x)=\ln(x^2-4x+5)\).
The logarithm requires its input to be strictly positive. Complete the square:
For every real \(x\), \((x-2)^2\geq 0\), so \((x-2)^2+1\geq 1>0\). The logarithm’s input is therefore positive for every real number, and the domain of \(g\) is \(\mathbb{R}\). The expression \((x-2)^2+1\) is a polynomial, hence continuous; composing it with the continuous logarithm on positive inputs shows that \(g\) is continuous on all of \(\mathbb{R}\).
Check: At \(x=2\), the input is \((2-2)^2+1=0+1=1\), which is positive, and \(g(2)=\ln 1=0\). This confirms that the input meets the logarithm’s domain condition at this value; the inequality above verifies it for every real \(x\).
Worked Example: A Logarithm Combined with Tangent
Determine the domain and continuity set of \(h(x)=\tan(2x)+\ln(3-x)\).
For the logarithmic term, \(3-x>0\), which is equivalent to \(x<3\). For the tangent term, \(\tan(2x)\) is defined exactly when \(\cos(2x)\ne 0\). Cosine is zero when its argument is \(\pi/2+k\pi\), where \(k\in\mathbb{Z}\). Thus the excluded inputs satisfy \(2x=\pi/2+k\pi\), or \(x=\pi/4+k\pi/2\).
The domain is therefore
On this domain, the inner function \(2x\) is continuous and tangent is continuous wherever its cosine denominator is nonzero. Also, \(3-x\) is continuous and positive, so its composition with the logarithm is continuous. Their sum \(h\) is continuous at every point of its domain.
Check: At \(x=0\), the logarithm’s input is \(3-0=3>0\), and the tangent’s cosine denominator is \(\cos(2(0))=\cos 0=1\ne 0\). Thus \(0\) is in the stated domain and \(h(0)=\tan 0+\ln 3=0+\ln 3\). In contrast, \(x=\pi/4\) makes the tangent’s input \(2x=\pi/2\), where \(\cos(\pi/2)=0\); this value is excluded, as required.
Worked Example: A Trigonometric Input to a Logarithm
Determine where \(q(x)=\ln(2+\cos x)\) is continuous.
Cosine is continuous for every real \(x\), so \(2+\cos x\) is also continuous everywhere. Since \(-1\leq\cos x\leq 1\), adding \(2\) gives
In particular, the logarithm’s input is always at least \(1\), so it is strictly positive. The domain of \(q\) is \(\mathbb{R}\). The composition rule now shows that \(q\) is continuous at every real number.
Check: At \(x=0\), the input is \(2+\cos 0=2+1=3\), so \(q(0)=\ln 3\) is defined. At \(x=\pi\), it is \(2+\cos\pi=2-1=1\), also positive. The bound \(1\leq2+\cos x\leq3\) confirms that the logarithm is defined for every real input, not just these two checks.
Domain Restrictions and Common Errors
A function may be continuous everywhere it is defined without being defined everywhere. For instance, \(\tan x\) is continuous at every point in its domain, but it is undefined at \(x=\pi/2+k\pi\), for \(k\in\mathbb{Z}\). It would therefore be inaccurate to say that tangent is continuous on all of \(\mathbb{R}\).
A common mistake is to check continuity of the outer function but ignore whether its input is allowed. Consider the incorrect claim that \(\ln(x-1)\) is continuous for every real \(x\), because logarithms are continuous. The logarithm is continuous only for positive inputs, and \(x-1>0\) requires \(x>1\). The correct conclusion is that \(\ln(x-1)\) has domain \((1,\infty)\) and is continuous there.
Likewise, knowing that a quotient of continuous functions is continuous does not remove the requirement that its denominator be nonzero. The quotient rule applies at a point \(a\) only when the denominator’s value at \(a\) is nonzero. Always determine the domain before stating where continuity holds.
Summary
Polynomials, exponentials, sine, and cosine are continuous on all of \(\mathbb{R}\). The natural logarithm is continuous on \((0,\infty)\). Tangent and the other trigonometric quotients are continuous where their denominators do not vanish. Sums, products, valid quotients, and compositions preserve continuity, provided their domain conditions are met.
For a complicated expression, first find its domain, then apply the continuity rules to its components, and finally state the result on that domain. This careful distinction prevents a common error: confusing “continuous wherever defined” with “defined and continuous everywhere.”
Check Your Understanding
For each question, identify any domain restriction before deciding where the function is continuous.
- Where is \(p(x)=x^3-2x+4\) continuous?
- Find the domain and continuity set of \(\ln(x+5)\).
- Where is \(\tan(3x)\) defined and continuous? State the excluded inputs.
- Explain why \(\ln(2+\sin x)\) is defined for every real \(x\), and state where it is continuous.
- What domain condition must hold before the quotient rule can establish continuity of \(f(x)/g(x)\)?