\DefineExercise{E4-5_WarmUp1}{
Find $\lim_{x\rightarrow 0}\frac{\cos x-1}{x^2}$.
}

\DefineExercise{E4-5_Main1}{
  \begin{enumerate}[label=(\alph*)]
  \item Give examples of functions $u(x)$ and $v(x)$ so that:
  \begin{itemize}
  \item $\lim_{x\rightarrow 2}u(x)=0$,
  \item $\lim_{x\rightarrow 2}v(x)=0$, and
  \item $\lim_{x\rightarrow 2}\frac{u(x)}{v(x)}=0$.
  \end{itemize}
\item Give examples of functions $s(x)$ and $t(x)$ so that:
  \begin{itemize}
  \item $\lim_{x\rightarrow 2}s(x)=0$,
  \item $\lim_{x\rightarrow 2}t(x)=0$, and
  \item $\lim_{x\rightarrow 2}\frac{s(x)}{t(x)}=\infty$.
  \end{itemize}
  \end{enumerate}
}

\DefineExercise{E4-5_Main2}{
Suppose $f(x)$ and $g(x)$ are unknown functions, and we want to know what $\lim_{x\rightarrow 4}\frac{f(x)}{g(x)}$ is.
  \begin{enumerate}[label=(\alph*)]
  \item Suppose you know that $\lim_{x\rightarrow 4}f(x)=3$ and $\lim_{x\rightarrow 4}g(x)=7$.  Is this enough information to figure out what $\lim_{x\rightarrow 4}\frac{f(x)}{g(x)}$ is?  If so, what is it (and how do you know)?  If not, give a convincing argument that this is not enough information.
  \item Suppose you know that $\lim_{x\rightarrow 4}f(x)=0$ and $\lim_{x\rightarrow 4}g(x)=6$.  Is this enough information to figure out what $\lim_{x\rightarrow 4}\frac{f(x)}{g(x)}$ is?  If so, what is it (and how do you know)?  If not, give a convincing argument that this is not enough information.
  \item Suppose you know that $\lim_{x\rightarrow 4}f(x)=2$ and $\lim_{x\rightarrow 4}g(x)=0$.  Is this enough information to figure out what $\lim_{x\rightarrow 4}\frac{f(x)}{g(x)}$ is?  If so, what is it (and how do you know)?  If not, give a convincing argument that this is not enough information.
  \item Suppose you know that $\lim_{x\rightarrow 4}f(x)=0$ and $\lim_{x\rightarrow 4}g(x)=0$.  Is this enough information to figure out what $\lim_{x\rightarrow 4}\frac{f(x)}{g(x)}$ is?  If so, what is it (and how do you know)?  If not, give a convincing argument that this is not enough information.
  \end{enumerate}
}

\DefineExercise{E4-5_Main3}{
  \begin{enumerate}[label=(\alph*)]
  \item What kind of indeterminate form is $\lim_{x\rightarrow 0^+}x^2\ln x$?
  \item Combine algebra with L'Hospital's rule to find $\lim_{x\rightarrow 0^+}x^2\ln x$.
\texttt{
  \begin{enumerate}[label=(\roman*)]
  \item L'Hospital's rule only works on fractions, so use the fact that $x^2=\frac{1}{\frac{1}{x^2}}$ to rewrite this as a fraction.
  \item Check that you have an indeterminate form and apply L'Hospital's rule.
  \end{enumerate}
}
  \end{enumerate}
}

\DefineExercise{E4-5_Main4}{
\begin{enumerate}[label=(\alph*)]
\item Find $\lim_{x\rightarrow \pi}(\csc x)(\ln \frac{x}{\pi})$.
\item In the first part you had a choice: you could have written it as $\displaystyle{\lim_{x\rightarrow \pi}\frac{\ln \frac{x}{\pi}}{\frac{1}{\csc x}}}$ or $\displaystyle{\lim_{x\rightarrow \pi}\frac{\csc x}{\frac{1}{\ln \frac{x}{\pi}}}}$.  Which did you choose, and why?
\end{enumerate}
}

