Exam answer key (exam)
The same exam class paper compiled with the answers option, printing framed solutions under every question.
Create an account to use this
- Category
- Teaching
- Document class
exam(exam.cls) — ships with TeX Live- Workflow
- Assignment / problem set — no revision rounds
- Author
- Philip S. Hirschhorn
- Source
- CTAN
- Licence
- exam.cls: The LaTeX Project Public License 1.3. Sample text: Manulyx, CC0 1.0 (free to use, no conditions).
What you get
main.tex— the file that is compiled · 3 KB
These become your files. Editing them afterwards changes your project and nothing else — a project owns its files from the moment it is made.
Link to this template. Send it to a student or co-author: it starts a new paper in this template, through sign-up if they need an account.
https://manulyx.com/start/ctan-teaching-exam-answer-key
Source
main.tex — the file that is compiled · 3 KB
\documentclass[11pt,addpoints,answers]{exam}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
\usepackage{booktabs}
\usepackage{tikz}
\pagestyle{headandfoot}
\firstpageheader{Department of Mathematics}{}{Course Code -- Term 2026}
\runningheader{Course Code}{Midterm examination}{Term 2026}
\runningheadrule
\footer{}{Page \thepage\ of \numpages}{}
% The answers option prints every solution environment. Remove it to print the paper
% that students sit; the solutions then disappear and their space is left blank.
\framedsolutions
\renewcommand{\solutiontitle}{\noindent\textbf{Solution:}\enspace}
\CorrectChoiceEmphasis{\bfseries}
\begin{document}
\begin{center}
{\Large\bfseries Your paper}\\[4pt]
Course Code -- Course Name\\[2pt]
\textsc{Answer key}
\end{center}
\vspace{8pt}
\noindent This key covers \numquestions\ questions worth \numpoints\ points. Award partial credit
for correct reasoning with an arithmetic slip.
\begin{center}
\gradetable[h][questions]
\end{center}
\begin{questions}
\question Let $f(x) = x^{3} - 3x + 1$.
\begin{parts}
\part[4] Find $f'(x)$ and the critical points of $f$.
\begin{solution}
$f'(x) = 3x^{2} - 3 = 3(x-1)(x+1)$, so the critical points are $x = -1$ and $x = 1$.
\end{solution}
\part[6] Classify each critical point as a local maximum or a local minimum.
\begin{solution}
$f''(x) = 6x$. Since $f''(-1) = -6 < 0$, $x=-1$ is a local maximum ($f(-1)=3$); since $f''(1) = 6 > 0$, $x=1$ is a local minimum ($f(1)=-1$).
\end{solution}
\end{parts}
\question[8] The table lists measured positions $y$ of a falling object at four times $t$.
\begin{center}
\begin{tabular}{@{}lcccc@{}}
\toprule
$t$ (s) & 0 & 1 & 2 & 3 \\
\midrule
$y$ (m) & 0.0 & 4.9 & 19.6 & 44.1 \\
\bottomrule
\end{tabular}
\end{center}
Assume the data follow
\begin{equation}
y(t) = a\,t^{2}
\end{equation}
for some constant $a$. Estimate $a$ and the average velocity between $t=1$ and $t=3$.
\begin{solution}
From $t=3$: $a = 44.1/9 = 4.9$\,m\,s$^{-2}$. The average velocity is $(44.1 - 4.9)/(3 - 1) = 19.6$\,m\,s$^{-1}$.
\end{solution}
\question[8] The figure shows the graph of a function $g$ on $[0,4]$.
\begin{center}
\begin{tikzpicture}[scale=0.9]
\draw[->] (-0.2,0) -- (4.5,0) node[right] {$x$};
\draw[->] (0,-0.2) -- (0,3.2) node[above] {$y$};
\draw[thick] (0,0.5) -- (1,2.5) -- (3,2.5) -- (4,0.5);
\foreach \x in {1,2,3,4} \draw (\x,0.08) -- (\x,-0.08) node[below] {\x};
\draw (0.08,2.5) -- (-0.08,2.5) node[left] {2.5};
\draw (0.08,0.5) -- (-0.08,0.5) node[left] {0.5};
\end{tikzpicture}
\end{center}
Use the areas under the graph to compute $\displaystyle\int_{0}^{4} g(x)\,dx$.
\begin{solution}
Two trapezoids of area $\tfrac12(0.5 + 2.5)\cdot 1 = 1.5$ and a rectangle of area $2.5 \cdot 2 = 5$ give $\int_0^4 g(x)\,dx = 8$.
\end{solution}
\question[4] If $f$ is differentiable at $a$, then $f$ is continuous at $a$.
\begin{oneparchoices}
\CorrectChoice True
\choice False
\end{oneparchoices}
\begin{solution}
True: differentiability at a point implies continuity there.
\end{solution}
\end{questions}
\end{document}
The first page, as this template compiles today. Click it to enlarge, and again to shrink. Open the file ↗