\magnification1200\footline{\ifnum\pageno=1 \else\number\pageno\fi}
\def\whichexam{Math 126 Exam II}
\def\examdate{March 16, 2004}
\def\numberpages{0}
\def\numberofproblems{14}
\def\multiplechoicemax{5}
\def\partialcreditmax{15}
%%
\newif\ifprelim
\newif\ifproblemspacing

\def\START#1{\ifnum#1=0{\global\prelimtrue\global\problemspacingfalse}%
\else{\ifnum#1=1{\global\prelimfalse\global\problemspacingtrue}%
\else{\global\prelimfalse\global\problemspacingfalse}\fi}%
\fi}

\START 2 %% 0 - initial run for instructors
                  %% 1 - run for the actual exam
                  %% 2 - for the webpage
%%
%%%%%  The macro \correctanswers
%%%%%  sets the number of partial credit problems automatically.
%%%%%  We assume that the first answer listed after the problem is
%%%%%  the correct one.
%%%%%  The permutation indicates in which slots to put the answers
%%%%%  (so the first number in the permutation locates the correct answer!) 
\def\correctanswersA{%
\ll  1 41325
\ll  2 21354
\ll  3 52413
\ll  4 24351
\ll  5 32451
\ll  6 13452
\ll  7 54213
\ll  8 12345
\ll  9 42531
\ll 10 35241
\ll 11 43215
}

%%% MULTIPLE CHOICE ANSWER BOX
%% Two columns
\def\interAskip{\hskip.4in}
\def\interNumberAskip{\hskip.3in}

\def\answercolumnSize{\hsize=2in}
\def\answerBoxSize{4.5in}
\def\answerBoxInset{10pt}

\def\displayanswers{\par\noindent\vtop{\answercolumnSize\correctanswersA}%
\vtop{\answercolumnSize\correctanswersB}}
%% One column
\def\interAskip{\hskip.75in}
\def\interNumberAskip{\hskip.3in}

\def\answercolumnSize{\hsize=3.8in}
\def\answerBoxSize{3.8in}
\def\answerBoxInset{0.5in}

\def\displayanswers{\par\noindent\vtop{\answercolumnSize\correctanswersA}}
%%% END MULTIPLE CHOICE ANSWER BOX