\DefineExercise{E4-5_Main5}{
  \begin{enumerate}[label=(\alph*)]
  \item What kind of indeterminate form is $\lim_{x\rightarrow 0^+}(\csc x-\cot x)$?
  \item Combine algebra with L'Hospital's rule to find $\lim_{x\rightarrow 0^+}(\csc x-\cot x)$.
\texttt{
  \begin{enumerate}[label=(\roman*)]
  \item Write these trig functions as fractions (for instance, $\csc x=\frac{1}{\sin x}$)
  \item Put them over a common denominator.
  \item Check that you have an indeterminate form and L'Hospital's rule.
  \end{enumerate}
}
  \end{enumerate}
}

\DefineExercise{E4-5_Main6}{
Find $\lim_{x\rightarrow 1^+}(\frac{1}{x-1}-\frac{1}{\ln x})$.\\
\texttt{
You'll want to find a different way to turn this into a fraction.
}
}

\DefineExercise{E4-5_Main7}{
  \begin{enumerate}[label=(\alph*)]
  \item What kind of indeterminate form is $\lim_{x\rightarrow 0^+}x^x$?
  \item Combine algebra with L'Hospital's rule to find $\lim_{x\rightarrow 0^+}x^x$.
\texttt{
  \begin{enumerate}[label=(\roman*)]
  \item Use logarithm rules to rewrite $\lim_{x\rightarrow 0^+}x^x=e^{\ln \lim_{x\rightarrow 0^+}x^x}$
  \item Use continuity to bring $\ln$ inside the limit
  \item Use the logarithm rule to rewrite $\ln x^x=x\ln x$
  \item Now you have an indeterminate product.  Use the techniques you learned above to find this limit.
  \end{enumerate}
}
\end{enumerate}
}

\DefineExercise{E4-5_Main8}{
  \begin{enumerate}[label=(\alph*)]
  \item What kind of indeterminate form is $\lim_{x\rightarrow 0}(\cos x)^{1/x}$?
  \item Find $\lim_{x\rightarrow 0}(\cos x)^{1/x}$.
  \end{enumerate}
}

\DefineExercise{E4-5_Main9}{
  \begin{enumerate}[label=(\alph*)]
\item Explain why $0^\infty$ is \emph{not} an indeterminate form.
\item Find $\lim_{x\rightarrow \infty}(1/x)^x$.
  \end{enumerate}
}

\DefineExercise{E4-5_Main10}{
\begin{enumerate}[label=(\alph*)]
\item Explain why L'Hospital's rule doesn't help you find $\lim_{x\rightarrow 0^+}\frac{\sqrt{x}}{\sqrt{\sin x}}$.
\item Find $\lim_{x\rightarrow 0^+}\frac{\sqrt{x}}{\sqrt{\sin x}}$ another way.
\end{enumerate}
}

\DefineExercise{E4-6_Main1}{
\textit{Set up, but do not finish solving, this problem.}

We go see a movie in a theater where the screen is 16 feet tall, with the bottom elevated 9 feet off the ground.  The theater is 100 ft deep.  How far back should we sit to get the best seat (specifically, to maximize the fraction of our visual field taken up by the screen)?
\texttt{
  \begin{enumerate}[label=(\roman*)]
  \item Draw a picture first.
  \item There is a quantity we choose.  Make sure this quantity is called $x$ in your picture.
  \item What are appropriate bounds on $x$?
  \item There is a quantity we are trying to optimize.  Make sure this quantity is called $\theta$ in your picture.
  \item Write an equation relating $\theta$ to $x$.  (This step is tricky, and may require you to identify other interesting numbers in the picture.)
  \item Stop here: you'll finish this at home.
  \end{enumerate}
}
}

