Chapter 5.6 Continuous Functions
In this section, we focus primarily on special kinds of functions whose limits are easy to compute. We also study the properties such functions have.
Continuity
These functions are not continuous at \(x_0\):
If a function is continuous at \(x_0\), then its value at \(x_0\) is completely determined by its value at nearby points.
Finite approximation is a powerful principle for studying functions, but not all functions can be finitely approximated.
For this reason, it is important to specialize to the continuous functions.
Continous at a Point and on a Set
A real valued function \(f\) is continuous at a point \(x_0\) in \(\mathcal D(f)\) if \[\lim_{x\to x_0} f(x) = f(x_0).\]
A real valued function \(f\) is continuous on a subset \(S\) of \(\mathcal D(f)\) if it is continuous at each point of \(S\).
Understand the meaning of continuous with this example.
Example 1
Take \(f\) to be a function with the property that \[\lim_{x\to 2^-} f(x) = 5 = \lim_{x\to 2^+} f(x).\] Determine the value of \(f(2)\) so that \(f\) is continuous at \(2\).
A function is continuous at \(x_0=2\) if \(\displaystyle\lim_{x\to 2}f(x)=f(2).\) This means the limit at \(x_0=2\) must equal the value of the function at \(x=2\). Since \(\displaystyle\lim_{x\to 2^-} f(x) = 5 = \displaystyle\lim_{x\to 2^+} f(x)\), this means the limit at \(x=2\) exists and \(\displaystyle\lim_{x\to 2} f(x)=5.\) Therefore \(f(2)=5\) in order for \(f\) to be continuous at \(x_0=2\).
Understand the requirements of continuity with this example.
Example 2
Take \(f\) to be a function with domain equal to \([3,7]\). Given that \(f(3)\) is equal \(1\) determine the value of \(\displaystyle \lim_{x\to 3^+} f(x)\) so that \(f\) is continuous at \(3\).
A function is continuous at \(x_0=3\) if \(\displaystyle\lim_{x\to 3}f(x)=f(3).\) This means the limit at \(x_0=3\) must equal the value of the function at \(x=3\). However, since the function is only defined on \([3,7]\) then only limit from the right exists. Therefore, the requirement that \(\displaystyle\lim_{x\to 3^+}f(x)=f(3)\) implies that \(\displaystyle\lim_{x\to 3^+}f(x)=1\).
Justifying that a given function is continuous at a specified point or that it is continuous on a specified subset of its domain comes down to computing limits.
Since limits of functions are determined by sequences, the functions that are continuous at a given point \(x_0\) are precisely those that can be approximated by their values on any sequence of points that converge to \(x_0\).
This means that \(f(x_0)\) may be approximated to any degree of accuracy by studying finitely many points of \((f(x_n))\) for any sequence \((x_n)\) in \(\mathcal D(f)\setminus\{x_0\}\) that converges to \(x_0\).
Example 3
Show that each function \(f\) is continuous at \(x_0\), where \(f\) and \(x_0\) are given by:
\(f(x) = x^2\), \(x_0 = 2\);
\(f(x) = \begin{cases}\frac{\sin(x)}{x} &\text{if } x\ne0\\1&\text{if } x= 0\end{cases}\), \(x_0 = 0\).
A result from Chapter 5.5 for pow functions states that \(\displaystyle\lim_{x\to x_0}x^r=x_0^r\). So in this case, \(\displaystyle\lim_{x\to 2}x^2=2^2=4\), which is the same as \(f(2)=4.\) Thus the requirement \(\displaystyle\lim_{x\to 2}f(x)=f(2)\) is satisfied which means \(f\) is continuous at \(x_0=2\).
To check continuity, calculate \(\displaystyle\lim_{x\to 0}f(x)\). Remember, the full definition requires focusing on sequences \(x_n\) that converge to \(x_0=0\), but in which the terms are never equal to \(x_0=0\). So this means, the function \(f\) is \(f(x)=\frac{\sin(x)}{x}\). Hence \(\displaystyle\lim_{x\to 0}f(x)=\displaystyle \lim_{x\to 0} \frac{\sin(x)}{x}=1\). Now according to the definition of \(f\), \(f(0)=1\). Since \(\displaystyle\lim_{x\to 0}f(x)=f(0)\), the function is continuous at \(x_0=0.\)
The idea of continuity may be further refined without much difficulty.
Left and Right Continuous
For any real valued function \(f\) that is defined on \(\mathbb R\), \(f\) is, respectively, left continuous or right continuous at a point \(x_0\) in its domain if \[\lim_{x\to x_0^-} f(x) = f(x_0)\quad {\rm or}\quad \lim_{x\to x_0^+} f(x) = f(x_0).\]
A function \(f\) is continuous at a point \(x_0\) in its domain if and only if it is both left and right continuous at \(x_0\).
Explanation:
\(\displaystyle \lim_{x\to x_0}f(x)\) exists if and only if the left and right limits exist and are equal.
Practice understanding left and right continuity with the following example.
Example 4
For each real number \(x\), take \({\rm ceil}(x)\) to be the smallest integer that is greater than or equal to \(x\). Describe the continuity properties of \({\rm ceil}\)
If \(-2< x\leq-1\), then \({\rm ceil}(x)=-1\).
If \(-1< x\leq 0\), then \({\rm ceil}(x)=0\).
If \(0< x\leq 1\), then \({\rm ceil}(x)=1\).
If \(1< x\leq 2\), then \({\rm ceil}(x)=2\).
Therefore, if \(x_0\) is a real number such that \(Z<x_0<Z+1\) for some integer \(Z\), then \(\displaystyle\lim_{x\to x_0}{\rm ceil}(x)={\rm ceil}(x_0)\), so the floor function is continuous at \(x_0\) as long as \(x_0\) is not an integer.
However, the function would be left continuous at each integer \(z\) since \(\displaystyle\lim_{x\to z^-}{\rm ceil}(x)={\rm ceil}(z).\)
Further your understanding with this example.
Example 5
For each real number \(x\), take \({\rm floor}(x)\) to be the largest integer that is smaller than or equal to \(x\). Describe the continuity properties of \({\rm floor}\)
If \(-2\leq x<-1\), then \({\rm floor}(x)=-2\).
If \(-1\leq x<0\), then \({\rm floor}(x)=-1\).
If \(0\leq x< 1\), then \({\rm floor}(x)=0\).
If \(1\leq x<2\), then \({\rm floor}(x)=1\).
Therefore, if \(x_0\) is a real number such that \(Z<x_0<Z+1\) for some integer \(Z\), then \(\displaystyle\lim_{x\to x_0}{\rm floor}(x)={\rm floor}(x_0)\), so the ceiling function is continuous at \(x_0\) as long as \(x_0\) is not an integer.
However, the function would be right continuous at each integer \(z\) since \(\displaystyle\lim_{x\to z^+}{\rm floor}(x)={\rm floor}(z)\)
Understand continuity of piecewise functions with the following example.
Example 6
Show that the function \(f\) is continuous at \(1\), where \(f\) is given by \[f(x) = \begin{cases}3x+2 &\text{if } x\le 1\\x+4&\text{if } x> 1.\end{cases}\]
A function is continuous at \(x_0=1\) if \(\displaystyle\lim_{x\to 1}f(x)=f(1)\). This means the limit at \(x_0=1\) must equal the value of the function at \(x=1\). However, since the function is a piecewise function that is defined depending on if \(x\leq 1\) or if \(x>1\), calculate \(\displaystyle\lim_{x\to 1}f(x)\) by computing \(\displaystyle\lim_{x\to 1^+}f(x)\) and \(\displaystyle\lim_{x\to 1^-}f(x).\)
When \(x<1\), \(f(x)=3x+2\). Therefore, \[ \begin{align*} \lim_{x\to 1^-}f(x)&=\lim_{x\to 1^-}(3x+2)\\ &=\lim_{x\to 1^-}3\cdot \lim_{x\to 1^-}x+\lim_{x\to 1^-}2\\ &=3\cdot1+2\\ &=5. \end{align*} \]
When \(x>1\), \(f(x)=x+4\). Therefore, \[ \begin{align*} \lim_{x\to 1^+}f(x)&=\lim_{x\to 1^+}(x+4)\\ &=\lim_{x\to 1^+}x+\lim_{x\to 1^+}4\\ &=1+4\\ &=5. \end{align*} \]
Since \(\displaystyle\lim_{x\to 1^+}f(x)=\displaystyle\lim_{x\to 1^-}f(x)\), the limit exists at \(x_0=1\) and \(\displaystyle\lim_{x\to 1}f(x)=5\). Moreover, \(f(1)=3\cdot 1+2=5\).
Because \(\displaystyle\lim_{x\to 1}f(x)=f(1)\), the function is continuous at \(x_0=1.\)
Further your understanding of continuity of piecewise functions with this example.
Example 7
Show that the function \(f\) is continuous at \(0\), where \(f\) is given by \[f(x) = \begin{cases}0 &\text{if } x\le 0\\x\sin\big(\frac{1}{x}\big)&\text{if } x> 0.\end{cases}\]
A function is continuous at \(x_0=0\) if \(\displaystyle\lim_{x\to 0}f(x)=f(0)\). This means \(x_0=0\) must equal the value of the function at \(x=0\). However, since the function is a piecewise function that is defined depending on if \(x\leq 0\) or if \(x>0\), calculate \(\displaystyle\lim_{x\to 0}f(x)\) by computing \(\displaystyle\lim_{x\to 0^+}f(x)\) and \(\displaystyle\lim_{x\to 0^-}f(x).\)
When \(x<0\), \(f(x)=0\). Therefore, \[ \begin{align*} \lim_{x\to 0^-}f(x)&=\lim_{x\to 0^-}0\\ &=0. \end{align*} \]
When \(x>0\), \(f(x)=x\sin\left(\frac{1}{x}\right)\). Therefore, \[ \begin{align*} \lim_{x\to 0^+}f(x)&=\lim_{x\to 0^+}x\sin\left(\frac{1}{x}\right)\\ &=0 \end{align*} \]
Compute the above limit by using the squeeze theorem to show the limit is zero.
Since \(\displaystyle\lim_{x\to 0^+}f(x)=\displaystyle\lim_{x\to 0^-}f(x)\), the limit exists at \(x_0=0\) and \(\displaystyle\lim_{x\to 0}f(x)=0\). Moreover, \(f(0)=0\).
Because \(\displaystyle\lim_{x\to 0}f(x)=f(0)\), the function is continuous at \(x_0=0.\)
A function may not necessarily be continuous at a point because it is undefined. Depending on the behave of the function near the place it is undefined, there may be a way to construct a continuous function out of it.
Continuous Extension of a Function
For any real valued function \(f\) that is defined on a subset of \(\mathbb R\), if \(x_0\) is not in the domain of \(f\), but there is a continuous function \(g\) that is defined at \(x_0\) and for every \(x\) in \(\mathcal D(f)\), \[f(x) = g(x),\] then \(g\) is a continuous extension of \(f\) to \(x_0\).
Here is how a function can have a continuous extension.
Admits a Continuous Extension
For any real valued function \(f\) that is defined on a subset of \(\mathbb R\), if \(x_0\) is not in the domain of the function \(f\), but there is some real number \(L\) so that \[\lim_{x\to x_0}f(x) = L,\] then \(f\) admits a continuous extension to the set \(\mathcal D(f)\cup\{x_0\}\)
To say that \(f\) admits a continuous extension to the set \(\mathcal D(f)\cup\{x_0\}\) means that there is a continuous extension \(g\) of \(f\) to \(x_0\), and that \(g\) is defined by \[g(x) = \begin{cases} f(x)&\text{if } x\in \mathcal D(f)\\L&\text{if } x = x_0.\end{cases}\]
One type of discontinuity a function can have is called a removable singularity.
Removable Singularity
If \(x_0\) is a limit point of \(\mathcal D(f)\), then the continuous extension of \(f\) to \(x_0\), if it exists, is unique and \(x_0\) is a removable singularity of \(f\).
Practice finding a continuous extension with this example.
Example 8
Take \(f\) to be the function that is given by \[f(x) = \tfrac{2x^2 -x -1}{x-1}.\] Determine the maximal domain of \(f\) and find a continuous extension of \(f\) to all of \(\mathbb R\).
The maximal domain of \(f\) is \((-\infty,1)\cup(1,\infty)\) because the function is undefined only at \(x=1\). However, the function does have a limit at \(x=1\):
\[ \begin{align*} \lim_{x\to 1}f(x)&=\lim_{x\to 1}\tfrac{2x^2 -x -1}{x-1}\\ &=\lim_{x\to 1}\tfrac{(2x+1)(x-1)}{x-1}\\ &=\lim_{x\to 1}(2x+1)\\ &=\lim_{x\to 1}2\cdot \lim_{x\to 1}x+\lim_{x\to 1}1\\ &=2\cdot 1+1\\ &=3. \end{align*} \]
If the function is defined to equal \(3\), when \(x=1\), then it would be continuous. Define the function \(g\) as:
\[ g(x)=\begin{cases} \tfrac{2x^2 -x -1}{x-1}&\text{ if }x\not=1\\ 3 &\text{ if } x=1. \end{cases} \]
Then \(g\) is a continuous extension of \(f\) to all of \(\mathbb R\) since \(g(x)=f(x)\) when \(x\) in \((-\infty,1)\cup(1,\infty)\).
Not every function has a continuous extension. Use this example to understand why.
Example 9
Take \(f\) to be the function that is given by \[f(x) = \tfrac{|x-2|}{x-2}.\] Determine the domain of \(f\) and show that there is no continuous extension of \(f\) to all of \(\mathbb R\).
The domain of \(f\) is \((-\infty,2)\cup(2,\infty)\). There is no continuous extension of \(f\) because the limit does not exist at \(2\) since \(\displaystyle \lim_{x\to 2^-}f(x)=-1\) and \(\displaystyle \lim_{x\to 2^+}f(x)=1\) are not equal.
What about functions that are not defined on all real numbers? Understand the subtlety with this example.
Example 10
Recall that \({\rm pow}_{\frac{1}{2}}\) is the function that is given by \[{\rm pow}_{\frac{1}{2}}(x) = \sqrt{x}.\]
Determine the maximal domain of \({\rm pow}_{\frac{1}{2}}\) and show that \({\rm pow}_{\frac{1}{2}}\) is continuous on this domain.
Find a continuous extension of \({\rm pow}_{\frac{1}{2}}\) to all of \(\mathbb R\).
Is the continuous extension of \({\rm pow}_{\frac{1}{2}}\) to all of \(\mathbb R\) unique?
A common error that students make is to assert that \({\rm pow}_{\frac{1}{2}}\) is not continuous at \(0\). Why do they make this mistake?
- The maximal domain is \([0,\infty)\). The function is continuous on this domain because \(\displaystyle\lim_{x\to x_0}\sqrt{x}=\sqrt{x_0}\) for \(x_0\) in \([0,\infty)\).
A continuous extension is \[g(x)=\begin{cases}\sqrt{x}&\text{ if }x\geq 0\\0&\text{ if }x<0.\end{cases}\] since \(g\) is continuous on \(\mathbb{R}\) and \(\sqrt{x}=g(x)\) when \([0,\infty)\).
No, here is another one \[h(x)=\begin{cases}\sqrt{x}&\text{ if }x\geq 0\\x^2&\text{ if }x<0.\end{cases}\] since \(g\) is continuous on \(\mathbb{R}\) and \(\sqrt{x}=h(x)\) when \([0,\infty)\).
Because \(\sqrt{x}\) is undefined when \(x<0\). However, when computing limits, the sequences are defined only on the domain of \(f\).
The following definition clarifies what it means for a function to not be continuous at a point.
Not Continuous at a Point
A function \(f\) is not continuous at a point \(x_0\) in \(\mathcal D(f)\) if \(x_0\) is a limit point of \(\mathcal D(f)\) and either
- \(\displaystyle \lim_{x\to x_0}f(x)\) does not exist;
or
- \(\displaystyle \lim_{x\to x_0}f(x)\) exists but is not equal to \(f(x_0)\).
A function \(f\) may also fail to be continuous at a point \(x_0\) because \(x_0\) is not in the domain of \(f\).
Note that if \(x_0\) is an isolated point of \(\mathcal D(f)\), then \(f\) is continuous at \(x_0\).
Do you see why it is “vacuously true” that functions are continuous on isolated points in their domain?
Check your understanding with the next example.
Example 11
Carefully show that the function \(f\) is not continuous at \(x_0\), where \(f\) and \(x_0\) are given by:
\(f(x) = \begin{cases} 5x+1 & \text{if } x < 2\\ x-5 & \text{if } x\ge 2\end{cases}\), \(x_0 = 2\);
\(f(x) = \begin{cases} x^2 & \text{if } x \ne 3\\ 5 & \text{if } x=3\end{cases}\), \(x_0 = 3\);
\(f(x) = \begin{cases} \frac{1}{x^2} & \text{if } x \ne 0\\ 0 & \text{if } x=0\end{cases}\), \(x_0 = 0\);
\(f(x) = \begin{cases} 0 & \text{if } x\le 0\\ \sin\!\big(\frac{1}{x}\big) & \text{if } x> 0\end{cases}\), \(x_0 = 0\).
- The function \(f\) is a piecewise function defined depending on if \(x<2\) or \(x\geq 2\). Calculate the limit at \(x_0=2\) by calculating the limit from the left and from the right. The limits are \[\begin{align*}\displaystyle \lim_{x\to 2^-}f(x)=\displaystyle \lim_{x\to 2^-}(5x+1)=11\end{align*}\] and \[\begin{align*}\displaystyle \lim_{x\to 2^+}f(x)=\displaystyle \lim_{x\to 2^+}(x-5)=-3\end{align*}.\] Since the one-sided limits are not equal, \(f\) has no limit at \(x=2\). Therefore, \(f\) is not continuous at \(x=2\).
- The function \(f\) is a piecewise function defined differently depending on if \(x=3\) or \(x\not= 3\). Therefore, calculate the limit at \(3\) directly. The limit is \[\begin{align*}\displaystyle \lim_{x\to 3}f(x)=\displaystyle \lim_{x\to 3}x^2=9\end{align*}.\] However, the value of the function at \(x=3\),\(f(3)=5\), does not equal the limit at \(x=3\). Therefore \(f\) is not continuous at \(x=3\).
- The function \(f\) is a piecewise function defined differently depending on if \(x=0\) or \(x\not= 0\). Calculate the limit at \(x_0=0\) directly. The limit is \[\begin{align*}\displaystyle \lim_{x\to 0}f(x)=\displaystyle \lim_{x\to 0}\frac{1}{x^2}=\infty\end{align*}.\] Because the limit diverges to infinity, the function \(f\) is not continuous at \(x=0\).
- The function \(f\) is a piecewise function defined differently depending on if \(x<0\) or \(x\geq 0\). Calculate the limit at \(x_0=0\) by calculating the limit from the left and from the right. The limit on the left is \[\begin{align*}\displaystyle \lim_{x\to 0^-}f(x)=\displaystyle \lim_{x\to 0^-}0=0\end{align*}.\] The limit on the right \[\begin{align*}\displaystyle \lim_{x\to 0^+}f(x)=\displaystyle \lim_{x\to 0^+}\sin\left(\tfrac{1}{x}\right)\end{align*}\] does not exist. Because \(f\) has no limit at \(x=0\), the function \(f\) is not continuous at \(x=0\).
There are actually many functions that are continuous that we have already studied before.
Theorem on Continuous Function
The limit laws imply that rational functions are continuous wherever they are defined.
The functions \(\sin\) and \(\cos\) are continuous on \(\mathbb R\). The continuity of the \(\sin\) and \(\cos\) functions together with the limit laws imply that the functions \(\tan\), \(\sec\), \(\csc\), and \(\cot\) will also be continuous wherever they are defined.
The absolute value function is continuous at every \(x\) in \(\mathbb R\).
The exponential function \(\text{exp}_a(x)=a^x\) is continuous at every \(x\) in \(\mathbb R\).
The logarithm function \(\text{log}_a(x)\) is continuous at every \(x\) in \((0,\infty)\).
Finally, for every natural number \(n\), the function \({\rm pow}_{\frac{1}{n}}\) is continuous at every \(x\) in its domain.
Properties of Continuous Functions
Continuous functions are very special kinds of functions. In this section, we learn all about their special properties. First, we discuss maximum and minimum values.
Attain a Maximum or Minimum Value
For any real valued function \(f\) that is defined on a subset \(S\) of \(\mathbb R\), \(f\) attains its maximum value on \(S\) if there is an \(x_0\) in \(S\) so that for any \(x\) in \(S\), \[f(x) \leq f(x_0).\]
Similarly, \(f\) attains its minimum value on \(S\) if there is an \(x_0\) in \(S\) so that for any \(x\) in \(S\), \[f(x) \geq f(x_0).\]
This theorem tells us that a continuous function will attain its maximum and minimum on a closed and bounded interval.
Extreme Value Theorem
The Extreme Value Theorem states the following:
For any function \(f\) that is continuous on a closed and bounded interval \([a,b]\), \(f\) attains its maximum and minimum values on \([a,b]\).
Understand under which circumstances the extreme value theorem applies with the following example.
Example 12
Take \(f\) to be the function that is given by \[f(x) = \tfrac{1}{x}.\] For each subset \(S\) of the domain of \(f\), say whether or not \(f\) attains its minimum value on \(S\), its maximum value on \(S\), or if it attains neither its minimum nor maximum value on \(S\):
\(S = (-\infty, 0)\);
\(S = (0, \infty)\);
\(S = (-\infty, -2]\);
\(S = [1,\infty)\).
- \(f\) attains neither its minimum or maximum value on \(S\).
- \(f\) attains neither its minimum or maximum value on \(S\).
- \(f\) attains its minimum at \(x=-2\)
- \(f\) attains its maximum at \(x=1\)
Continuous functions are special because they have the following property.
Intermediate Value Property
A real valued function \(f\) that is defined on the set \(S\) has the intermediate value property if, given points \(a\) and \(b\) in \(S\) with \[f(a) < f(b),\] for any \(z\) in \((f(a), f(b))\), there is a \(c\) in \(S\) that is between \(a\) and \(b\) so that \[f(c) = z.\]
This is next theorem tells us that continuous functions have the intermediate value property.
Intermediate Value Theorem
The Intermediate Value Theorem is the following statement:
Every continuous real valued function \(f\) that is defined on an interval \(I\) has the intermediate value property.
Understand the meaning with this next example.
Example 13
Depict graphically the meaning of the intermediate value theorem
The following theorem restates the above property in terms of the range of a continuous function.
Continuous Function Take Closed and Bounded Intervals to Closed and Bounded Intervals
For any function \(f\) that is continuous on a closed and bounded interval \([a,b]\), the extreme value theorem and the intermediate value theorem together imply that there are real numbers \(m\) and \(M\) so that \[f([a,b]) = [m, M].\]
We summarize this fact by saying that continuous functions take closed and bounded intervals to closed and bounded intervals.
Note that the intermediate value theorem implies that continuous functions take intervals to intervals, but it is certainly possible that a continuous function takes an open interval to open interval, a half-open interval, or a closed interval.
Example 14
Find intervals \(I\) so that \(f(I)\) is an interval of the form \([a,b]\), \((a, b)\), \((a, b]\), and \([a, b)\), where \(f\) is the function that is given by \[f(x) = \tfrac{1}{x}.\]
- If \(I=[1,2]\), then \(f([1,2])=[\tfrac{1}{2},1].\)
- If \(I=[1,\infty)\), then \(f((1,\infty])=(0,1].\)
- If \(I=(-\infty,-1]\), then \(f((-\infty,-1])=[-1,0).\)
- If \(I=(1,2)\), then \(f((1,2))=(\tfrac{1}{2},1)\)
Here are the equivalent limit laws for continuous functions.
Continuity Laws: Sum, Products, Polynomials and Rational Functions
The limit laws immediately imply that if \(f\) and \(g\) are both defined and continuous on a set \(S\), then \(fg\) and \(f+g\) are both continuous on \(S\).
If in addition, \(g\) is nonzero on \(S\), then the quotient \(\frac{f}{g}\) is also continuous on \(S\).
Since the function \({\rm pow}_1\) is continuous on \(\mathbb R\), the limit laws therefore imply that polynomials are continuous.
Since polynomial functions are continuous, rational functions are also continuous wherever they are defined.
Practice using the continuity laws with the following examples.
Example 15
For each function \(f\), decompose \(f\) into sums, products, and quotients of continuous functions to find a set \(S\) on which \(f\) is continuous:
\(f(x) = \frac{(x-1)(x+1)^3}{x^4 +3}\);
\(f(x) = \frac{(\cos(x)-5)(x^2+1)}{x\cos(x)} + \tan(x)\)
- Take \(a(x)=(x-1)\), \(b(x)=(x+1)\), and \(c(x)=x^4+3\). Then \(f\) decomposes like this: \(f=\frac{a\cdot b\cdot b\cdot b}{c}\). The function will be continuous on \(S\) so long as the numerator is continuous on \(S\), the denominator is continuous on \(S\), and the denominator is not equal to zero.
- The numerator, \(a\cdot b\cdot b\cdot b\) is the product of functions, so it will be continuous so long as all functions are continuous on the same set. Since \(a=(x-1)\) and \(b=(x+1)\) are polynomials, they are continuous on \(\mathbb{R}\). Therefore, the numerator is continuous on \(\mathbb{R}\).
- The denominator, \(c\) is a polynomial, so it is continuous on \(\mathbb{R}\).
- The denominator, \(c(x)=x^4+3\), is zero when \(x^4+3=0\). There is no solution, so we do not need to exclude any numbers in our answer. So the common set \(S\) is \(\mathbb{R}\).
- Take \(a(x)=\cos(x)\), \(b(x)=x^2+1\), \(c(x)=x\), \(d(x)=5\), and \(e(x)=\tan(x)\). Then \(f\) decomposes like this: \(f=\frac{(a-d)\cdot b}{c\cdot a}+e\). The function will be continuous on \(S\) so long as the numerator is continuous on \(S\), the denominator is continuous on \(S\), and the denominator is not equal to zero, and \(e\) is continuous on \(S\)
- The numerator: \((a-d)\cdot b\) is the product of functions, so it will be continuous so long as all functions are continuous on the same set. The function \((a-d)(x)=\cos(x)-5\) is a cosine function shifted down by 5. The function cosine is continuous on all real numbers, so \(a-d\) will still be continuous on all real numbers. The function \(b(x)=x^2+1\) is a polynomial so it is also continuous on the same set. Therefore, the numerator is continuous on \(\mathbb{R}\).
- The denominator: \(c\) is a polynomial, so it is continuous on \(\mathbb{R}\). \(a\) is is the cosine function so it is likewise continuous on \(\mathbb{R}\). Therefore, the denominator is continuous on \(\mathbb{R}\).
- The denominator, \(x\cos(x)\), is zero when \(x\cos(x)=0\). One solution is \(x=0\) and the other is when \(\cos(x)=0\). So we exclude \(x=0\) and \(x=k\frac{\pi}{2}\), where \(k\) is an odd integer.
- The term \(e(x)=\tan(x)\) is continuous as long as \(x\) is not equal to \(x=k\frac{\pi}{2}\), where \(k\) is an odd integer. So the common set \(S\) is \(\mathbb{R}\setminus \{0,k\frac{\pi}{2}\}\) or \(\{x\in\mathbb{R}\colon x\not =0 \text{ or } x\not= k\frac{\pi}{2} , k\text{ is an odd integer}\}.\)
The situation for composite functions is a little more subtle. Here is the theorem for composite functions.
Continuity for Composite Functions
Take \(g\) to be a function on an interval \(I\) in \(\mathbb R\) that is continuous at a point \(x_0\) in \(I\).
Take \(f\) to be a function on \(g(I)\).
If \(f\) is continuous at \(g(x_0)\), then \(f\circ g\) is continuous at \(x_0\).
Here is a proof of the above fact.
Example 16
Give a proof of the above fact.
Take a sequence \((x_n)\) in \(\mathcal{D}(g)\setminus \{x_0\}=I \setminus\{x_0\}\) such that \(\displaystyle\lim_{n\to\infty}x_n=x_0\). Show \(\displaystyle\lim_{n\to\infty}(f\circ g)(x_n)=\displaystyle\lim_{n\to\infty}f(g(x_n))\) converges to \(f(g(x_0))\). Because \(g\) is continuous at \((x_0)\) and \(f\) is continuous at \(g(x_0)\),
\(\displaystyle\lim_{n\to\infty}g(x_n)=g(x_0)\)
\(\displaystyle\lim_{n\to\infty}f(g(x_n))=f(g(x_0)).\)
Therefore \(\displaystyle\lim_{n\to\infty}(f\circ g)(x_n)=f(g(x_0)).\)
If we are just interested in calculating limits of composites, then we just need \(g\) to have a limit \(L\) and the function \(f\) to be continuous at \(L\).
Example 17
Write each function \(h\) that is given below as a compound function to determine \(\displaystyle \lim_{x\to x_0}h(x)\), where \(h\) and \(x_0\) are given by:
- \(h(x) = \sin\big(\frac{x^2 -x - 2}{x-2}\big)\), \(x_0 = 2\);
- \(h(x) = \sqrt{\frac{1-\cos(x-1)}{x-1}}\), \(x_0 = 1\).
- \(h(x) = \exp_3\big(\frac{x^2 -x - 2}{x+1}\big)\), \(x_0 = -1\);
- \(h(x) = \log_5\big(\frac{\sin(2x)}{3x}\big)\), \(x_0 = 0\).
- The function can be rewritten as \(h=f\circ g\) where \(f(x)=\sin(x)\) and \(g(x)=\frac{x^2 -x - 2}{x-2}\). Check that \(\displaystyle \lim_{x\to 2}g(x)\) exists and \(f\) is continuous at that value to determine the limit of \(h\):\[\begin{align*}\lim_{x\to 2}g(x)&=\lim_{x\to 2}\frac{x^2-x-2}{x-2}\\ &=\lim_{x\to 2}\frac{(x-2)(x+1)}{x-2}\\ &=\lim_{x\to 2}(x+1)\\ &=3\end{align*}.\] Since \(f(x)=\sin(x)\) is continuous on \(\mathbb{R}\) it is continuous at \(3\). Therefore by above theorem; \(\displaystyle \lim_{x\to 2}\sin\left(\frac{x^2 -x - 2}{x-2}\right)=\sin\left(\displaystyle \lim_{x\to 2}\frac{x^2 -x - 2}{x-2}\right)=\sin(3)\).
- The function can be rewritten as \(h=f\circ g\) where \(f(x)=\sqrt{x}\) and \(g(x)=\frac{1-\cos(x-1)}{x-1}\). Check that \(\displaystyle \lim_{x\to 1}g(x)\) exists and that \(f\) is continuous at that value to determine the limit of \(h\): \[\begin{align*}\lim_{x\to 1}g(x)&=\lim_{x\to 1}\frac{1-\cos(x-1)}{x-1}\\ &=0 \end{align*}\] since \(\displaystyle\lim_{\star \to 0}\frac{1-\cos(\star)}{\star}\) from Chapter 5.4. Since \(f(x)=\sqrt{x}\) is continuous on \([0,\infty),\) it is continuous at \(0\). Therefore by above theorem; \(\displaystyle \lim_{x\to 1}\sqrt{\frac{1-\cos(x-1)}{x-1}}=\sqrt{\lim_{x\to 1}\frac{1-\cos(x-1)}{x-1}}=\sqrt{0}=0\).
- The function can be rewritten as \(h=f\circ g\) where \(f(x)=\text{exp}_3(x)=3^x\) and \(g(x)=\frac{x^2 -x - 2}{x+1}\). We need to check that \(\displaystyle \lim_{x\to -1}g(x)\) exists and that \(f\) is continuous at that value to conclude what the limit of \(h\) will be: \[\begin{align*}\lim_{x\to -1}g(x)&=\lim_{x\to -1}\frac{x^2 -x - 2}{x+1}\\ &=\lim_{x\to -1}\frac{(x-2)(x+1)}{x+1}\\ &=\lim_{x\to -1}(x-2)\\ &=-3. \end{align*}\] Since \(f(x)=\text{exp}_3(x)=3^x\) is continuous on \(\mathbb{R},\) it is continuous at \(-3\). Therefore by the above theorem; \(\displaystyle \lim_{x\to -1}\exp_3\big(\frac{x^2 -x - 2}{x+1}\big)=\exp_3\left(\lim_{x\to -1}\frac{x^2 -x - 2}{x+1}\right)=\exp_3(-3)=3^{-3}=\frac{1}{27}\).
- The function can be rewritten as \(h=f\circ g\) where \(f(x)=\text{log}_5(x)\) and \(g(x)=\frac{\sin(2x)}{3x}\). Check that \(\displaystyle \lim_{x\to 0}g(x)\) exists and that \(f\) is continuous at that value to determine the limit of \(h\): \[\begin{align*}\lim_{x\to 0}g(x)&=\lim_{x\to 0}\frac{\sin(2x)}{3x}\\ &=\frac{2}{3}. \end{align*}\] Since \(f(x)=\text{log}_5(x)\) is continuous on \((0,\infty),\) it is continuous at \(\frac{2}{3}\). Therefore by the above theorem; \(\displaystyle \lim_{x\to 0}\log_5\left(\frac{\sin(2x)}{3x}\right)=\log_5\left(\lim_{x\to 0}\frac{\sin(2x)}{3x}\right)=\log_5(2/3)\).
Approximating Continuous Functions
The Intermediate Value Theorem is an existence theorem, it guarantees that certain equations that involve continuous functions have solutions.
For example, if \(f\) and \(g\) are continuous functions that are defined on the same interval \([a,b]\) and if \(f(a)-g(a)\) and \(f(b)-g(b)\) have different signs, then there is at least one solution to the equation \[f(x) = g(x)\] on \([a,b]\).
Knowing that there is a solution gives a way of finding a solution to the equation.
Example 18
Show that the equation \[x = \cos(x)\] has at least one solution.
Set \(f(x)=x\) and \(g(x)=\cos(x)\). Both functions are continuous on all of \(\mathbb{R}\) because \(f\) is a polynomial and \(g\) is the cosine function. Focus on \(f(x)-g(x)=x-\cos(x)\). Notice that when \(x=0\), \(f(0)-g(0)=-1\) and when \(x=\frac{\pi}{2}\), \(f(\frac{\pi}{2})-g(\frac{\pi}{2})=\frac{\pi}{2}\). On the interval \([0,\frac{\pi}{2}]\), \(f(0)-g(0)\) and \(f(\frac{\pi}{2})-g(\frac{\pi}{2})\) have different signs. Because \(h(x)=f(x)-g(x)=x-\cos(x)\) is continuous on \([0,\frac{\pi}{2}]\) and \(h(0)<0\) and \(h(\frac{\pi}{2})>0\), the Intermediate Value Theorem states that there exists a value \(z\) in \([0,\frac{\pi}{2}]\), for which \(h(z)=0.\) In other words, \(z-\cos(z)=0\) or \(z=\cos(z)\). So there is at least one solution to the equation \[x = \cos(x).\]
In this example, pay attention to how the intermediate value theorem is used.
Example 19
Take \(f\) to be the polynomial that is given by \[f(x) = x^7 - 4x^3 +x^2 - 3.\] Show that \(f\) has at least one real root.
Use the intermediate value theorem by finding an interval \([a,b]\), so that \(f(a)\) and \(f(b)\) have opposite sign.
Focus on \([-1,0]\). Since \(f\) is a polynomial, it is continuous everywhere, including the interval \([-1,0]\). Notice that \(f(-1)=1\) while \(f(0)=-3\). Therefore, by the intermediate value theorem, there is a \(z\) in \([-1,0]\) so that \(f(z)=0.\) Hence \(f\) has at least one real root.
The bisection method is an algorithm for finding solutions to an equation of the form \[f(x) = g(x),\] where \(f\) and \(g\) are continuous functions on an interval \([a,b]\).
Suppose that \(f(a) -g(a)\) is negative and that \(f(b)-g(b)\) is positive, and that \(c\) is the midpoint of \([a,b]\).
If \(f(c) - g(c)\) is negative, then there is a solution in \([c,b]\).
If \(f(c) - g(c)\) is positive, then there is a solution in \([a,c]\).
In either case, a solution is now guaranteed to exist in an interval that is half the length of the original interval.
Example 20
Use the bisection method to approximate a solution to the equation \[x^2 = 2\] to within an error of no greater than \(\frac{1}{20}\).
Take \(f(x)=x^2\) and \(g(x)=2\). Because they are polynomial functions, they are continuous everywhere. Focus on the interval \([1,2]\).
Notice that \(f(1)-g(1)=-1\) and \(f(2)-g(2)=2\) have opposite sign. Let \(c\) be the midpoint of the interval \([1,2]\): \(c=\frac{2+1}{2}=\frac{3}{2}\).
The difference \(f(c)-g(c)=f(3/2)-g(3/2)=\frac{1}{4}\) is positive, so that means there is a solution in \([1,\frac{3}{2}].\)
Let \(c\) be the midpoint of \([1,\frac{3}{2}]\): \(c=\frac{\frac{3}{2}+1}{2}=\frac{5}{4}\).
The difference \(f(c)-g(c)=f(5/4)-g(5/4)=-\frac{7}{16}\) is negative, so that means there is a solution in \([\frac{5}{4},\frac{3}{2}].\)
Let \(c\) be the midpoint of \([\frac{5}{4},\frac{3}{2}]\): \(c=\frac{\frac{5}{4}+\frac{3}{2}}{2}=\frac{11}{8}\).
The difference \(f(c)-g(c)=f(11/8)-g(11/8)=-\frac{7}{64}\) is negative, so that means there is a solution in \([\frac{11}{8},\frac{3}{2}].\)
Let \(c\) be the midpoint of \([\frac{11}{8},\frac{3}{2}]\): \(c=\frac{\frac{11}{8}+\frac{3}{2}}{2}=\frac{23}{16}\).
The difference \(f(c)-g(c)=f(23/6)-g(23/6)=\frac{17}{256}\approx 0.06640625\) is positive, so that means there is a solution in \([\frac{11}{8},\frac{23}{16}].\)
Let \(c\) be the midpoint of \([\frac{11}{8},\frac{23}{16}]\): \(c=\frac{\frac{11}{8}+\frac{23}{16}}{2}=\frac{45}{32}\).
The difference \(f(c)-g(c)=f(45/32)-g(45/32)=-\frac{23}{1024}\approx -0.0224609375\) is negative, so that means there is a solution in \([\frac{45}{32},\frac{23}{16}].\)
Let \(c\) be the midpoint of \([\frac{45}{32},\frac{23}{16}]\): \(c=\frac{\frac{45}{32}+\frac{23}{16}}{2}=\frac{91}{64}\).
The difference \(f(c)-g(c)=f(91/64)-g(91/64)=\frac{89}{4096}\approx 0.021728515625\) is positive, so that means there is a solution in \([\frac{45}{32},\frac{91}{64}].\)
Therefore, the solution \(x^2=2\) is in the interval \([\frac{45}{32},\frac{91}{64}]\) and the error will be no greater than \(\frac{1}{20}=0.05\).
However, there is an exact solution to this equation: \(\sqrt{2}\). In fact, \(\sqrt{2}\) is in the interval \([\frac{45}{32},\frac{91}{64}]\). This means \(\frac{45}{32}\leq\sqrt{2}\leq\frac{91}{64}\) or \(1.40625 \leq \sqrt{2}\leq 1.421875\). This is an approximation the square root of two.