\documentclass[12pt]{article}
\usepackage{amsmath,amsthm,amssymb,fancyhdr,graphicx,multicol}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\theoremstyle{definition}
\newtheorem{problem}{Problem}
\newtheorem{remark}{Remark}
\newtheorem{definition}{Definition}
\newcommand{\bp}{\begin{problem}}
\newcommand{\ep}{\end{problem}}

\newtheorem*{answer}{Answer}
\newtheorem*{lemma*}{Lemma}
\newtheorem*{theorem*}{Theorem}
\newcommand{\ba}{\begin{answer}}
\newcommand{\ea}{\end{answer}}

\newcommand{\ds}{\displaystyle}
\newcommand{\ben}{\renewcommand{\theenumi}{\alph{enumi}}\renewcommand{\labelenumi}{(\theenumi)}\begin{enumerate}}
\newcommand{\een}{\end{enumerate}}

\newcommand{\Z}{\mathbb{Z}} 
\newcommand{\N}{\mathbb{N}} 
\newcommand{\R}{\mathbb{R}} 

\fancyhead[L]{\Large \textbf{Math 158}}
\fancyhead[R]{\large \textbf{Limits and applications of the Integral}}

\begin{document}
\pagestyle{fancy}
\fancyfoot[R,L,C]{}

\section*{Limits}
\subsection*{L'H\^opital's rule}

\begin{theorem}[L'H\^opital's Rule, $\frac{0}{0}$ form, a simple version]
Suppose that $$\lim_{x \to c}f(x)=0 \text{ and }\lim_{x \to c}g(x)=0,$$ that $f$
and $g$ are differentiable at $c$, and that $g'(c)\neq 0$.  Then,
$$\lim_{x \to c} \frac{f(x)}{g(x)}=\frac{f'(c)}{g'(c)}.$$
\end{theorem}
\begin{proof}
First note that since $f$ and $g$ are differentiable at $c$, they are
continuous at $c$.  This, together with the hypothesis that 
$\ds \lim_{x \to c}f(x)=0 \text{ and }\lim_{x \to c}g(x)=0$, imply that
$f(c)=0$ and $g(c)=0.$  Now,
$$\frac{f'(c)}{g'(c)}=\frac{ \lim_{x \to c} \frac{f(x)-f(c)}{x-c}} 
{ \lim_{x \to c} \frac{g(x)-g(c)}{x-c}} = \lim_{x \to
  c}\frac{f(x)-f(c)}{g(x)-g(c)}=\lim_{x \to c}\frac{f(x)}{g(x)}.$$  
\end{proof}

Now, suppose in addition to the hypotheses above,
 that $f'$ and $g'$ are defined and continuous 
in a neighborhood of $c$.  Then, we have $\frac{f'(c)}{g'(c)}=\lim_{x
  \to c}\frac{f'(x)}{g'(x)}$ and we can rewrite the conclusion of the
