\documentclass[12pt]{article}
\usepackage{fancybox,fancyheadings,graphicx,wrapfig,floatflt}
\newcommand{\ds}{\displaystyle}
\newcommand{\blankbox}[2]{\fbox{\rule{#1}{0in}\rule{0in}{#2}}}
\newcounter{problemnumber}
\newcommand{\Problem}{\stepcounter{problemnumber}
       \item[\fbox{\parbox{.18in}{\hfil\theproblemnumber\hfil}}]}
\newcommand{\Points}[1]{(#1 points) \quad}
\setlength{\parindent}{0pt}
\pretolerance=4000
\setlength{\topmargin}{-.75in}
\setlength{\textheight}{10in}
\setlength{\textwidth}{7in}
\setlength{\headheight}{26pt}
\setlength{\headsep}{2pt}
\setlength{\headrulewidth}{0pt}
\setlength{\oddsidemargin}{-0.25in}
\setlength{\evensidemargin}{-0.25in}
\headrulewidth=0pt
\lhead{\bf Math 120E}
\chead{\bf First Midterm Solutions}
\rhead{\bf Autumn 2007}
\cfoot{}
\pagestyle{fancy}
%
\begin{document}

\begin{enumerate}
%
%	PROBLEM 1
%
\Problem\Points{6} Let $p(x)=5x^2-8x$.  Compute\quad $\ds\frac{p(x+h)-p(x)}h$\quad and simplify as much as possible (assume $h\neq0$).
\bigskip

\begin{eqnarray*}
p(x+h)&=&5(x+h)^2-8(x+h)\\
&=&5x^2+10xh+5h^2-8x-8h\\
\\
p(x+h)-p(x)&=&\left(5x^2+10xh+5h^2-8x-8h\right)-\left(5x^2-8x\right)\\
&=&10xh+5h^2-8h\\
\\
\frac{p(x+h)-p(x)}h&=&10x+5h-8
\end{eqnarray*}

\vfill

%
%       PROBLEM 2
%
\Problem\Points{6} For which value(s) of $\alpha$ does\quad $12x^2+2\alpha x +3=0$\quad have exactly one solution?
\bigskip

{\it This is a quadratic equation of form $Ax^2+Bx+C=0$ with $A=12$, $B=2\alpha$ and $C=3$. 

By the quadratic formula, it has exactly one solution if $B^2-4AC=0$.

\begin{eqnarray*}
(2\alpha)^2-4\cdot12\cdot3&=&0\\
4\alpha^2-144&=&0\\
4\alpha^2&=&144\\
\alpha&=&\pm6
\end{eqnarray*}

So there are two solutions,\quad $\alpha=6$\quad and\quad $\alpha=-6$.
}
\vfill

\newpage
%
%	PROBLEM 3
%
\begin{floatingfigure}[r]{2in}
\vspace{-16ex}
\includegraphics[width=2.5in]{mid1.eps}
\end{floatingfigure}
\parbox[t]{4.5in}{\Problem\Points{13} The green at the 13th hole of the golf course is a circle of radius 20 feet. The hole is located 8 feet due North of the center of the green. Clovis starts walking from a point 22 feet East and 14 feet North of the center of the green. He walks straight towards the westernmost point of the green at a constant rate of 2 feet per second. (See the figure.)}
\begin{enumerate}
\item\Points{6} At what point does Clovis enter the green?
\bigskip

{\it Circle: $x^2+y^2=400$
\\

\parbox[t]{4.5in}{Line: It joins $(-20,0)$ and $(22,14)$. The slope is $$ m=\frac{14-0}{22-(-20)}=\frac13$$ The equation is $\ds y=\frac13(x+20)$.}
\\

Intersection:
\begin{eqnarray*}
x^2+\left[\frac13(x+20)\right]^2&=&400\\
\\
\frac{10}{9}x^2+\frac{40}{9}x-\frac{3200}{9}&=&0\qquad\mbox{\it multiply through by\quad $\ds\frac{9}{10}$}\\
\\
x^2+4x-320&=&0
\\
x&=&\frac{-4\pm\sqrt{4^2-4\cdot 1\cdot (-320)}}{2\cdot 1}=16,\ -20
\end{eqnarray*}

Thus $x=16$ and $\ds y=\frac13(16+20)=12$. The point is $(16,12)$.
}
\vfill

\item\Points{7} When he reaches the point due East of the hole, Clovis turns and heads straight South. If he maintains a constant speed, what is the total time he spends in the green?
\bigskip

{\it He turns when $y=8$, so\quad $\ds 8=\frac13(x+20)$\quad and $x=4$.
\\

$\ds d_1=\sqrt{(16-4)^2+(12-8)^2}=\sqrt{160}$
\\

He exits the circle where $x=4$, so\quad $4^2+y^2=400$\quad and $y=-\sqrt{384}$. (It must be the negative one, look at the picture.)
\\

$\ds d_2=y_{\rm hi}-y_{\rm lo}=8-\left(-\sqrt{384}\right)=8+\sqrt{384}$
\\

The total time is\quad $\ds t=\frac{\sqrt{160}+8+\sqrt{384}}{2}$\quad or about $20.12$ seconds.
}
\end{enumerate}
\vfill

\newpage
%
%       PROBLEM 4
%
\begin{floatingfigure}[r]{1.5in}
\vspace{-14ex}
\includegraphics[width=1.5in]{mid1a.eps}
\end{floatingfigure}
\parbox[t]{4.5in}{\Problem\Points{13} Ida has 640 feet of fencing to make a rectangular enclosure for her goats. She will use the wall of her house for one side of the enclosure. She also wants to use some of the fencing to split the enclosure into four parts. (See the figure.)} 
\begin{enumerate}
\parbox[t]{4.25in}{\item\Points{7} What is the maximum possible area of the enclosure?}
\bigskip

{\it Let $x$ be the width of the enclosure and $y$ be its height.
\\

We wish to maximize $A=xy$.
\\

There are 5 horizontal pieces of fence and 1 vertical one. Thus our constraint is $$5x+y=640$$


Hence $y=640-5x$ and \quad $A=x(640-5x)=-5x^2+640x$.
\\

This is a downward opening parabola so the vertex gives a maximum. The $x$-coordinate of the vertex is
$$x_{\rm max}=\frac{-640}{2\cdot(-5)}=64$$
by the Vertex Formula.
\\

The maximum area is \quad $A(64)=-5\cdot(64)^2+640\cdot64=20480$ square feet.
}
\vfill
\item\Points{6} Find dimensions that would give the enclosure an area of 19,500 square feet. (Using all the fencing.)
\bigskip

{\it Set $A=19500$ and solve for $x$.
\begin{eqnarray*}
19500&=&-5x^2+640x\\
5x^2-640x+19500&=&0\quad\mbox{divide both sides by 5}\\
x^2-128x+3900&=&0\\
x&=&\frac{128\pm\sqrt{128^2-4\cdot 1\cdot3900}}{2}\\
&=&78,\ 50
\end{eqnarray*}
Thus there are two possible answers.
\\

$x=78$ feet and $y=640-5\cdot78=250$ feet

or

$x=50$ feet and $y=640-5\cdot50=390$ feet
}
\end{enumerate}
\vfill
\newpage
%
%       PROBLEM 5
%
\Problem\Points{12} Let $\ds f(x)={2x+1}$\quad and\quad $\ds g(x)= \left\{ \begin{array}{ll} -x+1 & \mbox{if $x \le -2$};\\7-x^2 & \mbox{if $x \ge -2$}.\end{array} \right. $
\begin{enumerate}
\item\Points{6} Give a multipart formula for the composition $f(g(x))$.
\bigskip

{\it
\[f(g(x))=\left\{ \begin{array}{ll} 2\left(-x+1\right)+1 & \mbox{if $x \le -2$};\\2\left(7-x^2\right)+1 & \mbox{if $x \ge -2$}.\end{array} \right. \]

or

\[f(g(x))=\left\{ \begin{array}{ll} -2x+3 & \mbox{if $x \le -2$};\\15-2x^2 & \mbox{if $x \ge -2$}.\end{array} \right. \]
}
\vfill
\item\Points{6} Give all values of $x$ that satisfy $g(x)=2$.
\bigskip

{\it

Solve $-x+1=2$ to get $x=-1$. 
\\

But $x=-1$ is {\bf not} in the domain of this part of $g(x)$ because $-1\not\le-2$ and so it is {\bf not} a solution.
\\

Solve $7-x^2=2$ to get $x=\sqrt{5}$ and $x=-\sqrt{5}$. Only $x=\sqrt{5}$ is greater or equal to $-2$.
\\

The only solution is $x=\sqrt{5}$.

}
\vfill
\end{enumerate}
\end{enumerate}
\end{document}
