% LaTex2e
\documentclass[12pt]{article}
\usepackage{amssymb,latexsym}

%\usepackage{anysize}
%\marginsize{left}{right}{top}{bottom}
%\marginsize{1.25cm}{1.25cm}{1.75cm}{2.5cm} % this cuts off page numbers

%\marginsize{4cm}{4cm}{2cm}{3cm}  %% used for exam 1

\pagestyle{myheadings}
\def\header{{\hfill Exam 2 \hfill A. Miller \hfill Fall 2010
                                       \hfill Math 222\hfill}}
\markboth\header\header

\newcount\probno
\newcount\total
\newwrite\examTBLFile

\probno=0

\def\message{$\;\;\;$ Show all of your work.
Circle your answer. \par\bigskip}
\def\message{}
\def\nextpage{\vfill \newpage}
%\def\nextpage{\par\bigskip}

\def\prob#1{\advance\probno by 1
    \nextpage
    \noindent\the\probno . (#1 pts)
    \message
    \advance\total by #1
    \immediate\write\examTBLFile{\the\probno
       \string& #1 \string&
       \string\qquad \string\\ \string\hline}}

\def\finishtbl{
    \immediate\write\examTBLFile{Total \string& \the\total
    \string& \qquad \string\\ \string\hline}
     }

\newwrite\ans
\immediate\openout\ans=answers
\outer\def\answer{\par\medbreak
  \immediate\write\ans{}
  \immediate\write\ans{\string\bigskip \the\probno . }
  \copytoblankline}
\outer\def\putanswer{\par\medbreak
  \immediate\write\ans{}
  \copytoblankline}