\DefineExercise{E4-6_Main2}{
\textit{Set up, but do not finish solving, this problem.}

A farmer wants to construct a rectangular pen next to a barn which is 60 feet long.  \emph{Part} of one side of the pen will be the barn, but that side (might) extend beyond the barn.  (That side \emph{must} be at least 60 feet long, since it includes the barn.)  Find the dimensions of the pen with the largest area that the farmer can build if 300 feet of fencing material is available.
\texttt{
  \begin{enumerate}[label=(\roman*)]
  \item Draw a picture.
  \item You should end up with three variables: one for each dimension of the fence, and one for the area.
  \item Write a \emph{constraint} equation relating the dimensions of the fence to each other.
  \item Write an equation relating the area to the dimensions of the fence.
  \item Stop here: you'll finish this at home.
  \end{enumerate}
}
}

\DefineExercise{E4-6_Main3}{
\textit{Set up, but do not finish solving, this problem.}
 
A math professor is playing fetch with his Corgi dog at the shore.  (The shore is a straight line separating the beach from the water.)  He stands on the edge of the water and throws the ball 5 meters straight into the water, perpindicular to the shoreline.  The dog is also standing on the shore, 15 m away from the professor.  The dog runs part way down the beach then jumps in the water and swims to the ball.  If the dog can run at a speed of 6 m/s and swim at a speed of 1 m/s, and the dog wants to get to the ball the fastest he can, where does he jump in the water?\footnote{This problem is adapted from an article by Professor Tim Pennings in the College Mathematics Journal 34(May):178-182, 2003.  He had a hunch that his dog was minimizing the time it took to reach the ball and so he gathered empirical evidence to support his hunch.}

We'll call the time it takes the dog to get to the ball $t$ and we'll call the distance from where the dog jumps in to where the man is standing $x$.
\texttt{
  \begin{enumerate}[label=(\roman*)]
  \item Make sure to draw a picture.
  \item Identify appropriate bounds on $x$.
  \item Express the time it takes the dog to reach the ball as a function of $x$.
  \item Stop here: you'll finish this at home.
  \end{enumerate}
}
}