\def\LoadPDF#1#2#3#4{
\pdfximage {#1}
\setbox0=\hbox{\pdfrefximage\pdflastximage} % get dimensions of the image
                                            % in order to include the image
                                            % at a specific resolution 
\dimen0=#2\wd0         % calculate the image width at 1200 dpi (0.06 = 72/1200)
\pdfximage              % include the image at resolution 1200 dpi
    width \dimen0 {#1}  % by setting image width to the calculated value
\vtop to#4{\vss\hbox to#3{\hbox to \dimen0{\pdfrefximage \pdflastximage}\hss}}
}


\long\def\hide #1\endhide{}

\def\rhb#1{\noindent\hbox to\hsize{\hfil#1}}

\def\longans#1{\vtop{\noindent\hsize=6.25 true in #1}}
\def\arctan{{\rm arctan\>}}

\long\def\Ans#1\ui#2\ui#3\ui#4\ui#5\ui#6\ui#7\endp{
\ifcase#1\relax\or\one\or\two\or\three\or\four\or\five\fi
\AN{#2}{#3}{#4}{#5}{#6}\Pra}

\def\dxd{\displaystyle}

\magnification1200\footline{\ifnum\pageno=1 \hfil\else\hfil\number\pageno\hfil\fi}
\newcount\cnumberofproblems
\cnumberofproblems=\numberofproblems
\global\advance\cnumberofproblems by 1 

\font\ld=cmbx12
\def\endp{\relax}
\newcount\totalproblems\totalproblems=\numberofproblems
\newtoks\ta\newtoks\tb
\long\def\rightappenditem#1\to#2{%
\ta={\\{#1}}\tb=\expandafter{#2}%
\xdef#2{\the\tb\the\ta}}
\def\leftremove#1\to#2{\expandafter\lopoff#1\lopoff#1#2}
\long\gdef\lopoff\\#1#2\lopoff#3#4{\gdef#4{#1}\gdef#3{#2}}

\magnification1200\footline{\ifnum\pageno=1 \hfil\else\hfil\number\pageno\hfil\fi}
\def\loop#1\repeat{\def\body{#1}\iterate}
\def\iterate{\body\let\next=\iterate\else\let\next=\relax\fi\next}
\font\small=cmr7
\def\newpage{\vfill\eject}
\newdimen\pspacewidth
\newcount\credit
\newcount\pspace\pspace=0
\newcount\pc\pc=1
\newcount\breakpc\breakpc=1
\hfuzz=5pt
\let\xxsum=\sum
\edef\sum{\displaystyle\xxsum}

\newcount\mc
\def\newchoice#1{\ifnum\breakpc<3 \newpage\else\ifprelim\else%
\ifproblemspacing\newpage\else\bigskip\fi\fi\fi\null%
\vskip10pt\centerline{{\bf#1}}\mc=0 %
\ifnum\breakpc<3\credit=\multiplechoicemax \else\credit=\partialcreditmax \fi}
\newif\ifmultichoice
\def\problemspacing{\ifprelim\vskip10pt\headline{\hfill}\else%
\ifproblemspacing
\ifmultichoice%
\ifnum\mc>0 \ifodd\breakpc\relax\newpage\null\vskip10pt\else\vfill\fi\fi%
\else%
\ifnum\mc>0 \newpage\null\vskip10pt\fi\fi%
\else \vskip10pt\headline{\hfill}\fi%
\mc=1 \fi}

\long\def\Newp #1\ui#2a)#3\endp{
\newp#1
\Xan#2
a)#3\endp}


\long\def\newp#1\endp{\problemspacing%
\noindent\vbox{\noindent{\bf\number\pc.}(\number\credit\ pts.)
\global\advance\pc by1 %
\global\advance\breakpc by1 %
#1\endp}\vfil}


\newbox\Aa\newbox\Ab\newbox\Ac
\newbox\Ad\newbox\Ae
\newbox\aa\newbox\ab\newbox\ac
\newbox\ad\newbox\ae

\newdimen\Aspace
\newcount\Ax
\newcount\tmpPC
\def\rememberPC{\global\tmpPC=\pc\global\advance\tmpPC by-1 }

\hfuzz=20pt

\def\five{\global\Ax=5 \global\Aspace=.2\hsize\relax\global\advance\Aspace by-20pt}
\def\four{\global\Ax=4 \global\Aspace=.25\hsize\relax\global\advance\Aspace by-20pt}
\def\three{\global\Ax=3 \global\Aspace=.3\hsize\relax\global\advance\Aspace by-20pt}
\def\two{\global\Ax=2 \global\Aspace=.5\hsize\relax\global\advance\Aspace by-20pt}
\def\one{\global\Ax=1 \global\Aspace=\hsize\relax\global\advance\Aspace by-20pt}

\long\def\AN#1#2#3#4#5{%
\setbox\Aa=\hbox to\Aspace{#1\hfil}%
\setbox\Ab=\hbox to\Aspace{#2\hfil}\setbox\Ac=\hbox to\Aspace{#3\hfil}%
\setbox\Ad=\hbox to\Aspace{#4\hfil}\setbox\Ae=\hbox to\Aspace{#5\hfil}}

\newdimen\Ls\Ls=10pt

\def\prafive{\vskip\Ls\noindent(a)\quad\box\Aa(b)\quad\box\Ab%
(c)\quad\box\Ac(d)\quad\box\Ad%
(e)\quad\box\Ae}

\def\prafour{\vskip\Ls\noindent(a)\quad\box\Aa(b)\quad\box\Ab%
(c)\quad\box\Ac(d)\quad\box\Ad\vskip\Ls\noindent%
(e)\quad\box\Ae}

\def\prathree{\vskip\Ls\noindent(a)\quad\box\Aa(b)\quad\box\Ab%
(c)\quad\box\Ac\vskip\Ls\noindent(d)\quad\box\Ad%
(e)\quad\box\Ae}

\def\pratwo{\vskip\Ls\noindent(a)\quad\box\Aa(b)\quad\box\Ab%
\vskip\Ls\noindent(c)\quad\box\Ac(d)\quad\box\Ad%
\vskip\Ls\noindent(e)\quad\box\Ae}

\def\praone{\vskip\Ls\noindent(a)\quad\box\Aa\vskip\Ls\noindent(b)\quad\box\Ab%
\vskip\Ls\noindent(c)\quad\box\Ac\vskip\Ls\noindent(d)\quad\box\Ad%
\vskip\Ls\noindent(e)\quad\box\Ae}

\def\resetboxes{\setbox\Aa=\box\aa\setbox\Ab=\box\ab\setbox\Ac=\box\ac%
\setbox\Ad=\box\ad\setbox\Ae=\box\ae}
\def\switchbox#1#2{\ifcase#1 \relax\or\setbox\aa=\box#2\or\setbox\ab=\box#2\or%
\setbox\ac=\box#2\or\setbox\ad=\box#2\or\setbox\ae=\box#2 \fi}

\newcount\pcc
\def\mooseAntlers#1#2#3#4#5@{\gdef\pA{#1}\gdef\pB{#2}\gdef\pC{#3}\gdef\pD{#4}\gdef\pE{#5}}
\def\Pra{\leftremove\list\to\moose%
\expandafter\mooseAntlers\moose@%
\switchbox{\pA}{\Aa}\switchbox{\pB}{\Ab}%
\switchbox{\pC}{\Ac}\switchbox{\pD}{\Ad}\switchbox{\pE}{\Ae}%
\resetboxes%
\ifcase\Ax \or\praone\or\pratwo\or\prathree\or\prafour\or\prafive\fi%
\pcc=\pc\advance\pcc by -1 %
\immediate\write16{Problem \number\pcc - Correct Answer \number\pA}%
}


\def\dd#1#2{{{\textstyle d\> #1}\over{\textstyle d#2}}}
\def\frac#1#2{{{\textstyle#1}\over{\textstyle#2}}}
\def\smfrac#1#2{{{\scriptstyle#1}\over{\scriptstyle#2}}}
\def\smsmfrac#1#2{{{\scriptscriptstyle#1}\over{\scriptscriptstyle#2}}}
\def\Lim{\displaystyle\lim}
\def\Int{\displaystyle\int}
\def\arcsec{\rm arcsec}

\def\frac#1#2{{\displaystyle{{\textstyle#1}\over{\textstyle#2}}}}

\long\def\boxit#1#2#3{\vbox{\hrule\hbox{\vrule\kern#2
\vbox{\hsize=#3\kern#2#1\kern#2}\kern#2\vrule}\hrule}}
\newcount\pc
\def\pr{\vskip10pt\noindent\number\pc.\global\advance\pc by 1}
\def\dd#1#2{{{\textstyle d\> #1}\over{\textstyle d#2}}}

\def\rhs#1#2{\par\noindent\hbox to\hsize{\hfill\hbox to#1{#2\hfill}}}
\def\ul#1{\vrule width#1 height -3pt depth3.1pt}
\def\UL#1#2{\hbox to0pt{\qquad #2\hss}\ul{#1}}
\newif\ifnotmarkanswers\notmarkanswerstrue
\newcount\ansmark\newcount\numbermultiplechoice\newcount\numberpartialcredit
\newdimen\AA\AA=10pt
\def\ll#1 #2#3#4#5#6{\tabalign {#1.}&
\ifprelim
\global\ansmark=1 \relax%
\else
\global\ansmark=#2 \relax%
\fi%
\ifnotmarkanswers \global\ansmark=0 \fi%
\ifnum\ansmark=1 \relax($\bullet$)\else(a)\fi&
\ifnum\ansmark=2 \relax($\bullet$)\else(b)\fi&
\ifnum\ansmark=3 \relax($\bullet$)\else(c)\fi&
\ifnum\ansmark=4 \relax($\bullet$)\else(d)\fi&
\ifnum\ansmark=5 \relax($\bullet$)\else(e)\fi&
\hskip\AA\cr\global\advance\numbermultiplechoice by1 
\ifprelim
\rightappenditem{12345}\to\list
\else
\rightappenditem{#2#3#4#5#6}\to\list%
\fi%
}

\def\nomark{\pageno=1 %
\global\notmarkanswerstrue
\headline{\vbox{\rhs{3in}{Name:\ \UL{3in}{\hfil}\hss}\vskip10pt%
\rhs{3in}{Instructor:\ \UL{2.3in}{\hfill}\hss}%
}}
\answersheet}

\def\Nomark#1{\pageno=1 %
\global\notmarkanswerstrue
\headline{\vbox{\rhs{3in}{Name:\ \UL{3in}{\hfil}\hss}\vskip10pt%
\rhs{3in}{Instructor:\ \UL{2.3in}{\quad #1\hfil}\hss}%
}}
\answersheet}


\def\marked{\pageno=1 %
\global\notmarkanswersfalse
\headline{\vbox{\rhs{3in}{Name:\ \UL{3in}{ANSWERS}\hss}\vskip10pt%
\rhs{3in}{Instructor:\ \UL{2.3in}{ANSWERS}\hss}%
}}
\answersheet}

\let\\=\relax
\long\def\Xan#1a)#2b)#3c)#4d)#5e)#6\endp{%
\Ans#1\ui
#2\ui
#3\ui
#4\ui
#5\ui
#6\ui
\endp}

%%%%%%%
\font\sfm=cmr8

\def\eat#1{}


\def\exam#1{\ifprelim\Exam{ }
\else\expandafter\EExam#1,@\fi%
}

\def\EExam#1,#2@{\Exam{#1}\def\xx{#2}%
\ifx\empty\xx\let\next=\eat\else\let\next=\EExam\fi\next#2@}

\def\+{\tabalign}

\long\def\Exam#1{%
\pc=1 \pageno=1 \pspace=0 %
\headline{\vbox{\rhs{3in}{Name:\ \ul{3in}\hss}\vskip10pt%
\rhs{3in}{Instructor:\ \UL{2.3in}{#1}\hss}%
}}


\long\gdef\answersheet{
\null\vskip10pt
\centerline{\whichexam}
\centerline{\examdate}
\vskip10pt

\itemitem{$\bullet$}
The Honor Code is in effect for this examination.
All work is to be your own.
\itemitem{$\bullet$} No calculators.
\itemitem{$\bullet$} The exam lasts for one hour.
\itemitem{$\bullet$} Be sure that your name is on every page in case
pages become detached. 
\itemitem{$\bullet$} Be sure that you have all \numberpages\ pages of the test. 
\itemitem{$\bullet$} The backs of pages may be used if you need additional room
to work on a problem.
\vskip5pt
\centerline{Good Luck!}
\vskip4pt
\settabs\+\interNumberAskip&\interAskip&\interAskip&\interAskip&\interAskip&\interAskip&\cr
\hskip\answerBoxInset\boxit{\hbox to \answerBoxSize{\vbox{\obeylines\baselineskip20pt
\noindent
PLEASE MARK YOUR ANSWERS WITH AN X, not a circle!
\global\numbermultiplechoice=0 \gdef\list{}%

\displayanswers}\hss}}{10pt}{10in}

\global\numberpartialcredit=\numbermultiplechoice
\global\advance\numberpartialcredit by 1
\settabs\+Total multiple choice: &\hskip 2in\cr
\hfill{{\vbox to0pt{\boxit{\vbox{\obeylines\hsize=3in\baselineskip26pt
DO NOT WRITE IN THIS BOX!
\tabalign Total multiple choice: &\quad\ul{1in}\cr
\loop\ifnum\numberpartialcredit< \cnumberofproblems
\tabalign\hfill\number\numberpartialcredit.&\quad\ul{1in}\cr\global\advance\numberpartialcredit by 1
\repeat

\tabalign\hfil {\bf Total:}&\quad\ul{1in}\cr
}}{10pt}{1in}\vss}}}}


\setbox0=\vbox{\answersheet}\pageno=2
\multichoicetrue
\newchoice{Multiple Choice}
\def\kg{{\rm kg}}
\def\log{{\rm log}}
\credit=5
\null\vskip6pt

%: Question 1
\Newp
Evaluate
$$
\int \tan^3(x) \sec^3(x) dx\  .
$$
\ui2
a) $\frac{1}{5} \sec^5(x) - \frac{1}{3} \sec^3(x) + C$
b) $-\frac{1}{5} \sec^5(x) + \frac{1}{3} \sec^3(x) + C$
c) $\frac{1}{5} \sec^5(x) + \frac{1}{3} \sec^3(x) + C$
d) $\frac{1}{3} \sec^3(x) - \sec(x) + C$
e) $\frac{1}{3} \sec^3(x) + \sec(x) + C$
\endp

%: Question 2
\Newp
Which equation below is the partial fraction of the rational function
$$\frac{5 x^2 - 10 x - 8}{(x-2)(x^2+4)}$$
\ui3
a)$\frac{-1}{x-2} + \frac{6x+2}{x^2+4}$
b)$\frac{-1}{x-2} + \frac{2}{x^2+4}$
c)$\frac{5}{x-2} + \frac{x+1}{x^2+4}$
d)$\frac{5}{x-2} + \frac{6x+1}{x^2+4}$
e)$\frac{-1}{x-2} + \frac{x+2}{x^2+4}$
\endp 

