homework in latex


When submitting homework as a .tex file please

  • double space (you can use \baselineskip=24pt immediately following the begin document).
  • include your name and homework number in the subject line; e.g., yournamehmknumber.tex (no spaces or parentheses please);
  • upload the file through canvas;
  • verify that the file compiles by running pdflatex or, if you are using sage math cloud or other online latex platform, by using the pdf option before submission and checking for errors (these compilers might produce .pdf output even with certain errors);
  • use the homework template below. Feel free to modify this template, except for the documentclass and the included packages and the macro \cc;
  • for redoes,
    • include the original submission with a \newpage separating the resubmission (first) from the original (second).
    • Please also clearly mark the redo so that it is clear what is to be graded;
    • add R1 to the end of the filename (so the new filename is yournamehmknumberR1.tex).
  • Please no spaces or # (or other unusual characters) in the file name.

Latex homework template

\documentclass[12pt]{amsart}

\textwidth = 6.2 in
\textheight = 8.5 in
\oddsidemargin = 0.0 in
\evensidemargin = 0.0 in
\topmargin = 0.0 in
\headheight = 0.0 in
\headsep = 0.3 in
\parskip = 0.05 in
\parindent = 0.3 in

\usepackage{enumerate}
\usepackage{amsmath}
\usepackage{mathrsfs}
\usepackage{color}
\def\cc{\color{blue}}
\usepackage[normalem]{ulem}

\title{Homework number}
\author{your name here}

\begin{document}
\maketitle
\baselineskip=24pt

Place solution here.

\end{document}



Sample homework (see Problem 1.2).

\documentclass[12pt]{amsart}

\textwidth = 6.2 in
\textheight = 8.5 in
\oddsidemargin = 0.0 in
\evensidemargin = 0.0 in
\topmargin = 0.0 in
\headheight = 0.0 in
\headsep = 0.3 in
\parskip = 0.05 in
\parindent = 0.3 in

\usepackage{enumerate}
\usepackage{amsmath}
\usepackage{color}
\def\cc{\color{blue}}
\usepackage[normalem]{ulem}

\title{Homework 1}
\author{Scott McCullough}

\begin{document}
\maketitle

Suppose $f:X\to S$. Show, if $C\subset X,$ then $f^{-1}(f(C))\supset C$ and give an example to show the inclusion can be strict.

\bigskip

Let $D=f(C)$ and suppose $x\in C$. It follows that $y=f(x)\in D$ and thus, by the definition of inverse image, $x\in f^{-1}(D)=f^{-1}(f(C))$ and the inclusion follows.

To see that the reverse inclusion does not hold in general, let $X=\{0,1\}$ and $S=\{0\}$ and define $f:X\to S$ by $f(x)=0$ for $x\in X$ (the only possible definition for $f$). Choose $C=\{0\}$ and note that $f(C)=\{0\}$ and hence $f^{-1}(f(C))=f^{-1}(\{0\}) =X\ne C$.
\newpage

Here are some other potentially useful typesetting commands.
\[
\begin{aligned}
\int_a^b f\, dx \\
\sum_{j=1}^\infty a_j \\
\lim_{n\to\infty} b_n \\
\|x\|\\
\dots\\
\cdots\\
\ldots\\
\frac{a}{b}\\
A\setminus B \\
\tilde{A}\\
\end{aligned}
\]
\vskip 1 in
% the aligned environment aligns the material separated by the double backslash. The split environment, below, alings the lines separated by double backslash according to the ampersands.
\[
\begin{split}
f(x)=& \lim \frac{g(x+h)-g(x)}{h}\\
=& g^\prime(x).
\end{split}
\]
\bigskip
The {\it detexify} website offers a convenient way to search for latex commands.

\end{document}



Sample homework (problem 9.1) using the template.

\documentclass[12pt]{amsart}

\textwidth = 6.2 in
\textheight = 8.5 in
\oddsidemargin = 0.0 in
\evensidemargin = 0.0 in
\topmargin = 0.0 in
\headheight = 0.0 in
\headsep = 0.3 in
\parskip = 0.05 in
\parindent = 0.3 in

\usepackage{enumerate}
\usepackage{amsmath}
\usepackage{color}
\def\cc{\color{blue}}
\usepackage[normalem]{ulem}

\title{Homework 0}
\author{Scott McCullough}

\begin{document}
\maketitle

Suppose $X$ is a set and $g:X\to\mathbb R$. Define, for $n\in\mathbb N^+$, a sequence of functions $f_n:X\to\mathbb R$ by $f_n(x)=g(x)^n$. Show,
\begin{enumerate}[(i)]
\item $(f_n)$ converges pointwise if and only if the range of $g$ lies in $(-1,1]$; and
\item $(f_n)$ converges uniformly if and only if there exist an $0\le a<1$ such the range of $g$ lies in $[-a,a]\cup\{1\}$.
\end{enumerate}

\bigskip

To prove (i), first suppose that the range of $g$ lies in $(-1,1]$. Given $x\in X$, since $g(x)$ lies in $[-1,1],$ the sequence $a_n = g(x)^n$ converges. Hence $(f_n)$ converges pointwise. Conversely, if there exists an $x\in X$ such that $g(x)\notin (-1,1]$, then $(b_n = g(x)^n)$ does not converge and hence $(f_n)$ does not converge pointwise.

To prove (ii), suppose such an $a$ exists. To prove that the sequence $(f_n)$ converges uniformly to the function $f:X\to \mathbb R$ defined by
\begin{equation}
\label{eq:f}
f(x) =\begin{cases} 0 & \mbox{if} \ \ |g(x)|< b \\
1 & \mbox{if} \ \ g(x)=1, \end{cases}
\end{equation}
where $a<b0$ be given. The sequence $(a^n)$ converges to $0$. Hence there is an $N$ such that if $n\ge N$, then
$0\le a^n<\epsilon$. Let $n\ge N$ and $x\in X$ be given. If $|g(x)|\le a$, then
\begin{equation*}
|f_n(x)-f(x)| = |f_n(x)-0| \le a^n <\epsilon
\end{equation*}
On the other hand, if $g(x)=1$, then
\[
|f_n(x)-f(x)| = 0 <\epsilon
\]
and the conclusion follows.

Now suppose no such $a$ exists. By part (i) we can assume that the range of $g$ lies in $(-1,1]$ and $(f_n)$ converges to the function $f$ defined in Equation \eqref{eq:f} with $b=1$. It suffices to show that $(f_n)$ does not converge uniformly to this $f$. To this end, fix $0<\eta|g(x_n)|> (\frac 12)^{\frac 1n}$. Hence,
\[
|f_n(x_n)-f(x_n)| = |g(x_n)|^n > \frac12 >\eta
\]
and the desired conclusion follows.

\end{document}