**Problem 1** Consider the function f: [0, \infty)\to\mathbb{R} defined by f(x) = x^a\sin(1/x) for x >0 and f(0) = 0. (a) For which values of the parameter a the function f is differentiable at x=0? (b) For which values of a is the derivative f'(x) a continuous function?

**Proof sketch **(a) The function is differentiable at 0 if and only if \lim_{x\to 0^+}\frac{f(x) - f(0)}{x - 0} = \lim_{x\to 0^+}x^{a-1}\sin(1/x) exists. Note that \lim_{x\to 0^+}x^{a-1}\sin(1/x) = 0 when a > 1. When a = 1, we already know that \lim_{x\to 0^+}\sin(1/x) does not exist. By problem 3 in homework 4, when a < 1, because \lim_{x\to 0^+}x^{a-1}=\infty, \lim_{x\to 0^+}x^{a-1}\sin(1/x) does not exist. Therefore f is differentiable at 0 if and only if a>1, moreover, the derivative at 0 is 0.

(b) For x > 0, f'(x) = ax^{a-1}\sin(1/x) + x^a\cos(1/x)(-1/x^2) = ax^{a-1}\sin(1/x) - x^{a-2}\cos(1/x) and \lim_{x\to 0^+}f'(x) = a\lim_{x\to 0^+}x^{a-1}\sin(1/x) - \lim_{x\to 0^+}x^{a-2}\cos(1/x) = - \lim_{x\to 0^+}x^{a-2}\cos(1/x). An argument similar to the one for part (a) shows that f'(x) is continuous if and only if a > 2.

**Problem 2** Give an example of a differentiable function f\colon [0,1] \to \mathbb{R} such that x=0 is not a local minimum or a local maximum.

**Proof **By Problem 1, f(x) = x^2\sin(1/x) is differentiable on [0,1]. For every \epsilon > 0, there exists n\in\mathbb{N} (sufficiently large) such that both x_1 := 1/[(2n + 1/2)\pi] and x_2 := 1/[(2n - 1/2)\pi] are less than \epsilon. Notice that f(x_1) = x_1^2 > 0, f(x_2) = -x_2^2 < 0 and f(0) = 0. Therefore 0 is not a local maximum or a local minimum point.

**Problem 3** Find the maximum and minimum values of the function f(x) = x^5 - 5x^4 + 5x^3 + 1 on the interval [-1,2].

**Solution** Note that f'(x) = 5x^4 - 20x^3 + 15x^2 = 5x^2(x-1)(x-3) has roots 0, 1, 3 (we may ignore 3). We compute the value of the function at the end points of the interval and those roots: f(-1) = -10, f(0) = 1, f(1) = 2, f(2) = -7. Therefore the maximum value is 2 and the minimum value is -10.

**Problem 4** Use Lagrange’s mean value theorem to prove the following inequality for 0 < a \le b, \frac{b-a}{b} \le \ln \frac{b}{a} \le \frac{b-a}{a}.

**Proof** If a = b, it is clear. Hereafter we assume a < b. Rewrite the inequality as \frac{1}{b} \le \frac{\ln b - \ln a}{b - a} \le \frac{1}{a}. This inspires us to consider the function f(x) = \ln x. By the mean value theorem, there is a < c < b such that f'(c) = \frac{\ln b - \ln a}{b - a}. Notice that f'(c) = 1/c and 1/b < 1/c < 1/a.

**Problem 5** Prove that the equation x^n + px + q = 0 can have at most two distinct (real) solutions if n is even, and it can have at most three distinct (real) solutions if n is odd.

**Proof sketch **By Rolle’s theorem, if there are k distinct solutions to f(x) = 0, then there are at least k-1 distinct solutions to f'(x) = 0 (why?). Now notice that the derivative f'(x) = x^{n-1}+p has 1 solution when n is even, and it has 2 solutions when n is odd.

**Problem 6** Suppose f\colon \mathbb{R} \to \mathbb{R} satisfies f(n) = 2 for every n\in\mathbb{N} and suppose that f is differentiable and \lim_{x\to\infty} f'(x) = 0. Show that \lim_{x\to\infty} f(x) = 2.

**Proof** Take a sequence \{a_n\}_{n=1}^\infty such that \lim_{n\to\infty} a_n = \infty. By Heine’s theorem, it suffices to show that \lim_{n\to\infty} f(a_n) = 2. For every a_n, by the mean value theorem, there is [a_n]\le b_n \le a_n such that f(a_n) - f([a_n]) = (a_n - [a_n])f'(b_n). Because [a_n] is a natural number, f([a_n]) = 2. Thus |f(a_n)-2| = |a_n - [a_n]||f'(b_n)| \le |f'(b_n)|. Since b_n \ge [a_n] > a_n - 1, by Heine’s theorem, \lim_{n\to\infty}f'(b_n) = 0. By the sandwich theorem, \lim_{n\to\infty}|f(a_n)-2| = 0 and so \lim_{n\to\infty}f(a_n) = 2.

**Problem 7** Prove that for every x\in\mathbb{R} and n\in\mathbb{N} we have 1 + x +\frac{1}{2!}x^2 + \frac{1}{3!}x^3 + \dots + \frac{1}{(2n)!}x^{2n} > 0.

**Proof** Denote the left hand side of the inequality by f(x). Notice that \lim_{x\to -\infty}f(x) = \lim_{x\to \infty}f(x) = \infty. The function has minimum points. Let x_0 be a minimum point. We know that f'(x_0) = 0. However, f'(x) = 1 + x +\frac{1}{2!}x^2 + \frac{1}{3!}x^3 + \dots + \frac{1}{(2n-1)!}x^{2n-1} = f(x) - \frac{1}{(2n)!}x^{2n}. This implies that f(x_0) = f'(x_0) + \frac{1}{(2n)!}x_0^{2n} > 0. In other words, f(x) \ge f(x_0) > 0.