\RequirePackage[l2tabu, orthodox]{nag}
\documentclass[12pt, letterpaper, twocolumn]{article}
\usepackage{amsmath, amssymb, amsthm}
\usepackage{fullpage}
%\usepackage[margin=1in]{geometry}

\title{Formatting Math in \LaTeX{}}
\author{Jason Underdown}
\date{\today}

% various set symbols
\newcommand{\ZZ}{\mathbb{Z}}
\newcommand{\QQ}{\mathbb{Q}}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\CC}{\mathbb{C}}

% Upright d (used in integrals)
\newcommand{\ud}{\, \text{d}}

% Definite Integral
\newcommand{\defint}[4]{\int\limits_{#1}^{#2} #3 \ud #4}

% Set
\newcommand{\myset}[2]{\left\{ #1 \, \middle| \, #2 \right\} }

% Absolute Value
\newcommand{\abs}[1]{\left| #1 \right|}

% Laplace Transform
\DeclareMathOperator{\Lapl}{\mathscr{L}}
\newcommand{\La}[1]{\Lapl \left\{ #1 \right\}}
\newcommand{\invLa}[1]{\Lapl^{-1}\left\{ #1 \right\}}

% Integration by Parts
\newcommand{\intbyparts}[4]{%
\begin{IEEEeqnarray*}{rlcrl}
u &= #1 & \quad & dv &= #2 \; dt \\
du &= #3 & \quad & v &= #4
\end{IEEEeqnarray*}
}


\begin{document}
\maketitle
\begin{abstract}
  This article gives examples of some common math typesetting
  problems. View the source code to see how each example is done.
\end{abstract}


\section*{Intro}

\begin{enumerate}
\item $\lim_{h\rightarrow 0} \frac{f(x+h)-f(x)}{h} = f'(x)$
\item $\displaystyle\lim_{h\rightarrow 0} \frac{f(x+h)-f(x)}{h} = f'(x)$

\item $\ln x$

\item $\cos x$

\item $\int_a^b f(x) dx = F(b) - F(a)$

\item $\displaystyle\int\limits_a^b f(x) dx = F(b) - F(a)$

\item $\displaystyle\sum_{i=1}^n i = \frac{n(n+1)}{2}$

\item $x \in \Re$

\item $x \in \RR$

% Example matrix
\item $
  \begin{pmatrix}
    1 & 2 & 3 \\
    4 & 5 & 6 \\
    7 & 8 & 9
  \end{pmatrix}$

\item $\left( \displaystyle \int \limits_a^b f(x) dx \right)
\left[ \displaystyle\int\limits_a^b f(x) dx \right]$

% The following is the old way of formatting piecewise functions:
\item $|x| = \left\{
\begin{array}{cl}
-x & x<0 \\
x & x \ge 0
\end{array}
\right.$

% The cases environment provided by amsmath is more convenient
\item $|x| =
\begin{cases}
-x & x < 0 \\
\phantom{-}x & x \ge 0
\end{cases}$

\item $\displaystyle\defint{-2}{3}{f(t)}{t}$ (notice the upright ``d'')

\item $\QQ = \myset{\frac{a}{b}}{a,b \in \ZZ \text{ and } b \ne 0}$



\end{enumerate}

\end{document}