\def\copytoblankline{\begingroup\setupcopy\copyans}
\def\setupcopy{\def\do##1{\catcode`##1=12}\dospecials
     \catcode`\|=12\obeylines}
{\obeylines \gdef\copyans#1
  {\def\next{#1}%
  \ifx\next\empty\let\next=\endgroup%
  \else\immediate\write\ans{\next}\let\next=\copyans\fi\next}}

\def\printanswers{\newpage\begin{center} Answers \end{center}
    \immediate\closeout\ans\input answers}

%\def\answer{\par\bigskip\bigskip\bigskip\noindent \par\bigskip
%Answer: \par\bigskip\bigskip}
%\outer\def\answer{ {\par\bigskip Circle your answer.} \par\medbreak

\newenvironment{enum}
{\begin{list}{(\alph{enumi})}
{\usecounter{enumi}\setlength{\rightmargin}{\leftmargin}}}
{\end{list}}

\newenvironment{Enum}
{\begin{list}{(\Alph{enumi})}
{\usecounter{enumi}\setlength{\rightmargin}{\leftmargin}}}
{\end{list}}


\def\conj(#1){\overline{#1}}
\def\vtor(#1,#2,#3){
\left(\begin{array}{r}
#1 \\
#2 \\
#3 \\
\end{array}\right)}
%\def\boxans{\;\;\fbox{\phantom{{\Large xxxxAAAAAxxX}}}}
\def\boxans{\;\;\fbox{\phantom{
$\left(\begin{array}{r}
aaaaaaaaaaaaa1 \\
2 \\
\end{array}\right)$
}}}
\def\jitem{\par \hfill \item}
\def\circle{ Circle your answer. }

\begin{document}

\bigskip

\begin{center}
Instructions
\end{center}

No notes, no books, no calculators, no cell phones, no pagers,
no electronic devices of any kind.

Show all of your work. Circle your answer.

\par\vskip .25in
\begin{center}
Name\makebox[3in]{\hrulefill} \\
\end{center}

\bigskip


\bigskip

\begin{minipage}[top]{2.5in}
Circle your section number.

Hand in to your TA.

\begin{verbatim}
Section
Number
 321  7:45  Zhao, Jie
 332  9:55  McMahon, Kayla
 322  8:50  Zhao, Jie
 328  1:20  Emrah, Elnur
 331  9:55  Kim, Yoosik
 324 11:00  McMahon, Kayla
 325 12:05  Wang, Kejia
 326 12:05  Emrah, Elnur
 327  1:20  Wang, Kejia
 330  2:25  Kim, Yoosik
\end{verbatim}
\end{minipage}
\begin{minipage}{2in}
\begin{center} \Large
 \begin{tabular}{||c|c|c||} \hline\hline
  Problem & Points & Score \\  \hline\hline
   \input{exam.tbl}
  \hline \hline
 \end{tabular}
\end{center}
\end{minipage}

\immediate\openout\examTBLFile=exam.tbl

\bigskip

Solutions will be posted shortly after the exam:

www.math.wisc.edu/$\sim$miller

\setcounter{page}{0}
\newpage


\prob{10} % 260 
Put your simplified answer in the box.
\begin{itemize}
\item  For $z=2+3i$ find:
\begin{enum}
 \item $z^2=\boxans$
 \item $\overline{z}=\boxans$
 \item $|z|=\boxans$
 \item $\frac1z=\boxans$
\end{enum}
\item For $z=2e^{3i}$ find:
\begin{enum}
 \item arg$(z)=\boxans$
 \item $|z|=\boxans$
 \item $z^2=\boxans$
 \item $\frac1z=\boxans$
\end{enum}
\item For $z=-\pi e^{\frac\pi2i}$ find:
\begin{enum}
 \item $|z|=\boxans$
 \item arg$(z)=\boxans$
\end{enum}
\end{itemize}

\answer (a) $-5+12i \;\;$ (b) $2-3i\;\;$ (c) $\sqrt{13}\;\;$ 
(d) $\frac2{13}-\frac3{13}i$
\par (a) $3 \;\;$ (b) $2\;\;$ (c) $4e^{6i}\;\;$ 
(d) $\frac12e^{-3i}$
\par (a) $\pi \;\;$ (b) $\frac32\pi\;\;$

\prob{8} % 268
Plot the following four points in the complex plane.
Be sure and label them. 

\def\zz{{1+2i}}
\def\sk{$\;\;\;\;\;\;\;\;\;\;\;\;\;$}


\bigskip
$P=\sqrt{2}\;e^{\frac{5\pi}4 i}$
\sk
$Q=\zz$
\sk
$R=\conj(\zz)$
\sk
$Z=\frac1{\zz}$

\bigskip

\vfill

The dotted lines are one unit apart.

\bigskip
\noindent
% \unitlength=1.36mm
\unitlength=1.0mm
\begin{picture}(100, 100)
\put(00,50){\line(1,0){100}}
\put(50,00){\line(0,1){100}}
%\multiput(10,49)(20,00){5}{\line(0,1){2}}

\multiput(10,09)(20,00){5}{
\multiput(0,0)(0,10){9}{\line(0,1){2}}}

%\multiput(49,10)(00,20){5}{\line(1,0){2}}

\multiput(04,10)(00,20){5}{
\multiput(0,0)(10,0){10}{\line(1,0){2}}}

\end{picture}

\def\text#1{\makebox(0,0)[cc]{#1}}

\answer \bigskip
\noindent
\unitlength=1.0mm
\begin{picture}(100, 100)
\put(00,50){\line(1,0){100}}
\put(50,00){\line(0,1){100}}
\multiput(10,09)(20,00){5}{
\multiput(0,0)(0,10){9}{\line(0,1){2}}}
\multiput(04,10)(00,20){5}{
\multiput(0,0)(10,0){10}{\line(1,0){2}}}
\put(70,90){\text{Q}}
\put(70,10){\text{R}}
\put(30,30){\text{P}}
\put(53,45){\text{Z}}
\end{picture}

\prob{8} % 280
Find all real or complex roots of the equation:
$$z^4+z^2-12=0$$

\circle

\answer $\sqrt{3}$, $2i$, $-\sqrt{3}$, $-2i$

\prob{8} % 296
Find the function $y$ of $x$ which satisfies the {\bf initial}
value problem:
$$\frac{dy}{dx}+\frac{\;\;x^2-1}{y}=0\;\;\;\;\; y(0)=1$$

\circle

\answer $y=\sqrt{2(x-\frac{x^3}3)+1}$


\prob{8} % 303
Find the {\bf general} solution of
$$\frac{dy}{dx}+2y+ e^x\equiv 0$$
\circle

\answer $y=Ce^{-2x}-\frac13 e^x$

\prob{8} % 327
Solve the {\bf initial} value problem:
$$y^{\prime\prime}-5y^\prime+4y\equiv 0$$
$$y(0)=2$$
$$y^\prime(0)=-1$$
\circle

\answer $y=3e^x-e^{4x}$

\prob{8} % 333
For $y$ as a function of $x$, 
find the {\bf general} solution of the equation:
$$y^{\prime\prime}-2y^\prime+10y\equiv 0$$
\circle

\answer $y=A e^x\sin(3x+B)$

\prob{8} % 337
Find a {\bf particular} solution of the equation:
$$y^{\prime\prime}+y^\prime+2y=e^x+x+1$$
\circle

\answer $y_P=\frac14 e^x + \frac12 x+\frac14$

\prob{8} % 501-505
\def\ll{{\mathcal L}}
Given the equation $\ll(z)=z^{\prime\prime}+a_0z^{\prime}+a_1z\equiv b$ where
$a_0,a_1,b$ are given functions of $t$.  Then $\ll(fz_1+gz_2)=b$
where $z_H=C_1z_1+C_2z_2$ is the general solution of the
associated homogenous equation $\ll(z)\equiv 0$ and the derivatives
of $f$ and $g$
satisfy:
$$
          f^\prime=
\frac{\det\left(
\begin{array}{cc}
0        & z_2        \\
b        & z_2^\prime \\
\end{array}
\right)}{\det\left(
\begin{array}{cc}
z_1        & z_2        \\
z_1^\prime & z_2^\prime \\
\end{array}
\right)} 
\;\;\;\;\;g^\prime=
\frac{\det\left(
\begin{array}{cc}
z_1         &  0    \\
z_1^\prime  &  b    \\
\end{array}
\right)}{\det\left(
\begin{array}{cc}
z_1        & z_2               \\
z_1^\prime & z_2^\prime \\
\end{array}
\right)} 
$$

Use these formulas to find the general solution of
$$z^{\prime\prime}+z\equiv \frac{1}{\sin t} $$
\circle

\answer $z=(-t+C_1)\cos t \;\; + \;\;(\ln|\sin t| +C_2) \sin t$

\prob{8} % 348 heat equation and deadbody
According to \emph{Newton's law of cooling} the rate $\frac{dT}{dt}$
at which an object cools is proportional to the difference $T-A$ between
its temperature $T$ and the ambient temperature $A$. The differential
equation which expresses this is
$
\frac{d T}{d t}= k(T-A)
$
where $k<0$ and $A$ are constants.
Solve this equation and show that every solution satisfies
$
\lim_{t\to\infty} T = A.
$

\answer $T=A+Ce^{kt}$ \par $\lim_{t\to\infty} e^{kt}=0$


\prob{10} % 360
$$\vec{a}=\vtor(1,-2,2)\;\;\;\;\;\;\;\;\;\;\;\; \vec{b}=\vtor(2,-1,1)$$

\bigskip
Compute, simplify, and then circle each answer:

\bigskip

\def\xitem{\par \vfill \item}

\begin{enum}
\item $||\vec{a}||$
\xitem $2\vec{a}$
\xitem $||2\vec{a}||^2$
\xitem $\vec{a}+\vec{b}$
\xitem $3\vec{a}-\vec{b}$
%\xitem $||\vec{b}||$
%\xitem $||\pi\cdot\vec{0}||^2$
%\xitem $||\vec{a}-\vec{b}||$
\end{enum}

\answer \par (a) 3 \par\bigskip (b) $\vtor(2,-4,4)$ \par\bigskip 
(c) 36 \par\bigskip
(d) $\vtor(3,-3,3)$ 
\par\bigskip (e) $\vtor(1,-5,5)$

\prob{8} % 372
Compute, simplify, and then circle each answer:

\bigskip

(a) Find a parametric equation for the line which contains
the two vectors 

\medskip
\sk $\vec{a}=\vtor(2,3,1)$ and $\vec{b}=\vtor(3,2,3)$.

\vfill

(b) The vector $\vec{c}=
\left(\begin{array}{c}
c_1 \\
 1\\
c_3 \\
\end{array}\right)$ is on this line.  What
is $\vec{c}$?

\vfill

\answer (a) $\vec{L}[t]=\vtor(2,3,1)+t\vtor(1,-1,2)$
\par (b) $\vtor(4,1,5)$

\printanswers

\finishtbl
\end{document}