%: Question 3
\Newp
Evaluate
$$
\int \frac{-5}{x^2-x-6} dx.
$$
\ui2
a) $\ln \left( \left| \frac{x+2}{x-3} \right| \right) + C$
b) $\ln \left( \left| \frac{x-2}{x+3} \right| \right) + C$
c) $\ln \left( \left| x^2 - x - 6 \right| \right) + C$
d) $-\frac{10}{\sqrt{23}}\ \arctan \left( \frac{2 x + 1}{\sqrt{23}}\right) + C$
e) $-5 \arcsin \left( \frac{2 x + 1}{\sqrt{23}}  \right) + C$
\endp

%: Question 4
\Newp
Suppose the Midpoint rule is to be used
to approximate the integral
$$
\int_0^{10} \sin(\sqrt{6}\ x)\ dx\ .
$$
What is the minimum number of points required to guarantee an accuracy of  $1/1000$?
\ui5
a) $500$
b) $550$
c) $600$
d) $650$
e) $450$
\endp

%: Question 5
\Newp
Compute
$$
\int_1^{\infty} \frac{1}{x^3}\ dx.
$$
\ui5
a) $1/2$
b) $2$
c) Diverges
d) $0$
e) $-1/2$
\endp

%: Question 6
\Newp
Compute
$$
\int_0^2 \frac{1}{x-1}\ dx.
$$
\ui5
a) Diverges
b) $0$
c) $4$
d) $-2$
e) $2$
\endp

