Simple template for writing and submitting homework.
\documentclass[12pt,letterpaper]{article}
\usepackage{fullpage}
\usepackage[top=2cm, bottom=4.5cm, left=2.5cm, right=2.5cm]{geometry}
\usepackage{amsmath,amsthm,amsfonts,amssymb,amscd}
\usepackage{lastpage}
\usepackage{enumerate}
\usepackage{fancyhdr}
\usepackage{mathrsfs}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{listings}
\usepackage{hyperref}
\usepackage{txfonts}
\usepackage{titlesec}
\hypersetup{%
colorlinks=true,
linkcolor=blue,
linkbordercolor={0 0 1}
}
% Edit these as appropriate
\newcommand\course{CHEM 446/337}
\newcommand\hwnumber{1} % <-- homework number
\newcommand\MyName{Gilbert Gottfried} % <-- Your Name
\newcommand\MyID{gxg123} % <-- Your NetworkID
\renewcommand\lstlistingname{Algorithm}
\renewcommand\lstlistlistingname{Algorithms}
\def\lstlistingautorefname{Alg.}
\setlength{\parindent}{0.0in}
\setlength{\parskip}{0.05in}
\titleformat{\section}{\normalfont\bfseries}{Problem \thesection:}{1em}{}
\titleformat{\subsection}{\normalfont}{\thesubsection)}{2em}{}
\pagestyle{fancyplain}
\headheight 35pt
\lhead{\MyName{} (\MyID)}
\chead{\textbf{Homework \hwnumber}}
\rhead{\course \\ \today}
\lfoot{}
\cfoot{}
\rfoot{\small\thepage}
\headsep 1.5em
\begin{document}
% Start solutions here
\section{Integrals}
\subsection{Gaussian}
\begin{equation}
\int_{-\infty}^{\infty} dx e^{-\alpha x^2} = \sqrt{\frac{\pi}{\alpha}}
\end{equation}
\subsection{Trig functions}
Use \verb|\begin{align*}...\end{align}| for derivations.
\begin{align*}
\int_0^\pi \cos(x) \cos(3x) dx & = \\
& = \int_0^\pi \frac{1}{2}\left(\cos(4x) + \cos(2x)\right) dx \\
& = \frac{1}{2(4}\sin(4x)\Big|^\pi_0 + \frac{1}{2(2)}\sin(2x)\Big|^\pi_0 \\
& = 0
\end{align*}
\section{Linear Algebra}
\begin{equation}
\mathbf{H} = \begin{pmatrix}
E_0 & V \\
V & E_1
\end{pmatrix}
\end{equation}
\section{Quantum Mechanics}
\begin{equation}
\hat{H}|\Psi(t)\rangle = i \frac{\partial}{\partial t}|\Psi(t)\rangle
\end{equation}
\end{document}