% TEMPLATE FOR STANDARD QUIZ
% by laura
\documentclass[14pt,epsfig]{article}

\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{hyperref}
\oddsidemargin=0in
\evensidemargin=0in
\textwidth=6.3in
\topmargin=-0.5in
\textheight=9in

\parindent=0in
\pagestyle{empty}

%testpoints.tex
\oddsidemargin=0in
\evensidemargin=0in
\textwidth=6.3in
\topmargin=-0.5in
\textheight=9in
\parindent=0in
\pagestyle{empty}

\newcounter{problemnum}
\renewcommand{\theproblemnum}{\arabic{problemnum}}
\newcounter{partnum}[problemnum]
\renewcommand{\thepartnum}{\alph{partnum}}
\newcounter{totalpoints}
\newcounter{curprobpts}	
\newcounter{totalparts}
\newcounter{pagepoints}
\newenvironment{problem}[1]{
\refstepcounter{problemnum}
\vspace{0.15in} \par
\setcounter{curprobpts}{#1} \setcounter{totalparts}{0}
{\Large \bf \theproblemnum. \normalsize ({\it \arabic{curprobpts} point\null\ifnum \value{curprobpts} = 1\else s\fi}\/)}
}{\ifnum \value{totalparts} = 0
	\addtocounter{totalpoints}{\value{curprobpts}}	% Add pts to total.
	\addtocounter{pagepoints}{\value{curprobpts}}
	\else \ifnum \value{totalparts} = \value{curprobpts}
	\else \typeout{}
	\typeout{!!!!!!!   POINT ACCOUNTING ERROR   !!!!!!!!}
	\typeout{PROBLEM [\theproblemnum] WAS ALLOCATED \arabic{curprobpts} POINTS,}
	\typeout{BUT CONTAINS PARTS TOTALLING \arabic{totalparts} POINTS!}
	\typeout{}
	\fi
\fi
}
\newcommand{\newpart}[1]
{
\refstepcounter{partnum}
\hspace{0.25in}	
\ifnum #1 > 0
	\makebox[0.5in][l]{{\bf \thepartnum.} {\bf ({\it #1 pt\ifnum #1 = 1\else s\fi\/}) \,\,}}
\else
	\makebox[0.25in][l]{({\bf \thepartnum})}
\fi
\hspace{0.1in}	
\addtocounter{totalparts}{#1}
\addtocounter{pagepoints}{#1}
\addtocounter{totalpoints}{#1}
}
\newcommand{\skipproblem}[1]{\addtocounter{problemnum}{#1}}

\newcommand{\showpoints}
{
\typeout{}  
\typeout{====> A TOTAL OF \arabic{totalpoints} POINTS WERE READ.}
\typeout{}
}
%%%%%end testpoints.tex
%\input{testpoints}

\begin{document}


%%%(change to appropriate class and semester)
MATH 2222HJ Spring 2016

%%%(change to appropriate quiz type and date)
Quiz 6 \hspace{1.9in} {Name:} {\underline {\hspace{2.5in}}}
\vspace{2pc}

%%%(modify rules, time, points as appropriate)
Show all work clearly and in order, and circle your final answers.  

Justify your answers algebraically whenever possible. Unjustified work may not receive full credit.
\vspace{2pc}

We will derive the formula that says the area of a triangle with height $h$ and base $b$ is $$\mathrm{Area} \left({\Delta} \right)=\dfrac{1}{2}bh.$$
Take any triangle and rotate it so that one of the legs is horizontal. Place this triangle in the coordinate plane so that the $y$-axis goes through the top vertex and the bottom leg lies on the $x$-axis. Label the top vertex with coordinates $(0,h)$, the left vertex with coordinate $(b_1,0)$, and the right vertex with coordinate $(b_2,0)$. \\
Note: with this notation we see the length of the base, $b$, is given by $b=b_2-b_1$.

\begin{problem}{1}
Draw the triangle as described above in the plane.
\vfill
\end{problem}
\begin{problem}{1}
Find the (linear) equations of the left leg and the right leg of the triangle you drew in Problem~1.
\vfill
\end{problem}

\begin{problem}{3}
Find the area of the triangle by computing the double integral over the triangle of the function $1$. That is, use the formula $\mathrm{area}(D)=\displaystyle\int\int_D 1 \mathrm{d}A$ to derive the area of triangle formula. \\
\textit{Hint: Note that the length of the base leg $b$ expressed in terms of $b_1$ and $b_2$ is $b=b_2-b_1$.}
\vfill
\end{problem}

\vfill
\showpoints
\end{document}