\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{enumerate}
\usepackage{tikz}
\usepackage{circuitikz}
\usepackage{mathrsfs}

\begin{document}
\flushleft\underline{Homework 7 --- MATH 4590 Spring 2018} \\

\begin{enumerate}[1.]
\item Assume that $f \colon \mathbb{R} \rightarrow \mathbb{R}$ satisfies $|f(t)-f(x)| \leq |t-x|^2$ for all $t, x \in \mathbb{R}$. Prove that $f$ is a constant function. 

\item \begin{enumerate}[(a)]
\item Draw the graph of a continuous function defined on $[0,1]$ that is differentiable on $(0,1)$, but not at the endpoints. \\
(\textit{hint: take inspiration from the graph of the following function, which is continuous on $\mathbb{R}$ but not differentiable at zero: $f(x) = \left\{ \begin{array}{ll} 0, & \quad x=0 \\ x\sin\left( \dfrac{1}{x} \right), & \quad x \neq 0 
\end{array} \right\}$})
\item Can you find a formula for such a function? (not necessarily the one you drew)
\item Does the Mean Value Theorem apply to such a function? Why or why not?
\end{enumerate}
\item Assume that the functions $f$ and $g$ are smooth (i.e. infinitely differentiable). Prove the Leibniz product rule: for any $r \in \{1,2,3,\ldots\}$,
$$\left( f \cdot g \right)^r(x) = \displaystyle\sum_{k=0}^r {r \choose k} f^{(k)}(x) g^{r-k}(x),$$
where $\displaystyle{n \choose k} = \dfrac{n!}{k!(n-k)!}$. \\
(\textit{hint: use induction})

\item Recall the $r$th order Taylor polynomial of a $r$-times differentiable function $f(x)$ is given by
$$P(h)=\displaystyle\sum_{k=0}^r \dfrac{f^{(k)}(x)}{k!} h^k.$$ 
Also recall that the remainder $R(h)$ is given by 
$$R(h)=f(x+h)-P(h),$$
and (assuing $f$ is $r+1$-times differentiable) that the Taylor Approximation Theorem (part c) says that there is some $\theta \in (0,h)$ so that 
$$R(h)=\dfrac{f^{(r+1)}(\theta)}{(r+1)!} h^{r+1}.$$

We will investigate the following question: what is the max possible error that a 5th order Taylor polynomial for the function $f(x)=\sin(x)$ centered at zero may have  in approximating $\sin \left( \dfrac{1}{2} \right)$?
\begin{enumerate}
\item Find the $5$th order Taylor polynomial of $f(x)=\sin(x)$.
\item Set $x=0$ in the resulting formula from above (this ``centers" the Taylor polynomial near $x$).
\item Use the Taylor Approximation Theorem (part c) to write a formula (in terms of $\theta$) for $R \left( \dfrac{1}{2} \right)$ (with $x=0$). 
\item Find a number $\xi \in \mathbb{R}$ such that $\left| R \left( \dfrac{1}{2} \right) \right| < \xi$, where $\xi$ does not depend on $\theta$ (with $x=0$).
\end{enumerate}

\item Define $f(x)= \left\{ \begin{array}{ll}
x^2, & \quad x<0 \\
x+x^2, & \quad x \geq 0.
\end{array} \right.$ \\
Differentiation gives $f''(x)=2$. This is bogus. Why? (\textit{hint: draw a picture of $f$ and its derivative})
\end{enumerate}

\end{document}