%: Question 7
\Newp
Find the length of the curve
$$
y = \frac{1}{2} \cosh(2 x) = \frac{e^{2x}+e^{-2x}}{4} \qquad 0 \leq x \leq 2.
$$
\ui3
a) $\frac{e^4-e^{-4}}{4}$
b) $\frac{e^4-e^{-4}}{2}$
c) $\frac{e^4+e^{-4} - 1}{4}$
d) $\frac{e^4+e^{-4} - 1}{2}$
e) $\frac{2e^4-2e^{-4} - 1}{8}$
\endp

%: Question 8
\Newp
Find the area of the surface obtained by rotating the curve about
the $x${--}axis:
$$
y = \sqrt{x\,} \qquad 0 \leq x \leq 4.
$$
\ui3
a) $\frac{\pi}{6} \left( 17 \sqrt{17} - 1 \right)$
b) $\frac{\pi}{2} \left( 17 \sqrt{17} - 1 \right)$
c) $\frac{\pi}{6} \left( 65 \sqrt{65} - 1 \right)$
d) $\frac{\pi}{2} \left( 65 \sqrt{65} - 1 \right)$
e) $\frac{\pi}{6} \left( 2 \sqrt{2} - 1 \right)$
\endp

%: Question 9
\Newp
Find the centroid of the region bounded by:
$$
y = x^4, \qquad y = 1.
$$
\ui5
a) $(0,5/9)$
b) $(0,4/9)$
c) $(0,8/9)$
d) $(4/9,0)$
e) $(5/9,0)$
\endp