\DefineExercise{E4-6_Main4}{
\textit{We'll actually solve this one all the way through.}

You have just been appointed as the top energy advisor to the king of Gondor.\footnote{This question is a bit different because it was originally written as part of a pre-hiring assessment at an environmental consulting company.  (It wasn't written by anyone affiliated with the course; the author was kind enough to share it with us.)  It's less streamlined than most of the questions we've done, but 1) by this point in the course, you're ready for that, and 2) that was part of the point of the original question, and I didn't want to take that away.}
%
% \begin{enumerate}
% \item The king proposes increasing fuel efficiency standards such that the average passenger car produced under the new standards emits half as much CO2 per kilometer as the average passenger car produced today. The standards are implemented as a sales-weighted average of all cars sold in a given year by each auto manufacturer, so in each year, the average new car will just exactly meet the standard. To soften the blow to Gondor’s auto makers, the king proposes phasing in the increased standards linearly over five years, starting next year (2015). By what percentage would this policy decrease CO2 emissions from Gondor’s passenger car fleet in 2024 relative to today?
%
% You may use the following information in your calculation:
% \begin{itemize}
% \item The lifetime of a passenger car in Gondor is exactly 14 years.
% \item Gondor’s fuel efficiency standards have not changed in the last 20 years.
% \item Gondor’s passenger car fleet is in steady state. This means exactly as many cars are sold each year as retire in that year.
% \item A passenger car’s efficiency does not degrade over time. (This means that it emits the same amount of CO2 per kilometer from the day it is put into service until the day it retires.)
% \item If the fuel economy standard would change in a given calendar year, the entire change for that year takes effect on Jan 1.
% \item The king wants you to compare emissions from the fleet on Dec 31, 2014 and Dec 31, 2024.
% \end{itemize}
%
The king wishes to devise a policy package that will reduce emissions from the industrial sector. He is willing to impose up to \$10 million of net costs on the Industrial Sector. The king is considering two policies. Each policy becomes more expensive as it becomes more stringent (as the most cost-effective opportunities to satisfy each policy are exhausted and industries are forced to implement more costly measures).   (CO$_2$e means ``CO$_2$-equivalent'', and is a measurement of overall reduction in greenhouse gasses.  Reducing a ton of CO$_2$ means one ton of CO$_2$e reduction, but reducing a ton of another gas can be more or less than one ton of CO$_2$e, depending on the gas.)

\begin{enumerate}
%\item Industries may improve the energy efficiency of their equipment. Given the current mix of energy sources used by Gondor’s industry, the marginal cost per ton CO$_2$e abated is: negative \$20 plus (0.001 times the number of tons abated).
%\item Industries may capture or flare methane currently leaking to the atmosphere. The marginal cost per ton CO$_2$e abated is: negative \$30 plus (0.0005 times the number of tons abated). 
%\item Industries may substitute other chemicals for SF$_6$. The marginal cost per ton CO$_2$e abated is: positive \$10 plus (0.0001 times the number of tons abated).
%\item Industries may improve the energy efficiency of their equipment. Given the current mix of energy sources used by Gondor's industry, cost to abate $x$ tons of CO$_2$e in this way is $\$(-20x+\frac{1}{200}x^2)$.
\item Industries may capture or flare methane currently leaking to the atmosphere. The cost to abate $x$ tons of CO$_2$e in this way is $\$(-30x+\frac{1}{4000}x^2)$.
\item Industries may substitute other chemicals for SF$_6$. The cost to abate $x$ tons of CO$_2$e in this way is $\$(10x+\frac{1}{20000}x^2)$.
\footnote{From the author: ``Methane and especially SF$_6$ are powerful greenhouse gases.  This background information does not affect one's ability to solve the math problem, but it explains why these two policies are able to achieve CO$_2$ abatement, despite the fact that they deal with non-CO$_2$ gases.''}
\end{enumerate}

%Here are two clarifications that you may find helpful:
%\begin{itemize}
% \item Marginal cost per ton CO$_2$e abated means the cost for that particular ton of CO$_2$e abated.
% \item When a policy has a negative marginal cost for a given ton of CO$_2$e, this means that industry is saving money by abating that particular ton of CO$_2$e via that policy.
% \end{itemize}

How many tons should industry be required to abate under each of the king's policies in order to achieve the maximum total amount of abatement without exceeding the king's \$10 million net cost limit? (Gondor's industry is sufficiently large that industry size is not a constraint on the amount of emissions that may be abated under any of these policies.)
}

\DefineExercise{E4-6_Main5}{
Some follow-up on the question about Gondor.

\begin{enumerate}[label=(\alph*)]
\item What is the \emph{marginal cost} of abating one more ton of CO$_2$ using the first policy when $x$ tons have already been abated with that policy?
\item What is the \emph{marginal cost} of abating one more ton of CO$_2$ using the second policy when $x$ tons have already been abated with that policy?
\item At the optimal solution you found, what are the marginal costs of each of the two policies?
\item There should be something interesting about your answer to the previous part.  What is it, and why does that have to be the case?
\item The original problem actually had \emph{three} policies, and was stated in terms of marginal cost:
\begin{enumerate}[label=(\alph*)]
\item Industries may capture or flare methane currently leaking to the atmosphere. The marginal cost per ton CO$_2$e abated is: negative \$30 plus (0.0005 times the number of tons abated). 
\item Industries may substitute other chemicals for SF$_6$. The marginal cost per ton CO$_2$e abated is: positive \$10 plus (0.0001 times the number of tons abated).
\item Industries may improve the energy efficiency of their equipment. Given the current mix of energy sources used by Gondor's industry, the marginal cost per ton CO$_2$e abated is: negative \$20 plus (0.001 times the number of tons abated).
\end{enumerate}
Note that the total cost of abating $x$ tons of CO$_2$e using the third policy is $\$(-20x+\frac{1}{2000}x^2)$.

  If all three policies are available, how many tons should industry be be required to abate under each of the king's policies in order to achieve the maximum total amount of abatement without exceeding the king's \$10 million net cost limit?  (You'll need to use your observation about the relationships between the marginal costs at the optimum.)
\end{enumerate}
}