\documentclass[11pt]{article}
\def\Z{\mathbb{Z}}
\def\Q{\mathbb{Q}}
\usepackage{latexsym,amsmath,amssymb,float,graphicx,subfig}
\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{0in}
\setlength{\textheight}{8.6in}
\setlength{\topmargin}{-0.6in}
\newtheorem{theorem}{Theorem}
\begin{document}
\centerline{MATH 135 -- Calculus 1}
\centerline{L'Hopital's Rule}
\centerline{November 18, 2019}
\vskip 10pt
\noindent
{\it Background}
\vskip 10pt
\noindent
Recall that we have defined the derivative of a function at x by 
using the limit:
\[
f'(x) = \lim_{h\to 0} \frac{f(x+h) - f(x)}{h}.
\]
One application of derivatives ``turns this around'' and \emph{uses
derivatives to compute limits of indeterminate forms $0/0$ or $\infty/\infty$ or 
other limits that can be put into those forms}.  The precise statement is a bit 
complicated, but this is really a reflection of the \emph{power} of the 
result:

\begin{theorem}[L'Hopital's Rule]  Let $f$ and $g$ be differentiable
on an interval containing $a$ and suppose that $f(a) = g(a) = 0$.  
Assume that $g'(x) \ne 0$ on an interval containing $a$, except
possibly at $x = a$.  Then 
\begin{equation}
\label{LHop}
\lim_{x\to a} \frac{f(x)}{g(x)} = \lim_{x \to a} \frac{f'(x)}{g'(x)}
\end{equation}
if the limit on the right exists, or is equal to $\pm \infty$.  
\end{theorem}

The same statement applies if $\lim_{x\to a} f(x) = \pm \infty$
and $\lim_{x\to a} g(x) = \pm\infty$.  The statement also applies
for one-sided limits.  The idea that makes this work is that 
for $x$ close to $a$ (which is what matters in taking the limit)
$y = f(x)$ is close to the tangent line $y = f(a) + f'(a)(x - a) = f'(a)(x-a)$
and $y = g(x)$ is close to the tangent line $y = g(a) + g'(a)(x - a) = g'(a)(x - a)$.
So 
\[
\frac{f(x)}{g(x)} \doteq \frac{f'(a)(x - a)}{g'(a)(x - a)} = \frac{f'(a)}{g'(a)}.
\]
(The first approximate equality is not an exact equality, of course.  But 
the difference between $f(x)$ and $f'(a)(x - a)$ goes to zero ``really fast''
as $x\to a$ and $\frac{f(x)}{g(x)}$ goes to $\frac{f'(a)}{g'(a)}$ in the 
limit as $x \to a$.)

{\it Important Note:}  Note that the rightside of \ref{LHop} is the quotient
of the derivatives.  This is \emph{different} from the derivative of the 
quotient $f(x)/g(x)$.  We would use the quotient rule for that, and the result is not
just $f'(x)/g'(x)$. 

\vskip 10pt
\noindent
{\it Some examples}
\vskip 10pt
\begin{enumerate}
\item[1.]  Consider $\lim_{x\to 0} \frac{e^x - 1}{\sin(x)}$.  This is a $0/0$ indeterminate form
since $\lim_{x\to 0} e^x - 1 = 0 = \lim_{x\to 0} \sin(x)$.  So we can apply L'Hopital:
\[
\lim_{x\to 0} \frac{e^x - 1}{\sin(x)} = \lim_{x \to 0} \frac{e^x}{\cos(x)} = 1.
\]
\item[2.]  Consider $\lim_{x\to\infty} \frac{\ln(x)}{x^{1/2}}$.  This is an $\infty/\infty$ indeterminate
form.  L'Hopital's Rule also applies to this sort of limit, and we get
\begin{eqnarray*}
\lim_{x\to\infty} \frac{\ln(x)}{x^{1/2}} &=& \lim_{x\to\infty} \frac{\frac{1}{x}}{\frac{1}{2 x^{1/2}}}\\
&=& \lim_{x\to\infty} \frac{2}{x^{1/2}}\\
&=& 0.
\end{eqnarray*}
\item[3.]  (Sometimes we might need to apply L'Hopital more than once.  That is OK!) For instance, 
consider
\[
\lim_{x\to 0} \frac{\sin(x) - x}{x^3},
\]
which is $0/0$ indeterminate.  Applying L'Hopital twice, we get:
\begin{eqnarray*}
\lim_{x\to 0} \frac{\sin(x) - x}{x^3} &=& \lim_{x\to 0} \frac{\cos(x) - 1}{3x^2} \quad \text{still $0/0$!}\\
&=& \lim_{x\to 0} \frac{-\sin(x)}{6x}\\
&=& \frac{-1}{6}.
\end{eqnarray*}
The last equation comes because of the trig limit we discussed earlier: $\lim_{x\to 0} \frac{\sin(x)}{x} = 1$.  
\item[4.]  Some other indeterminate forms such as $0^0$ or $1^\infty$ can be evaluated
by taking logarithms first, using L'Hopital, then exponentiating the result.  For instance, consider
\[
\lim_{x\to 0} \left(1 + x\right)^{1/x},
\]
a $1^\infty$ form.  Taking logs to start, we have
\begin{eqnarray*}
\lim_{x\to 0} \ln\left( \left(1 + x\right)^{1/x}\right) &=& \lim_{x\to 0} \frac{\ln(1 + x)}{x}\ \text{(a $0/0$ form)}\\
&=& \lim_{x \to 0} \frac{1}{x+1}\\
&=& 1.
\end{eqnarray*}
Since we took the natural logarithm to start, we need to exponentiate to get the final
result: 
\[
\lim_{x\to 0} \left(1 + x\right)^{1/x} = e^1 = e.
\]
Note:  Some calculus books even take this limit as the definition of the number $e$.  
\end{enumerate}
\vskip 10pt
\noindent
{\it Practice Problems}
\vskip 10pt
\begin{enumerate}
\item[1.] $\displaystyle \lim_{x\to \infty} \frac{x}{e^x}$
\item[2.] $\displaystyle \lim_{x \to 2} \frac{x^3 - 5x^2 + 7x - 4}{x^3 - x^2 - 8x + 12}$
\item[3.] $\displaystyle \lim_{x \to 0} \frac{\tan(x)\sin(x)}{x^2}$
\item[4.] $\displaystyle \lim_{x \to 0} (\cos(x))^{3/x^2}$
(Hint:  Take logarithms first.)
\end{enumerate}
\end{document}
 