%: Question 10
\Newp
Find the solution of the ordinary differential equation that satisfies
the given initial condition
$$
\frac{d y}{d x} = \sec^2(x) e^{-y} \qquad y(0) = 1.
$$
\ui3
a) $y = \ln \left( \tan(x) + e \right)$
b) $y = \ln \left( \tan(x)  \right)$
c) $y = \ln \left( -\tan(x) + e \right)$
d) $y = \tan(x)$
e) $y = \tan(x) + 1$
\endp

%: Question 11
\Newp
A sample of radioactive material decays to 1/5 of its original amount
in one day.  How long would it take to decay to 1/100 of its original
amount?
\ui5
a) $\frac{\ln(100)}{\ln(5)}$
b) $-\frac{\ln(100)}{\ln(5)}$
c) $\ln(20)$
d) $\ln(95)$
e) $20$
\endp

\multichoicefalse
\def\vvbv{\vbox{\hbox to 6in{\hfill Partial Credit\hfill}%
\hbox to 6in{\rm%
\hfill You must show your work on the partial credit problems 
to receive credit!\hfill}%
\vskip10pt}}
\newchoice{\vvbv}

%: Question 12
\newp
Evaluate:
$$
\int \frac{x^2}{\sqrt{1-4 x^2}}\ dx.
$$
\endp

%: Question 13
\newp
Consider the integral
$$
\int_0^2 (2 x + 3)\ dx.
$$
\item{(a)} (5 pts.) Evaluate this integral exactly.
\item{(b)} (8 pts.) Using the Trapezoidal Rule with $n=4$ find an approximation
  to the integral.
\item{(c)} (2 pts.) Explain your answer in part (b).{\bf Hint:}Consider the error.
\endp

%: Question 14
\newp
Find the area of the surface obtained by rotating the curve about
the $y${--}axis:
$$
x = \sqrt{a^2 - y^2} \qquad 0 \leq y \leq a.
$$
Specifically,
\par\item{(a)}(9 pts.) Write an integral which gives the surface area using the general formula
for surface area.
\par\item{(b)} (6 pts.) Evaluate your integral.
\endp\vfill\eject
}


\exam{}
\advance\pageno by -1
\xdef\numberpages{\number\pageno}
\setbox0=\hbox{\numberpages}
\marked{}
\vfill\eject
\nomark
\end

