Using the chain rule is like peeling an onion. You have to deal with every layer at a time and if it’s too big you’ll start crying. – A calculus professor

**Problem 1** Suppose f\colon [a,b] \to \mathbb{R} is a function that is not bounded from above. Prove that there exists x_{0} \in [a,b] such that f is not bounded from above in any neighborhood of x_0.

**Proof **Because f is not bounded from above, for every n, there is x_n \in [a,b] such that f(x_n) > n. Since the sequence \{x_n\}_{n=1}^{\infty} is bounded, by the Bolzano–Weirstrass theorem, \{x_n\}_{n=1}^{\infty} has a partial limit, say x_0. Hence in any neighborhood of x_0 there are infinitely many elements of the sequence, say \{x_{n_k}\}_{k=1}^\infty. Because f(x_{n_k}) > n_k, f is not bounded from above in that neighborhood.

**Problem 2** Let \{a_{n}\}_{n=1}^{\infty} be a sequence that is not bounded from above. Prove that it has a subsequence \{a_{n_{k}}\}_{k=1}^{\infty} such that \lim_{k \to\infty}a_{n_{k}}=\infty.

**Idea** Because \{a_{n}\}_{n=1}^{\infty} is not bounded from above, for every k there is n_k such that a_{n_k} > k. The pizza rule applies and \lim_{k \to\infty}a_{n_{k}}=\infty. This construction may suffer from the problem that \{n_k\}_{k=1}^\infty is not increasing.

**Proof **We inductively define an increasing sequence of indices \{n_k\}_{k=1}^\infty. As \{a_{n}\}_{n=1}^{\infty} is not bounded from above, there is n_1 such that a_{n_1} > 1. As \{a_{n}\}_{n=n_1+1}^{\infty} is not bounded from above, there is n_2 > n_1 such that a_{n_2} > 2. As \{a_{n}\}_{n=n_2+1}^{\infty} is not bounded from above, there is n_3 > n_2 such that a_{n_3} > 3. And so on. In general, suppose n_{k-1} is already defined. Since \{a_{n}\}_{n=n_{k-1}+1}^{\infty} is not bounded from above, there is n_k > n_{k-1} such that a_{n_k} > k. Therefore we obtain an increasing sequence of indices \{n_k\}_{k=1}^\infty such that a_{n_k} > k.

**Problem 3** Find an example of a one-to-one and onto continuous function f such that f^{-1} is not continuous. (Hint: Find such a function whose domain is [0,1] \cup (2,3].)

**Proof sketch **Define f\colon [0,1]\cup(2,3] \to [0,2] by f(x) = x for x\in[0,1] and f(x) = x-1 for x\in(2,3]. The inverse function, say g(x) = f^{-1}(x), is g(x) = x for x\in[0,1] and g(x) = x+1 for x\in(1,2], and so g is not continuous at 1.

**Problem 4** Suppose f\colon [a,b] \to \mathbb{R} is a continuous function that is one-to-one. Prove that either f is monotone increasing, or f is monotone decreasing.

**Proof sketch** Assume, for the sake of contradiction, that f is neither monotone increasing nor monotone decreasing. There is u, v, w\in [a,b] such that u < v < w and f(u) < f(v) > f(w) or f(u) > f(v) < f(w). Case 1: Suppose f(u) < f(v) > f(w). We can find such that f(u) < y < f(v) > y > f(w) (why?). By the intermediate value theorem, there is u < u' < v and v < w' < w such that f(u') = y = f(w') contradicting that f is one-to-one. Case 2: Suppose f(u) > f(v) < f(w). This case can be dealt similarly.

**Problem 5** Suppose f(x)>0 and assume that both f(x) and g(x) are differentiable functions. Find the derivative of f(x)^{g(x)}.

**Proof** Because f(x)^{g(x)} = e^{g(x)\ln f(x)}, by the chain rule, (f(x)^{g(x)})' = e^{g(x)\ln f(x)}(g'(x)\ln f(x) + g(x)f'(x)/f(x)) = f(x)^{g(x)}(g'(x)\ln f(x) + g(x)f'(x)/f(x)).

**Fact** The function f\colon [-\pi/2, \pi/2] \to [-1,1] defined by f(x) = \sin x is one-to-one and onto. Its inverse function g\colon [-1,1]\to [-\pi/2, \pi/2] is denoted by g(x) = \arcsin x. It is one of the inverse trigonometric functions.

**Problem 6** Find the derivatives of the following functions: (a) f(x) = \sqrt{\sin(x^2+x+1)}; (b) f(x) = 2^{x^2+\sin(x^2)}; (c) f(x) = \arcsin x.

**Solution **(a) \frac{1}{2}(\sin(x^2+x+1))^{-1/2}\cos(x^2+x+1)(2x+1); (b) 2^{x^2+\sin(x^2)}\ln 2 (2x+\cos(x^2)2x); (c) y = \arcsin x implies that \sin y = x, and so y' \cos y = 1. Because \cos y = \sqrt{1 - \sin^2 y} = \sqrt{1-x^2}, y' = 1/\cos y = 1/\sqrt{1 - x^2}.

**Problem 7** Suppose f\colon \mathbb{R} \to \mathbb{R} defined by f(x)=x\sin (1/x) when x\neq 0. (a) Define f(0) so that f is continuous at 0; (b) Show that f is not differentiable at 0.

**Proof** (a) f(0) = \lim_{x\to 0}f(x) = \lim_{x\to 0}x\sin (1/x) = 0; (b) Notice that [f(h) - f(0)] / h = h\sin (1/h) / h = \sin(1/h) and \lim_{h\to 0}\sin(1/h) does not exist.

**Problem 8** Suppose f\colon \mathbb{R} \to \mathbb{R} define by f(x) = x^2\sin (1/x) when x\neq 0 and f(0) = 0. (a) Show that f is differentiable at 0. (b) Show that f'(x) is not continuous at 0.

**Proof** (a) f'(0) = \lim_{h\to 0} h^2\sin(1/h) / h = \lim_{h\to 0} h\sin(1/h) = 0. (b) When x\neq 0, f'(x) = 2x\sin(1/x) + x^2\cos(1/x)(-1/x^2) = 2x\sin (1/x) - \cos(1/x). Now \lim_{x\to 0}f'(x) = \lim_{x\to 0}2x\sin (1/x) - \cos(1/x) does not exist, and so f'(x) is not continuous at 0.

**Problem 9** Find the following limits: (a) \lim_{x \to 0}\frac{e^x-1}{x}; (b) \lim_{x \to 1}\frac{\sqrt{x^2+3}-2}{x^2-1}.

**Solution **(a) The limit is exactly the definition of (e^x)'(0) = 1; (b) 1/4.