Skip to content
Date: Oct 2, 2026
  1. Prove that every nonempty open subset of the real line contains both a rational and an irrational number, and deduce that the set of rationals has empty interior while its closure is the whole line.

    Hint

    A nonempty open set contains some interval \((x-r,x+r)\) ; apply Theorem 1.10 and Corollary 1.12 to it. For the interior: no ball lies inside the rationals. For the closure: every ball about any real number contains a rational.

  2. Let \((x_n)\) be a bounded sequence of real numbers such that every convergent subsequence has the same limit \(L\) . Prove that \(x_n\to L\) . Show by example that the conclusion can fail if the sequence is not assumed bounded.

    Solution

    Suppose \((x_n)\) does not converge to \(L\) . By the negation of the definition of convergence there is \(\varepsilon_0>0\) and a subsequence \((x_{n_k})\) with \(\lvert x_{n_k}-L\rvert\ge\varepsilon_0\) for all \(k\) (constructed as in Exercise 2.11).

    This subsequence is bounded, because the whole sequence is. By the Bolzano–Weierstrass theorem it has a further subsequence converging to some number \(t\) . Since every term of it satisfies \(\lvert x-L\rvert\ge\varepsilon_0\) , the limit satisfies \(\lvert t-L\rvert\ge\varepsilon_0\) (by Exercise 2.3 and the order theorem), so \(t\ne L\) .

    But this further subsequence is a convergent subsequence of \((x_n)\) , so by hypothesis its limit is \(L\) . This contradiction shows \(x_n\to L\) .

    Boundedness is needed to guarantee that the bad subsequence has a convergent subsequence at all. For \(x_n=n\) when \(n\) is odd and \(x_n=0\) when \(n\) is even, a convergent subsequence can contain only finitely many odd-indexed terms, so every convergent subsequence has limit \(0\) ; yet the sequence is unbounded and diverges.

  3. Decide whether \(\sum_{n=1}^\infty(-1)^n\bigl(\sqrt{n+1}-\sqrt n\bigr)\) converges absolutely, converges conditionally, or diverges, proving your answer.

    Solution

    Let \(a_n=\sqrt{n+1}-\sqrt n=\dfrac{1}{\sqrt{n+1}+\sqrt n}\) .

    Convergence. The second form shows that \(a_n>0\) , that \((a_n)\) is decreasing, since the denominator increases with \(n\) , and that \(a_n<1/(2\sqrt n)\to 0\) . By the alternating series test, \(\sum(-1)^na_n\) converges.

    No absolute convergence. The series of absolute values is \(\sum a_n\) , which telescopes:

    \[ \sum_{n=1}^N\bigl(\sqrt{n+1}-\sqrt n\bigr)=\sqrt{N+1}-1 , \]

    and this is unbounded. So \(\sum\lvert(-1)^na_n\rvert\) diverges.

    The series converges conditionally. In particular, by Riemann’s rearrangement theorem its terms can be reordered to produce any sum whatever.

  4. Let \(f:[a,b]\to\mathbb R\) be continuous and one-to-one. Prove that \(f\) is strictly monotone.

    Hint

    Suppose \(f(a)<f(b)\) . First show \(f(a)<f(x)<f(b)\) for \(a<x<b\) : if, say, \(f(x)<f(a)\) , the Intermediate Value Theorem on \([x,b]\) produces a second point where \(f\) takes the value \(f(a)\) . Then, for \(a<x<y<b\) , apply the same argument on \([a,y]\) to get \(f(x)<f(y)\) .

  5. Let \(f:\mathbb R\to\mathbb R\) be continuous with \(f(x+1)=f(x)\) for all \(x\) . Prove that \(f\) is bounded, attains a maximum and a minimum, and is uniformly continuous on \(\mathbb R\) .

    Solution

    Reduction to one period. By Exercise 1.8 every real \(x\) can be written as \(x=k+t\) with \(k\) an integer and \(0\le t<1\) , and by induction on the hypothesis \(f(x)=f(t)\) . So \(f\) takes on \(\mathbb R\) exactly the values it takes on \([0,1]\) .

    Bounded with extremes. On the compact interval \([0,1]\) the continuous function \(f\) is bounded and attains a maximum and a minimum, by the Extreme Value Theorem. By the reduction these are the maximum and minimum of \(f\) on \(\mathbb R\) .

    Uniformly continuous. On the compact interval \([0,2]\) , \(f\) is uniformly continuous by the Heine–Cantor theorem. Given \(\varepsilon>0\) choose \(\delta\) for \([0,2]\) and replace it by \(\min\{\delta,1\}\) . Let \(x\le y\) be real with \(y-x<\delta\) , and let \(k\) be the integer with \(k\le x<k+1\) . Then \(x-k\in[0,1)\) and \(y-k\in[0,2)\) , both in \([0,2]\) , at distance less than \(\delta\) . Hence

    \[ \lvert f(x)-f(y)\rvert=\lvert f(x-k)-f(y-k)\rvert<\varepsilon . \]

    So \(f\) is uniformly continuous on \(\mathbb R\) . The domain is not compact; periodicity lets one compact piece stand for the whole line. The interval \([0,2]\) was used, not \([0,1]\) , so that both of two nearby points could be moved into it by the same shift.

  6. Let \(f\) be differentiable on \((0,\infty)\) with \(f'(x)\to 0\) as \(x\to\infty\) . Prove that \(f(x+1)-f(x)\to 0\) as \(x\to\infty\) , and show by example that \(f(x)\) itself need not converge.

    Solution

    Let \(x>0\) . The function \(f\) is differentiable on \((0,\infty)\) , hence continuous on \([x,x+1]\) and differentiable inside it. By the Mean Value Theorem there is \(c_x\in(x,x+1)\) with

    \[ f(x+1)-f(x)=f'(c_x). \]

    Let \(\varepsilon>0\) . Since \(f'(t)\to 0\) as \(t\to\infty\) , there is \(R\) with \(\lvert f'(t)\rvert<\varepsilon\) for all \(t>R\) . If \(x>R\) , then \(c_x>x>R\) , so \(\lvert f(x+1)-f(x)\rvert<\varepsilon\) . Hence \(f(x+1)-f(x)\to 0\) .

    For the example take \(f(x)=\log x\) . Then \(f'(x)=1/x\to 0\) , and \(f(x+1)-f(x)=\log(1+1/x)\to 0\) as predicted, but \(\log x\) is unbounded and has no limit. The situation is the continuous analogue of the harmonic series: increments that tend to zero do not make a function converge.

  7. For each statement give a proof or a counterexample: (a) if \(\sum a_n\) converges then \(\sum a_n^2\) converges; (b) a function on \(\mathbb R\) with a bounded derivative is uniformly continuous; (c) a closed bounded subset of a complete metric space is compact; (d) if \(f_n\to f\) pointwise on \([0,1]\) and every \(f_n\) is integrable, then \(\int_0^1f_n\to\int_0^1f\) ; (e) a function that is differentiable on \(\mathbb R\) has a continuous derivative.

    Answer

    (a) False: \(a_n=(-1)^n/\sqrt n\) (Exercise 3.4). (b) True: a bounded derivative gives a Lipschitz bound by Corollary 6.8(c). (c) False: the closed unit ball of the space of bounded sequences, or any infinite set with the discrete metric (Example 4.5). (d) False: the humps \(n^2x(1-x)^n\) of Example 8.1 converge pointwise to \(0\) with integrals tending to \(1\) . (e) False: \(x^2\sin(1/x)\) , Example 6.2.

  8. Let \(f\) be continuous on \([0,1]\) . Prove that \(\int_0^1f(x)x^n\,dx\to 0\) as \(n\to\infty\) , and then that \(n\int_0^1f(x)x^n\,dx\to f(1)\) .

    Solution

    Let \(M=\lVert f\rVert_\infty\) , finite by the Extreme Value Theorem.

    First limit. By Theorem 7.11,

    \[ \Bigl\lvert\int_0^1f(x)x^n\,dx\Bigr\rvert\le M\int_0^1x^n\,dx=\frac{M}{n+1}\to 0 . \]

    Second limit. Since \(n\int_0^1x^n\,dx=n/(n+1)\) ,

    \[ n\int_0^1f(x)x^n\,dx-\frac{n}{n+1}\,f(1)=n\int_0^1\bigl(f(x)-f(1)\bigr)x^n\,dx . \]

    Let \(\varepsilon>0\) . By continuity at \(1\) there is \(\delta\in(0,1)\) with \(\lvert f(x)-f(1)\rvert<\varepsilon\) for \(1-\delta\le x\le 1\) . Split the integral at \(1-\delta\) . On \([1-\delta,1]\) its absolute value is at most \(\varepsilon\cdot n\int_0^1x^n\,dx\le\varepsilon\) . On \([0,1-\delta]\) we have \(\lvert f(x)-f(1)\rvert\le 2M\) and \(x^n\le(1-\delta)^n\) , so the absolute value is at most \(2Mn(1-\delta)^n\) , which tends to \(0\) as \(n\to\infty\) . Hence the right side has absolute value less than \(2\varepsilon\) for all large \(n\) . Since \(n/(n+1)\to 1\) , it follows that \(n\int_0^1f(x)x^n\,dx\to f(1)\) .

    The weights \(nx^n\) have total mass close to \(1\) and concentrate near \(x=1\) ; they are humps like those of Example 8.1, and integrating against them samples \(f\) at the point where they pile up. For instance, with \(f(x)=\cos x+x^2\) , where \(f(1)\approx 1.5403\) , the values for \(n=10,100,1000\) are about \(1.3207\) , \(1.5139\) , \(1.5376\) .

  9. Let \(S=\{1/m-1/n:m,n\in\mathbb N\}\) . Find \(\sup S\) and \(\inf S\) and say whether they are attained, find all limit points of \(S\) , and decide whether \(S\) is closed and whether it is compact.

    Answer

    Every element satisfies \(-1<1/m-1/n<1\) . Taking \(m=1\) and \(n\) large gives values near \(1\) ; so \(\sup S=1\) , not attained, and symmetrically \(\inf S=-1\) , not attained. The limit points are \(0\) , the numbers \(1/m\) , and the numbers \(-1/n\) (\(m,n\in\mathbb N\) ): a sequence of distinct elements must have \(m\to\infty\) or \(n\to\infty\) along a subsequence. The limit point \(1\) is not in \(S\) , so \(S\) is not closed, and hence not compact.

  10. Let \(f(x)=\sum_{n=1}^\infty x^n/n^2\) . Prove that \(f\) is continuous on \([-1,1]\) and differentiable on \((-1,1)\) , and that \(xf'(x)=-\log(1-x)\) for \(\lvert x\rvert<1\) .

    Solution

    Continuity on \([-1,1]\) . For \(\lvert x\rvert\le 1\) , \(\lvert x^n/n^2\rvert\le 1/n^2\) , and \(\sum 1/n^2\) converges. By the M-test the series converges uniformly on \([-1,1]\) , and its terms are continuous, so \(f\) is continuous there by Theorem 8.5.

    Differentiability on \((-1,1)\) . The series is a power series with radius of convergence \(1\) , since \((n^2)^{1/n}\to 1\) . By Theorem 8.11, for \(\lvert x\rvert<1\) ,

    \[ f'(x)=\sum_{n=1}^\infty\frac{nx^{n-1}}{n^2}=\sum_{n=1}^\infty\frac{x^{n-1}}{n},\qquad\text{so}\qquad xf'(x)=\sum_{n=1}^\infty\frac{x^n}{n}. \]

    Identifying the sum. By Example 8.6, \(\log(1+t)=\sum_{n\ge 1}(-1)^{n+1}t^n/n\) for \(\lvert t\rvert<1\) . Put \(t=-x\) : since \((-1)^{n+1}(-x)^n=-x^n\) , we get \(\log(1-x)=-\sum_{n\ge 1}x^n/n\) . Therefore \(xf'(x)=-\log(1-x)\) for \(\lvert x\rvert<1\) .

    At \(x=1\) the series for \(f\) still converges, to \(\sum 1/n^2\) , but the differentiated series becomes the harmonic series: \(f\) is continuous on the closed interval and its derivative blows up at the right end.

  11. Let \(f\) be integrable on \([a,b]\) and \(F(x)=\int_a^xf\) . State, with a reason or a counterexample for each, whether \(F\) must be continuous, uniformly continuous, differentiable, increasing when \(f\ge 0\) .

    Answer

    Continuous: yes; uniformly continuous: yes. Both follow from the Lipschitz bound \(\lvert F(y)-F(x)\rvert\le M\lvert y-x\rvert\) of Theorem 7.14. Differentiable: not necessarily; for the step function of Example 7.4, \(F\) has a corner. Increasing when \(f\ge 0\) : yes, since \(F(y)-F(x)=\int_x^yf\ge 0\) for \(x<y\) by additivity and the order property.

  12. Let \(f_n(x)=n\bigl(\sqrt{x+1/n}-\sqrt x\bigr)\) for \(x>0\) . Find the pointwise limit, and prove that the convergence is uniform on \([a,\infty)\) for every \(a>0\) but not uniform on \((0,\infty)\) .

    Solution

    Pointwise limit. Multiplying by the conjugate,

    \[ f_n(x)=\frac{n\cdot(1/n)}{\sqrt{x+1/n}+\sqrt x}=\frac{1}{\sqrt{x+1/n}+\sqrt x}. \]

    For fixed \(x>0\) , \(\sqrt{x+1/n}\to\sqrt x\) by continuity of the square root, so \(f_n(x)\to f(x)=1/(2\sqrt x)\) . (This is the derivative of \(\sqrt x\) , as it should be: \(f_n\) is a difference quotient with step \(1/n\) .)

    Uniform on \([a,\infty)\) . For \(x>0\) ,

    \[ 0\le f(x)-f_n(x)=\frac{\sqrt{x+1/n}-\sqrt x}{2\sqrt x\,\bigl(\sqrt{x+1/n}+\sqrt x\bigr)}=\frac{1/n}{2\sqrt x\,\bigl(\sqrt{x+1/n}+\sqrt x\bigr)^2}\le\frac{1}{8n\,x^{3/2}}. \]

    If \(x\ge a>0\) this is at most \(1/(8na^{3/2})\) , a bound independent of \(x\) that tends to \(0\) . So the convergence is uniform on \([a,\infty)\) .

    Not uniform on \((0,\infty)\) . Evaluate at the moving point \(x_n=1/n\) : \(f_n(1/n)=\sqrt n/(\sqrt2+1)\) and \(f(1/n)=\sqrt n/2\) , so

    \[ f(1/n)-f_n(1/n)=\sqrt n\Bigl(\frac12-\frac{1}{1+\sqrt2}\Bigr)\approx 0.0858\,\sqrt n\to\infty . \]

    Hence \(\lVert f-f_n\rVert_\infty\) does not tend to \(0\) on \((0,\infty)\) .

  13. In \(C[0,1]\) with the supremum metric, prove that the set of functions that are positive at every point is open, and that the set of functions whose integral over \([0,1]\) is zero is closed.

    Solution

    The positive functions form an open set. Let \(A=\{f\in C[0,1]:f(x)>0\text{ for all }x\}\) and let \(f\in A\) . By the Extreme Value Theorem \(f\) attains its minimum \(m\) on \([0,1]\) , and \(m>0\) because it is a value of \(f\) . If \(g\in C[0,1]\) with \(\lVert g-f\rVert_\infty<m\) , then for every \(x\) , \(g(x)>f(x)-m\ge 0\) . So the ball \(B(f,m)\) lies in \(A\) , and \(A\) is open.

    The functions of integral zero form a closed set. Let \(Z=\{f\in C[0,1]:\int_0^1f=0\}\) , and let \(f_k\in Z\) converge to \(f\) in the supremum metric, that is, uniformly. By Theorem 8.7, \(\int_0^1f=\lim\int_0^1f_k=0\) , so \(f\in Z\) . By Theorem 4.12, \(Z\) is closed.

    Both arguments are instances of Theorem 5.4. The maps \(f\mapsto\min f\) and \(f\mapsto\int_0^1f\) are continuous real functions on the metric space \(C[0,1]\) , the second being Lipschitz with constant \(1\) ; \(A\) is the preimage of the open set \((0,\infty)\) under the first, and \(Z\) is the preimage of the closed set \(\{0\}\) under the second. Compactness of \([0,1]\) entered in the first part: on \((0,1)\) a positive continuous function can have infimum \(0\) , and the corresponding set would not be open.

  14. Prove that \(\sum_{n=1}^\infty(-1)^{n+1}/(n+x^2)\) converges uniformly on \(\mathbb R\) , although it does not converge absolutely for any \(x\) .

    Solution

    Uniform convergence. Fix \(x\) and let \(b_n=1/(n+x^2)\) . The sequence \((b_n)\) is positive, decreasing, and tends to \(0\) , so by the alternating series test the series converges, to a sum \(s(x)\) , and the partial sums \(s_N(x)\) satisfy

    \[ \lvert s(x)-s_N(x)\rvert\le b_{N+1}=\frac{1}{N+1+x^2}\le\frac{1}{N+1}. \]

    The last bound does not depend on \(x\) and tends to \(0\) . So \(\lVert s-s_N\rVert_\infty\le 1/(N+1)\to 0\) , and the convergence is uniform on \(\mathbb R\) .

    No absolute convergence. Fix \(x\) and choose an integer \(m\ge x^2\) . Then \(1/(n+x^2)\ge 1/(n+m)\) , and \(\sum_n1/(n+m)\) is the harmonic series with its first \(m\) terms removed, which diverges. By comparison \(\sum 1/(n+x^2)\) diverges.

    So the Weierstrass M-test cannot be applied here: any admissible \(M_n\) would have to satisfy \(M_n\ge 1/n\) . The M-test is sufficient for uniform convergence and not necessary; uniform convergence can come from cancellation, with the error bound of the alternating series test doing the work.

  15. Find the error in this argument that every continuous function on \((0,1)\) is bounded: “For each \(x\) choose \(\delta_x>0\) with \(\lvert f(y)-f(x)\rvert<1\) whenever \(\lvert y-x\rvert<\delta_x\) . The intervals \((x-\delta_x,x+\delta_x)\) cover \((0,1)\) ; choose finitely many that cover it, centred at \(x_1,\dots,x_m\) . Then \(\lvert f\rvert\le\max_i\lvert f(x_i)\rvert+1\) .”

    Answer

    The step “choose finitely many that cover it” uses compactness, and \((0,1)\) is not compact; an open cover of it need not have a finite subcover. For \(f(x)=1/x\) the radii \(\delta_x\) shrink to \(0\) as \(x\to 0\) , and no finite number of the intervals covers \((0,1)\) . On \([a,b]\) the same argument is a correct proof that continuous functions are bounded.

  16. Let \(f\) be twice differentiable on \(\mathbb R\) with \(f''(x)\ge 0\) for all \(x\) , and suppose \(f\) is bounded. Prove that \(f\) is constant.

    Hint

    By Exercise 6.18, \(f(x)\ge f(a)+f'(a)(x-a)\) for all \(a,x\) . If \(f'(a)>0\) for some \(a\) , let \(x\to\infty\) to contradict boundedness above; if \(f'(a)<0\) , let \(x\to-\infty\) . So \(f'=0\) everywhere, and Corollary 6.8(a) applies.

Search knowledge base

Explore

On this page

Note