Define the function \begin{equation*} g(x) = \begin{cases} \mathrm{e}^{x^{-2}} &\text{if } x \gt 0 \\ 0 &\text{if } x \leq 0 \end{cases}\,, \end{equation*} and notice that $g$ is infinitely differentiable, but has no Taylor series centered at $x=0$ since $g^{(n)}(0) = 0$ for all $n \gt 0$. Furthermore $g$ is monotonically increasing, and $\lim_{x \to -\infty} g = 0$ and $\lim_{x \to \infty} g = 1$.

    1. Using the function $g$, define an infinitely differentiable function $p(x)$ such that $p(x) \gt 0$ for $x \in (0,1)$ but $p(x) = 0$ otherwise.
    2. Using the function $g$, define an infinitely differentiable function $q(x)$ such that $q(x) = 0$ for $x \leq 0$, is strictly increasing for $x \in [0,1]$, and $q(x) = 1$ for $x \geq 1$. (This one is called a smooth step function and is very important in differential geometry and in computer programming.)
  1. Verify Leibniz’s famous identity \begin{equation*} \sqrt{6} = \sqrt{1+\sqrt{-3}} + \sqrt{1-\sqrt{-3}} \,. \end{equation*}
  2. Using the Taylor series for $\arctan(x)$ one can prove that \begin{equation*} \frac{\pi}{4} = 1 - \frac13 + \frac15 - \frac17 + \dotsb \,. \end{equation*} Use this to prove that \begin{equation*} \frac{\pi}{8} = \frac{1}{1\cdot 3} +\frac{1}{5\cdot 7} +\frac{1}{9\cdot 11} + \dotsb \,. \end{equation*}