Instructions
This exam contains 6 problems. No aids are permitted on this examination. Examples of illegal aids include, but are not limited to, textbooks, notes, calculators, or any electronic device.
Your solutions to each problem should be written in the provided space only. Scratch paper is available upon request; however, scratch work cannot be submitted for marks. Do not, under any circumstances, write on the QR code in the top right corner of each page. Doing so will result in you receiving a zero (0) on this test. Unless otherwise indicated, you are required to show your work on each problem on this exam. The following rules apply:
- Organize your work in a reasonably neat and coherent way, in the space provided. Work scattered all over the page without a clear ordering will receive very little credit.
Mysterious or unsupported answers will not receive full credit. A correct answer, unsupported by calculations, explanation, or algebraic work, will receive no credit; an incorrect answer supported by substantially correct calculations and explanations might still receive partial credit.
(10 points) Prove the following theorem
If \(f,g,h : [0,\infty) \to \mathbb{R}\) satisfy \(f(x) \leq g(x) \leq h(x)\) for all \(x \in [0,\infty)\) and \(\lim_{x\to\infty}f(x) = \lim_{x\to\infty}h(x) =L\), then \(\lim_{x\to\infty}g(x) = L\).
Solution: Let \(\epsilon>0\) be given. Since \(f,h\xrightarrow{x\to\infty}L\), we know there exists \( M_{f},M_{q}>0\) such that \(|f(x)-L|<\epsilon \) whenever \(x>M_{f}\) and \(|h(x)-L|<\epsilon \) whenever \(x>M_{h}\). Let \(M=\max\left\{M_{f},M_{g}\right\}\) so that the previous two inequalities hold true if \(x>M\). Moreover, note that we can write each inequality as \[\underline{L-\epsilon<f(x)}<L+\epsilon\quad\mathrm{and}\quad L-\epsilon<\underline{h(x)<L+\epsilon}.\]
Take the first half of the first inequality, the second half of the second inequality (both underlined), and combined with the hypothesis that \(f(x) \leq g(x) \leq h(x)\), we get \[L-\epsilon<f(x)\leq g(x)\leq h(x)<L+\epsilon \]
so that \(|g(x)-L|<\epsilon \) as required.Define the function \(f(x)=\begin{cases}x&x\in\mathbb{Q}\\0&\text{otherwise}\end{cases}.\)
Note: You may freely assume that both \(\mathbb Q\) and \(\mathbb R\) \ \(\mathbb Q\) are dense in \(\mathbb R\).
(i) (5 points) Show that \(f\) is continuous at \(0\).
Solution: Clearly \(f(0)=0\), so we need to show that \(\lim_{x\to 0}f(x) = 0\). Let \(\epsilon>0\) be given, and \(\delta=\epsilon\). Suppose \(|x|<\delta\). If \(x\in\mathbb R \ \mathbb Q\) then \(|f(x)|=|0|<\epsilon\) as required. Otherwise, if \(x\in\mathbb Q\) then \(|f(x)|=|x|=\epsilon\). In either case, \(|f(x)|<\epsilon\), showing that the limit is 0.
(ii) (5 points) Show that \(f\) is not continuous anywhere else.
Solution: Fix some \(c\neq0\).
Case 1: \(c\in\mathbb Q\)
Let \(\epsilon=|c|/2>0\) and suppose \(\delta>0\) is given. Since the irrationals are dense in \(\mathbb R\), we can find some irrational \(p\) satisfying \(|c-p|<\delta\), in which case \(|f(c)-f(p)|=|c|>|c|/2=\epsilon\).
Case 2: \(c\in\mathbb R\ \mathbb Q\)
Let \(\epsilon=|c|/2>0\) and suppose \(\delta>0\) is given. Let \(\rho=\min\{\epsilon,\delta\}>0\), and choose some rational number \(q\) such that \(|c-q|<\rho\), which we can do as the rationals are dense. Note then that \[|q-c|<\rho\quad\Rightarrow\quad c-\rho<q<c+\rho.\]
If \(c>0\) then \(q>c-\rho>c-c/2=c/2\), and \(|f(q)-f(c)|=|f(q)|=|q|>c/2>\epsilon \). If \(c<0\) then \(q<c+\rho<c-c/2<c/2<0\) implies that \(|f(q)-f(c)|=|q|=-q>-c/2>\epsilon \).(10 points) Suppose \(f:\mathbb{R}\to\mathbb{R}\), and there exists some \(K>0\) such that \(|f(x)-f(y)|\leq K|x-y|\) for all \(x,y\in\mathbb{R}\). Show that \(f\) is uniformly continuous on \(\mathbb R\).
Solution: Let \(\epsilon>0\) be given and set \(\delta=\epsilon/K>0\). Now if \(x,y\in\mathbb{R}\) satisfy \(|x,y|<\delta\), then \[|f(x)-f(y)|\leq K|x-y|<K\frac{\epsilon}{K}=\epsilon \]
showing that \(f\) is uniformly continuous, as required.(10 points) Define \(f:\mathbb{R}\to\mathbb{R}\) by \(f(x)=3x^3-6x-1\). Show that the function \(f\) has at least two roots.
Solution: Since \(f\) is a polynomial it's certainly continuous. Moreover, \(f(-2) = -13<0\), \(f(-1)=2>0\) and \(f(0)=-1<0\). Thus by the (weak) Intermediate Value Theorem, there is a root to \(f\) in \([−2, −1]\) and a root in \([−1, 0]\), hence there are at least two roots to \(f\).
(10 points) Write down a function \(f:\mathbb{R}\to\mathbb{R}\) which is continuous on all \(\mathbb R\) but not differentiable for each \(n\in\mathbb Z\). Be sure to justify your answer, but keep your justifications short and to the point.
Solution: Consider the function \(\hat{f}:[-1,1]\to\mathbb{R}\) given by \(\hat{f}(x)=|x|\) and define \(f:\mathbb{R}\to\mathbb{R}\) as the 2-periodic extension of \(\hat{f}\); that is, \(f(x) = \hat{f}(x)\) for \(x\in [-1,1]\) and \(f(x+2)=f(x)\). On the interval \([2k-1,2k+1]\), this is equivalent to saying that \(f(x) =|x-2k|\).
The function \(\hat{f}\) is continuous on \((-1,1)\) and so to check that \(f\) is continuous, we need only do this at its weld, for which is suffices to check continuity at \(x = 1\). But indeed, \[\lim_{x\to1^-}f(x)=\lim_{x\to1^-}|x|=1\quad\mathrm{and}\quad\lim_{x\to1^+}f(x)=\lim_{x\to1^+}|x-2|=1,\]
showing that \(f\) is continuous at \(x=1\).
We know \(\hat{f}\) is not differentiable at \(x=0\), by periodicity it is therefore not differentiable at any even number. It remains to check the odd numbers, for which \(x=1\) suffices. Here we have: \[\lim\limits_{h\to0^-}\frac{f(1+h)-f(1)}{h}=\lim\limits_{h\to0^-}\frac{|1+h|-1}{h}=\lim\limits_{h\to0^-}\frac{(1+h)-1}{h}=1\]
(here we've used the fact that if \(h<0\) is sufficiently small, \(1+h>0\) ). Similarly, \[\lim_{h\to0^+}\frac{f(1+h)-f(1)}{h}=-1.\]
Thus \(f\) is not differentiable at \(x=1\), and by periodicity, not differentiable at all odd integers.(10 points) Define the function \(f(x)=\begin{cases}x^2\sin(1/x)&x\neq0\\0&x=0\end{cases}.\) Show that \(f\) is differentiable at \(x = 0\).
Solution: Applying the limit definition of the derivative:
\[f'(0)=\lim_{x\to0}\frac{f(x)-f(0)}{x}=\lim_{x\to0}\frac{x^2\sin(1/x)}{x}=\lim_{x\to0}x\sin\left(\frac{1}{x}\right).\]
Note that \(|\sin(1/x)|\leq1\) for all \(x\neq0\), so \(0 \leq |x\sin(1/x)| \leq |x|\). By the Squeeze Theorem, the bounding function both tend to zero as \(x\to0\), so
\[\overline{\lim\limits_{x\to0}\left|x\sin\left(\frac{1}{x}\right)\right|=0,}\quad\text{which implies that}\quad\lim\limits_{x\to0}x\sin\left(\frac{1}{x}\right)=0,\]
Thus \(f'(0)=0\), showing that \(f\) is differentiable at 0.