theorem above as  
$$\lim_{x \to c} \frac{f(x)}{g(x)}=\lim_{x \to c}\frac{f'(x)}{g'(x)}.$$
However, one can say more.  Even if $\frac{f'(c)}{g'(c)}$ does not
exist\footnote{There are several reasons that $\frac{f'(c)}{g'(c)}$
  might not exist: $f'(c)$ might not exist, $g'(c)$ might not exist,
or $g'(c)$ might equal zero.} one can still conclude
that $$\lim_{x \to c} \frac{f(x)}{g(x)}=\lim_{x \to
  c}\frac{f'(x)}{g'(x)}$$ \emph{provided the right hand side exists}.
We summarize:
\begin{theorem}[L'H\^opital's Rule, $\frac{0}{0}$ form, strong version]
Suppose that $$\lim_{x \to c}f(x)=0 \text{ and }\lim_{x \to
  c}g(x)=0$$ 
and suppose that $\ds \lim_{x \to
  c}\frac{f'(x)}{g'(x)}$ exists (or equals $\pm \infty$), then
$$\lim_{x \to c} \frac{f(x)}{g(x)}=\lim_{x \to c}\frac{f'(x)}{g'(x)}.$$
\end{theorem}
%
\begin{proof}We give a proof in the case that $\ds \lim_{x \to
  c}\frac{f'(x)}{g'(x)}$ exists and is finite.
Note that we may set $f(c)=0$ and $g(c)=0$.  Then, for $x \neq c$, 
$f$ and $g$ are continuous on the interval $[c,x]$ (or the interval
$[x,c]$, depending on whether $x>c$ or $x<c$), and differentiable on
the interval $(c,x)$ (or the interval $(x,c)$).  
Therefore, we may apply Caucy's mean value
theorem to obtain a number $d$, between $x$ and $c$ with
$$\frac{f'(d)}{g'(d)}=\frac{f(x)-f(c)}{g(x)-g(c)}=\frac{f(x)}{g(x)}.$$ 
Since as $x \to c$, we have $d \to c$, we conclude that 
\begin{equation*}
\lim_{x \to c}\frac{f(x)}{g(x)}
=\lim_{d \to
  c} \frac{f'(d)}{g'(d)}
=\lim_{x \to
  c} \frac{f'(x)}{g'(x)}.
\end{equation*}
In the last equality, we have just changed the variable $d$ to the
variable $x$.
\end{proof}


% \bp As an exercise, give a proof in the case that $\ds\lim_{x \to
%   c}\frac{f'(x)}{g'(x)}=\infty.$
% \ep

Now, we can use this $\frac{0}{0}$ form of L'H\^opital's rule to
get another version:
\begin{theorem}[L'H\^opital's Rule, $\frac{\infty}{\infty}$ form] 
Suppose that $$\lim_{x \to c}f(x)=\pm \infty \text{ and }\lim_{x \to
  c}g(x)=\pm \infty$$ 
and suppose that $\ds \lim_{x \to
  c}\frac{f'(x)}{g'(x)}$ exists (or is $\pm \infty$), then
$$\lim_{x \to c} \frac{f(x)}{g(x)}=\frac{f'(c)}{g'(c)}.$$
\end{theorem}

\begin{proof}
We only provide a proof under the special assumption that 
$\ds \lim_{x \to c} \frac{f(x)}{g(x)}$ exists and is nonzero, call it
$L$,
and that  $\ds \lim_{x \to c} \frac{f'(x)}{g'(x)}=M$ is finite.

Consider $L=\ds \lim_{x \to c}\frac{f(x)}{g(x)}= \lim_{x
    \to c}\frac{\frac{1}{g(x)}}{\frac{1}{f(x)}}.$  Since $\ds\lim_{x \to
    c}\frac{1}{g(x)}=0$ and $\ds\lim_{x \to
    c}\frac{1}{f(x)}=0$; and $$\lim_{x
    \to
    c}\frac{\frac{d}{dx}\frac{1}{g(x)}}{\frac{d}{dx}\frac{1}{f(x)}}=
\lim_{x
    \to
    c}\frac{\frac{g'(x)}{(g(x))^2}}{\frac{f'(x)}{(f(x))^2}}=
=\lim_{x \to c}\frac{(g(x))^2}{(f(x))^2}\frac{f'(x)}{g'(x)}=\frac{M}{L^2}.$$
Therefore, by the $\frac{0}{0}$ form
of L'H\^opital's rule, we can conclude that 
$$L=\frac{M}{L^2}\Rightarrow L=M.
$$
\end{proof}

There are many more versions of L'H\^opital's rule.  There are
versions where $x\to c$ is replaced with $x \to c^-$, $x\to
c^+$, $x \to \infty$, or $x\to -\infty$. 
The proofs above all work for the one sided versions, but you need to
modify the argument for the $x \to \pm\infty$ versions.   % As an exercise, 
% give a proof of the  following
% \begin{theorem}
% Suppose that  $\ds\lim_{x \to \infty}f(x)=0 \text{ and }\lim_{x \to
%   \infty}g(x)=0$
% and suppose that $\ds \lim_{x \to
%   \infty}\frac{f'(x)}{g'(x)}$ exists, then
% $\ds \lim_{x \to \infty} \frac{f(x)}{g(x)}=\lim_{x \to
%   \infty}\frac{f'(x)}{g'(x)}.$
% \end{theorem}
% \ep

\bp L'H\^opital's rule \emph{does not apply} without the assumption that $\ds \lim_{x \to
  \infty}\frac{f'(x)}{g'(x)}$ exists in either the finite or infinite
sense.  Give an example where $\ds \lim_{x \to c} f(x)=0$, $\ds
\lim_{x \to c} g(x)=0$, $\ds \lim_{x \to
  \infty}\frac{f(x)}{g(x)}$ exists and is finite and where $\ds \lim_{x \to
  \infty}\frac{f'(x)}{g'(x)}$ does not exist.  Give another example
where $\ds \lim_{x \to c} f(x)=\pm \infty$, $\ds
\lim_{x \to c} g(x)=\pm \infty$, $\ds \lim_{x \to
  \infty}\frac{f(x)}{g(x)}$ exists and is finite and where $\ds \lim_{x \to
  \infty}\frac{f'(x)}{g'(x)}$ does not exist.
\ep

% \bp Somewhere (where?) we use the assumption that if $\lim_{x \to c}
% f(x)=\pm \infty$, then $\lim_{x \to c}\frac{1}{f(x)}=0.$  Give a
% rigorous proof of this fact.
% \ep

% \bp True or False:  If $\lim_{x \to c} f(x)=0$, then $\lim_{x \to c}
% \frac{1}{f(x)}=\infty$.  Support your answer with a proof or
% counterexample.
% \ep

\bp The squeeze theorem will tell you that $$\lim_{x
  \to 0}x \sin\left(\frac{1}{x}\right)=0.$$  So, there must exist a 
number $\delta>0$ so that if $0<|x|<\delta$ then 
$$\left|  x \sin\left(\frac{1}{x}  \right) \right |<\frac{1}{1000}.$$  One
    student, doing a few calculations on a calculator, noticed that
    $\sin\left(\frac{1}{0.106}\right)=-0.00918417$ and answered that
    $\delta=.106$ works.  Is he correct?
\ep


\bp State and prove Cauchy's mean value theorem
\ep


\bp True or false.  If true, give a rigorous proof using the
definition of limits.  If false, supply an example showing the
statement is false:
\ben
\item If $\ds \lim_{x \to c} f(x)=0$ then $\ds \lim_{x \to c}\frac{1}{f(x)}=\infty$.
\item If $\ds \lim_{x \to c}f(x)=\infty$ then $\ds \lim_{x \to c}\frac{1}{f(x)}=0.$
\een
\ep

\bp Give an example of two functions $f$ and $g$ satisfying 
\ben
\item $\ds \lim_{x \to \infty} f(x)=\infty$ and $\ds \lim_{x \to \infty}
  f(x)=\infty$,
\item $\ds \lim_{x \to \infty} \frac{f(x)}{g(x)}$ exists and is finite, and
\item $\ds \lim_{x \to \infty} \frac{f'(x)}{g'(x)}$ does not exist.
\een
\ep

\bp Give an example of two functions $f$ and $g$ (or prove that no such example exists)
\ben
\item with $ \lim_{x \to \infty}
  f(x)=\lim_{x \to \infty}  f(x)=\infty$, 
  $ \lim_{x \to \infty} \frac{f(x)}{g(x)}$ exists and is finite, and
  $\lim_{x \to \infty} \frac{f'(x)}{g'(x)}$ does not exist.
\item where neither $\lim_{x\to
  c}f(x)$ nor $\lim_{x\to
  c}f(x)$ exist and $\lim_{x\to c}f(x)+g(x)$ exists and is finite.
\item where neither $\lim_{x\to
  c}f(x)$ nor $\lim_{x\to
  c}f(x)$ exist and $\lim_{x\to c}f(x)g(x)$ exists and is finite.
\item for which $\lim_{x\to
  c}f(x)$ does not exist, $\lim_{x\to
  c}f(x)$ exists and is finite and $\lim_{x\to c}f(x)+g(x)$ exists and is finite.
\item or which $\lim_{x\to
  c}f(x)$ does not exist, $\lim_{x\to
  c}f(x)$ exists and is finite and $\lim_{x\to c}f(x)g(x)$ exists and is finite.
\een
\ep

\bp Compute 
\begin{multicols}{2}
\ben
\item $\ds \lim_{x \to 0}\frac{\exp(x)-1}{x}$
\item $\ds \lim_{x \to 0}\frac{\exp(x)-1-x}{x^2}$
\item $\ds \lim_{x \to 0}\frac{\log(1+x)}{x}$
\item $\ds \lim_{x \to 0}\frac{\log(1+x)-x}{x^2}$
\item $\ds \lim_{x \to 0}\frac{\cos(x)-1}{x}$
\item $\ds \lim_{x \to 0}\frac{\cos(x)-1}{x^2}$
\item $\ds \lim_{x \to 0}\frac{\sin(x)}{x}$
\item $\ds \lim_{x \to 0}\frac{\sin(x)-x}{x^2}$
\item $\ds \lim_{x \to 0}\frac{\sin(x)-x}{x^3}$
\item $\ds \lim_{x \to 0}\frac{\cosh(x)-1}{x}$
\item $\ds \lim_{x \to 0}\frac{\cosh(x)-1}{x^2}$
\item $\ds \lim_{x \to 0}\frac{\sinh(x)}{x}$
\item $\ds \lim_{x \to 0}\frac{\sinh(x)-x}{x^2}$
\item $\ds \lim_{x \to 0}\frac{\sinh(x)-x}{x^3}$
\item $\ds \lim_{x \to 0}\frac{\arcsin(x)}{x}$
\item $\ds \lim_{x \to 0}\frac{\arcsin(x)-x}{x^2}$
\item $\ds \lim_{x \to 0}\frac{\arcsin(x)-x}{x^3}$
\item $\ds \lim_{x \to 0}\frac{\arctan(x)}{x}$
\item $\ds \lim_{x \to 0}\frac{\arctan(x)-x}{x^2}$
\item $\ds \lim_{x \to 0}\frac{\arctan(x)-x}{x^3}$
\een
\end{multicols}
\ep


\bp If $S$ is a set and $R\subseteq S \times S$, one may call $R$ a
relation on the set $S$.  One says that $a$ is related to $b$, and
writes $aRb$ if the
pair $(a,b)\in R$.  If $R$ is a relation on $A$ we say that
\begin{itemize}
\item $R$ is reflexive if and only if for all $a\in S$, $aRa$.
\item $R$ is symmetric if and only if for all $a,b \in S$, 
$aRb \Rightarrow bRa$.
\item $R$ is transitive if and only if  for all $a,b,c \in S$,
 $aRb \text{ and } bRc \Rightarrow aRc$.
\item $R$ is said to satisfy the trichotomy law if and only if for all
  $a,b \in S$ exactly one of the following hold: $aRb$, $bRa$, or
  $a=b.$
\end{itemize}
For example, $<$ defines a relation on the real numbers that is
transitive, and satisfies the trichotomy law, but $<$
is neither reflexive nor symmetric.  The relation 
$<$ is not reflexive since, for example, it is not true that $2<2.$
The relation $<$ is not symmetric since, for example, $1<8$ but it is
not true that $8<1.$

For another example, consider the following relation on the set $\Z$:
$$a|b \text{ if and only if }b \text{ is divisible by }a.$$
One can check that this relation is reflexive, symmetric, and
transitive, but does not satisfy the trichotomy law.

Now, for your problem:
consider a new relation $\ll$ on the set of functions.  Let us
define $$f\ll g \text{ if and only if }\ds \lim_{x \to
  \infty}\frac{f(x)}{g(x)}=0.$$  
\ben
\item Which apply to $\ll$: reflexive, symmetric, transitive,
  trichotomy law ?
\item Label the vertices in the picture below according to the rule: 
there should be a directed path from $f$ to $g$ whenever $f\ll g$.
\een

\twocolumn

    \includegraphics{limitgraph.pdf}
\newpage
%\begin{minipage}{2in}
Here are the labels:
\begin{itemize}
\item $\ds \exp(x)$ 
\item $\ds \log(x)$ 
\item $\ds \log(\log(x)$
\item $\ds x$
\item $\ds (\exp(x))^\frac{1}{50}$
\item $\ds (\exp(x))^{50}$
\item $\ds \exp(x^\frac{1}{50})$
\item $\ds \exp(x^{50})$
\item $\ds x^{50}$
\item $\ds x^{\frac{1}{50}}$
\item $\ds 50x$
\item $\ds \exp(50x)$
\item $\ds \log(e^{50x})$ 
\item $\ds \log(x^{50})$ 
\item $\ds \log(50x)$ 
\item $\ds \log\left (x^\frac{1}{50}\right)$
\item $\ds \left(\log(x)\right)^\frac{1}{50}$
\end{itemize}
%\end{minipage}

\onecolumn

\ep

\section*{Volume and arclength}

\bp Review the computations of the $n$ dimensional volume of an $n$ 
dimensional sphere of radius $R$ for $n=2,3,4$. 
\ben
\item  Go on and find the volumes of $5$, $6$, and $7$ dimensional
 spheres of radius $R$.  
\item Make a conjecture about the formula for the $n$ dimensional
  volume of an $n$ dimensional sphere. 
\item Try to prove your conjecture.
\een
\ep

\bp[Challenge] Review the derivation for the arclength of a curve as an
integral and compute the
circumference of the unit circle.
\ben
\item If we redefine the notion of distance between two points in the
  plane, we get a different formula for the arclength of a curve.  For
  example, the ``$d_n$
  distance'' between two points $P=(x_1, y_1)$ and
  $Q=(x_2, y_2)$ is defined to be
$$d_n(P,Q)=\left(  |x_2-x_1|^n+ |y_2-y_1|^n  \right)^\frac{1}{n}
\text{ for }n\geq 1.$$
In this terminology, the ``ordinary'' distance is the $d_2$ distance.
Give a formula for the arclength of a curve as an integral 
using the $d_n$ distance.
\item The unit circle $C$ is defined to be the set of all points in
  $\mathbb{R}^2$ whose distance from the origin $O$ is one:
\begin{align*}
C=\{P\in \mathbb{R}^2 :d(P,O)=1\}&=\left \{(x,y)\in \mathbb{R}^2:
\sqrt{x^2+y^2}=1\right \}\\
&=\{(x,y)\in \mathbb{R}^2: x^2+y^2=1\}.
\end{align*}
Define $C_n$ to be the set of all points in $\mathbb{R}^2$ whose $d_n$
distance from the origin $O$ is one:
\begin{align*}
C_n=\{P\in \mathbb{R}^2 :d_n(P,O)=1\}&=\left \{(x,y)\in \mathbb{R}^2:
\left(  |x|^n+ |y|^n  \right)^\frac{1}{n}=1\right\}\\
&=\{(x,y)\in \mathbb{R}^2: x^n+y^n=1\}.
\end{align*}
Sketch pictures of $C_n$ for several $n$.  Here is a picture of
$C_{\frac{3}{2}}$, $C_2$ (the ordinary circle), and $C_5$:
 \begin{center}
    \includegraphics[scale=0.25]{circlea.pdf}
  \includegraphics[scale=0.25]{circleb.pdf}
  \includegraphics[scale=0.25]{circlec.pdf}
  \end{center}
\item Now define $\pi(n)$ to be arclength of the upper half of the
  unit circle $C_n$.  This gives a different universal constant for
  each $n$.  Do some computations, say compute $\pi_1,
  \pi_\frac{3}{2}, \pi_3, \pi_{100}$, and $\lim_{n\to \infty} \pi_n$,
  to get some idea of the range of values of $\pi$.
\een
\ep



\end{document}

