\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{enumerate}
\usepackage{ifthen}
\usepackage{graphicx}

\usepackage{ulem} % for strikethrough "\sout"
\usepackage{color}
\usepackage{amssymb}
\usepackage{hyperref}
\newcommand{\ALPHA}{\checkmark} 

\setlength{\unitlength}{0.1in}

\setlength{\oddsidemargin}{-0.50in}
\setlength{\evensidemargin}{-0.50in}
\setlength{\topmargin}{-0.50in}
\setlength{\headheight}{0.0in}
\setlength{\headsep}{0.0in}
\setlength{\topskip}{0.0in}
\setlength{\textheight}{9.5in}
\setlength{\textwidth}{7.5in}

\newcommand{\comp}{ \,{\scriptstyle \stackrel{\circ}{}}\, } 
\newcommand{\nullset}{\mathrm{O}\!\!\!\!\big/\,}
\newcommand{\divides}{\,\Big|\,}
\newcommand{\varspace}[2]{\mbox{\parbox[c][#1]{#2}{\hfill}}}
\newcommand{\myspace}{\varspace{0.35in}{0.35in}}

\newcommand{\force}{{$\mbox{\;}$}}

\begin{document}

%\pagestyle{empty}

\noindent
{\bf Math 1030 Workshop \#6} \hfill
{\bf Name: \underline{\Large\sc\color{red}\quad Answer Key \quad}}

\vspace{0.05in}

\noindent
{\Large \bf DUE: Monday, August 1${}^{\mbox{st}}$} \hfill Please turn in a paper copy and {\bf SHOW YOUR WORK!}

\vspace{0.05in}

\begin{enumerate}
   \item  Slimy Stan sells bootleg Koalas smuggled in from Australia (don't ask how it's done). Stan has collected the following Koala demand and price data:

\vspace{-0.05in}

\begin{enumerate}[(a)]
   \item Compute elasticity (round to 3 decimals places):

\begin{tabular}{|c||c|c|c|c|} \hline
\varspace{0.2in}{0.01in} Koalas Sold & 10   & 75  & 150 &  300 \\ \hline
\varspace{0.2in}{0.01in} Price  & \$3,000 & \$1,500 & \$1,000 & \$425 \\ \hline
\end{tabular}  

\vspace{-0.025in}
    
\begin{tabular}{|c|c|c|c|c|} \hline
\varspace{0.2in}{0.125in} Elasticity \varspace{0.2in}{0.35in} & 2.294 & \, 1.667 \, & 0.826 & \!\!{$\scriptscriptstyle\times$}\! \\ \hline
\end{tabular}

\vspace{0.1in}

In Excel\dots
For example, I used the formula \verb|=-((C5-B5)*(B6+C6))/((C6-B6)*(B5+C5))| to compute the elasticity of quantities in \verb|B5| and \verb|C5| and prices in \verb|B6| and \verb|C6|. After computing the elasticity, I created a scatter plot of the quantity (input) / price (output) data and added a logarithmic trendline.

\vspace{0.05in}

   \item Model this demand price (in Excel) using an {\bf logarithmic} trendline. 

\vspace{0.1in}

            $p_d(q) =$ \underline{\qquad $-751.9 \ln(q) +4739.6$ \qquad}

\vspace{0.1in}

           According to this model, Stan will sell \underline{\quad $215.41 \approx 215$ \quad} Koalas if he sets his price at \$700. 

\vspace{0.05in}

We need to solve $p_d(q)=-751.9 \ln(q) + 4739.6 = 700$. Do this in Wolfram Alpha and choose the ``approximate form'' of the solution: 
 \verb|-751.9 ln(q) + 4739.6 = 700| \href{https://www.wolframalpha.com/input/?i=-751.9+ln(q)+%2B+4739.6+%3D+700}{\ALPHA}

\vspace{0.05in}

Next, we will be asked to compute the point elasticity. Let's compute the point elasticity function at a general quantity $q$\dots

\vspace{0.05in}

\verb|-((-751.9 ln(q) + 4739.6)/q) / (derivative -751.9 ln(q) + 4739.6| \href{https://www.wolframalpha.com/input/?i=-((-751.9+ln(q)+%2B+4739.6)%2Fq)+%2F+(derivative+-751.9+ln(q)+%2B+4739.6)}{\ALPHA}

\vspace{0.05in}

This gives the result $\varepsilon = 0.00132996 (4739.6-751.9 \ln(q))$. If we plug in $q=215.41$ (the quantity that goes with $p_d=\$700$), we'll get our answer.

\vspace{0.05in}

\verb|0.00132996 (4739.6-751.9 log(q)) at q=215.41| \href{https://www.wolframalpha.com/input/?i=0.00132996+(4739.6-751.9+log(q))+at+q%3D215.41}{\ALPHA}

\vspace{0.1in}

           When $p_d(q) = \$700$, our point elasticity (using this model) is $\varepsilon =$ \underline{\quad $0.931$ \quad} (round to 3 decimal places).

\vspace{0.05in}

          Stan is currently charging \$700 for a Koala and wants to {\bf increase} his revenue, he should          {\Large \fbox{raise} } his price.
        
\vspace{0.05in}

Notice that Stan's point elasticity at $\$700$ (i.e. $q=215.41$) is $\varepsilon = 0.931 <1$ so price dominates. Thus revenue moves with price. He should increase his price.

\vspace{0.05in}

Revenue should be maximized at a quantity when $\varepsilon=1$. Let's make Alpha find such a quantity\dots

\vspace{0.05in}

\verb|0.00132996 (4739.6-751.9 log(q)) = 1| \href{https://www.wolframalpha.com/input/?i=0.00132996+(4739.6-751.9+log(q))+%3D+1}{\ALPHA}

\dots{}using the previously computed point elasticity function. Alpha finds that $q = 201.038$. Plugging this back into the demand function will yield the corresponding demand price\dots

\vspace{0.05in}

\verb|-751.9 ln(q) + 4739.6  at q=201.038| \href{https://www.wolframalpha.com/input/?i=-751.9+ln(q)+%2B+4739.6++at+q%3D201.038}{\ALPHA}

\vspace{0.05in}

What quantity and price will {\bf maximize} revenue? \quad $q =$ \underline{\quad $201.038$ \quad}  \quad $p=$ \underline{\quad \$751.90 \quad}

\vspace{0.05in}

Alternatively, we could have found the critical points of revenue function: $R(q) = p_d(q) \cdot q = (-751.9 \ln(q) +4739.6)q$ and found the maximum that way.
        
\end{enumerate}

%\vspace{0.1in}

   \item Suppose that some item's point elasticity is $\varepsilon = 0.7$ at some price. If the quantity is lowered by 7\%, \dots
   
   \vspace{0.05in}
   
   First, when quantity goes down, the price should go up. Since $\varepsilon=0.7<1$ we have that price dominates and revenue goes with the price. Thus the revenue should go up as well. Now let's work out the specific changes.
   
   Elasticity is negative percent change in quantity (call this $\% \Delta q$)  divided by percent change in price (call this $\% \Delta p$):
   $\epsilon = - \% \Delta q / \% \Delta p$. We are given $\epsilon=0.7$ and $\% \Delta q = -7\% = -0.07$. Therefore, $0.7 = -(-0.07)/\% \Delta p$.
   So $\% \Delta p \cdot 0.7 = 0.07$ and so $\% \Delta p = 0.07/0.7 = 0.1$. This means that the price is increased by 10\% (confirming that it should go up).
   
   \newcommand{\old}{_{\mathrm{old}}}
   \newcommand{\new}{_{\mathrm{new}}}
   
   Next, let $R\old = p\old q\old$ and $R\new = p\new q\new$ be old and new revenues, quantities, and prices. Then we have that $q\new = 93\% q\old = 0.93 q\old$ because the quantity is lowered 7\%. Also, $p\new = 110\% p\old = 1.1 p\old$ because the price is increased by 10\%. Putting this together, $R\new = p\new q\new = 1.1 p\old  \cdot 0.93 q\old = 1.1(0.93) p\old q\old = 1.023 R\old$. This means that the revenue has increased by 2.3\% (again confirming that it should go up).
   
   \vspace{0.05in}
   
   the price is {\Large \fbox{raised} } by \underline{\quad 10\% \quad} and revenue is {\Large \fbox{raised}} by \underline{\quad 2.3\% \quad}. 

\vspace{0.1in}
              
   \item George is renting some cheap space downtown. His storage room is quite oddly shaped and he wants to figure out its square footage. Starting at the the edge of his room George measures how wide the room is using a tape measure. He steps 2 feet over each time he makes a measurement. This is what he found\dots 

\force \hfill   
   \begin{tabular}{|c||c|c|c|c|c|c|c|c|c|c|c|} \hline
   Feet from edge: & 0 & 2 & 4 & 6 & 8 & 10 & 12 & 14 & 16 & 18 & 20 \\ \hline
         Room width: & 15 & 17 & 18 & 16 & 16 & 17 & 19 & 17 & 17 & 16 & 15 \\ \hline
   \end{tabular}
\hfill \force 

\vspace{0.1in}

Approximate the room's square footage in 2 different ways: (1) Using a right hand rule approximation with $n=10$ rectangles and (2) Using Simpson's rule with $n=10$. [Round each answer to 3 decimal places.]

\vspace{0.1in}

In both cases our inputs (feet from edge) go from 0 to 20 (so $a=0$ and $b=20$). We are given that $n=10$. Then in the right hand rule sheet we need to punch in all but the first output (room width): 17, 18, \dots, 15 (the right hand rule never uses the very first data point -- the left end point). Simpson's rule is essentially the same except that we also use the very first data point (punch in 15, 17, 18, \dots, 15). 

\vspace{0.05in}

Right hand rule: \underline{\qquad 336 $\mathrm{ft.}^2$ \qquad}  \hfill
Simpson's rule: \underline{\qquad $334.667$ $\mathrm{ft.}^2$ \qquad}  \hfill

\vspace{0.05in}

   \item Suppose that $R(t)=1000t^2e^{-t/5}$ models the rate of production of kitchen grease powered cars where $t$ is the number of years since January 1, 2000. 
   
   \vspace{0.05in}
   
   \verb|plot 1000t^2 e^(-t/5) on [0,60]| \href{https://www.wolframalpha.com/input/?i=plot+1000t%5E2+e%5E(-t%2F5)+on+%5B0,60%5D}{\ALPHA}
   
   Our first question asks us to find $t$ such that the rate $R(t)$ is 10 (cars per year). Alpha will solve $R(t)=10$ for us.
   
   \verb|1000t^2 e^(-t/5) = 10| \href{https://www.wolframalpha.com/input/?i=1000t%5E2+e%5E(-t%2F5)+%3D+10}{\ALPHA}
   
   Choosing approximate forms, we get 3 real solutions. One of them is negative (we discard this). Of the two positive solutions, one occurs on the way up (i.e. $t \approx 0.101015$) and the other occurs on the way down (i.e. $t \approx 64.7278$). Of course the one on the way down is the one we're interested in.
   
   \vspace{0.05in}
   
   When (after the peak production) will the production rate drop to 10 grease cars per year? $t=$ \underline{\quad 64.728 \quad}\\ 
   \force \hfill  [Round to 3 decimal places.]
   
   \vspace{0.05in}
   
   Next, we wish to maximize the production rate function. This means we need to locate the critical points of $R(t)$. 
   
   \verb|derivative 1000t^2 e^(-t/5)| \href{https://www.wolframalpha.com/input/?i=derivative+1000t%5E2+e%5E(-t%2F5)}{\ALPHA}
   
   The derivative has roots at $t=0$ and $t=10$. Looking at the graph, the maximum occurs at $t=10$. Plugging this in will give us the maximum rate itself.
   
   \verb|1000t^2 e^(-t/5) at t=10| \href{https://www.wolframalpha.com/input/?i=1000t%5E2+e%5E(-t%2F5)+at+t%3D10}{\ALPHA}
   
   The maximum production rate will be \underline{\quad 13,534 \quad} grease cars per year. This will occur when $t=$ \underline{\quad 10 \quad}.
   
   \vspace{0.05in}
   
   To find out how many cars will be produced after 1/1/17 (i.e. t=17), we need to ``add up'' the rate function from that time onward. In other words, we need to compute the integral $\int_{17}^\infty R(t)\,dt$.
   
   \verb|int 1000t^2 e^(-t/5) from 17 to infinity| \href{https://www.wolframalpha.com/input/?i=int+1000t%5E2+e%5E(-t%2F5)+from+17+to+infinity}{\ALPHA}
   
   How many grease cars will be produced after January 1, 2017? \underline{\quad 84,935 cars \quad}.
      
  % \vspace{-0.05in}
   
   Our final question asks when will 100,000 cars be produced. In other words, how long do we need to ``add up'' our production rate function until we hit 100,000. So we need to solve: $\int_0^X R(t)\,dt = 100000$.
   
   \verb|(int 1000t^2 e^(-t/5) from 0 to X) = 100000| \href{https://www.wolframalpha.com/input/?i=(int+1000t%5E2+e%5E(-t%2F5)+from+0+to+X)+%3D+100000}{\ALPHA}
   
   We get $X \approx 11.4254$. Since $0.4254(12)=5.1048$, it is 11 years, 5 whole months and a few more days until we hit 100,000 cars. This would be June 2011.  Alternatively, we could make Alpha tell us the {\it exact} date.
   
   \verb|11.4254 years after 1/1/2000| \href{https://www.wolframalpha.com/input/?i=11.4254+years+after+1%2F1%2F2000}{\ALPHA}
   
   Apparently the exact date is June 5, 2011.
   
   \vspace{0.05in}
   
   When will the 100,000${}^{\mathrm{th}}$ grease car be completed? \underline{\quad June 2011 \quad}. \qquad [Give the month and year.]
      
\newpage
   
   \item Stacy has a rather impressive collection of shoes (not all of which even fit her feet). She has about 3,000 pairs of shoes. Assuming that her collection of shoes has a normal distribution of sizes (with a mean size of 8.5 and a standard deviation of 1.25), answer the following questions:

{\it Note:} Women's shoe sizes go up by $1/2 = 0.5$.  Although there is a difference of opinion about this, consider 4 to be the smallest size. This means that the interval: $-\infty < t \leq 4.25$ represents the smallest size $4$ and then $4.25<t<4.75$ represents size $4.5$ etc.
   
   \vspace{0.05in}

Type ``normal distribution'' into Alpha to look up the distribution formula, $n(x)$. Set $\mu=9.5$ and $\sigma=1.25$. 

Shoe sizes 8 to 11 are represented by the interval $7.75 \leq x \leq 11.25$ (recall that since sizes go up by halves, we go a quarter above and below to cover each size). This means that $\int_{7.75}^{11.25} n(x)\,dx$ is the probability that a shoe in the collection is of size 8 to 11.  If we multiply this by 3000, we'll have the desired number of shoes.

\verb|3000 int e^(-(x-8.5)^2/(2 1.25^2))/(sqrt(2 π) 1.25) from x=7.75 to 11.25| \href{https://www.wolframalpha.com/input/?i=3000+int+e%5E(-(x-8.5)%5E2%2F(2+1.25%5E2))%2F(sqrt(2+%CF%80)+1.25)+from+x%3D7.75+to+11.25}{\ALPHA}

   \vspace{0.05in}

    How may pairs of shoe sizes 8 to 11 does she have? \underline{\quad $2135.53 \approx 2,136$ pairs \quad}
  
   \vspace{0.05in}

The same as the last part, this time to capture sizes 6 and under we need the interval $-\infty < t \leq 6.25$.

\verb|3000 int e^(-(x-8.5)^2/(2 1.25^2))/(sqrt(2 π) 1.25) from x=-infinity to 6.25| \href{https://www.wolframalpha.com/input/?i=3000+int+e%5E(-(x-8.5)%5E2%2F(2+1.25%5E2))%2F(sqrt(2+%CF%80)+1.25)+from+x%3D-infinity+to+6.25}{\ALPHA}

   \vspace{0.05in}
  
   How many shoes size 6 and under does she own? \underline{\quad $107.791 \approx 108$ pairs \quad}
  
   \vspace{0.05in}

The final part asks for a cut-off, so this time we're solving for an integral bound. The ``largest'' sizes would indicate some mystery size $X$ and up. So we'll use $X < x < \infty$. We want to capture the upper 3.5\% so we need to  solve $\int_X^\infty n(x)\,dx = 0.035$.

\verb|(int e^(-(x-8.5)^2/(2 1.25^2))/(sqrt(2 π) 1.25) from x=X to infinity) = 0.035| \href{https://www.wolframalpha.com/input/?i=(int+e%5E(-(x-8.5)%5E2%2F(2+1.25%5E2))%2F(sqrt(2+%CF%80)+1.25)+from+x%3DX+to+infinity)+%3D+0.035}{\ALPHA}

Makes Alpha choke, so we should try to do this in 2 steps. First, let's compute the integral. Then copy the result, set it equal to $0.035$, and solve.

\verb|int e^(-(x-8.5)^2/(2 1.25^2))/(sqrt(2 π) 1.25) from x=X to infinity| \href{https://www.wolframalpha.com/input/?i=int+e%5E(-(x-8.5)%5E2%2F(2+1.25%5E2))%2F(sqrt(2+%CF%80)+1.25)+from+x%3DX+to+infinity}{\ALPHA}

\verb|(298930055 sqrt(π/2) erfc(1/5 sqrt(2) (-17+2 X)))/749306528 = 0.035| \href{https://www.wolframalpha.com/input/?i=(298930055+sqrt(%CF%80%2F2)+erfc(1%2F5+sqrt(2)+(-17%2B2+X)))%2F749306528+%3D+0.035}{\ALPHA}

Alpha gives the answer: $X \approx 10.764888\dots$. Since $10.75 \leq x \leq 11.25$ represents size 11, we have that sizes 11 and up account for the largest 3.5\% of her shoes.

   How large does a pair of shoes need to be to make it into the largest 3.5\% of her collection? \underline{\quad Size 11 or larger. \quad}
       
  
\end{enumerate}

\end{document}
