\documentclass[11pt]{article}

\usepackage{amssymb,amsmath}

\begin{document}

\newtheorem{theorem}{Theorem}[section]
\newtheorem{definition}[theorem]{Definition}



\parskip 1ex            % sets the gap between paragraphs
\parindent 0ex		% an ex is the width of an ex


\title{A Sample \TeX { }Document}
\author{David Handron}
\date{\today}

\maketitle

\begin{abstract}
This is an exercise highlight the main features of \LaTeX.  We will look 
at some things which would be used in calculus courses, and other 
introductory courses.  This can then be used as an example when producing 
other documents.
\end{abstract}

\section{Some things from 21-115}
The first calculus mini-course covers differentiation.  Before the derivative 
can be defined, though, we must know about limits.

\subsection{Limits}
Here is the definition of a limit.

\begin{definition}
We say that $\lim_{x\to a}=L$ if given any $\epsilon$, there is a $\delta$ 
such that $|f(x)-L|<\epsilon$ whenever $|x-a|<\delta$.
\end{definition}

Note the difference between $\lim_{x\to a}=L$ and
$$
\lim_{x\to a}=L.
$$
\LaTeX { }knows to save space in the inline equation by writing the limit $x\to a$
as a subscript.  In the displayed equation, $x\to a$ is placed under the limit,
where it belongs.

\subsection{derivatives}
There is no specific symbol in \LaTeX { }for a derivative, but it can be built up 
by making a fraction:
$$
\frac{dy}{dx}.
$$
So we might typeset something like
$$
\begin{array}{rcl}
y(x) & = & \sqrt{x^2+1} \\
\frac{dy}{dx} & = & \frac{x}{\sqrt{x^2+1}}
\end{array}
$$
Notice how I have used an array to line up the equations at the equal signs.
There are other more sophisticated ways to make things line up, but usually an 
array can be made to suffice.

Sometimes we want to use different notation to denote a derivative.  Given a 
function $f(x)$, we denote the derivative by ``$f$-prime''.  Hence we have 
$f'(x)$.  The second derivative is $f''(x)$.  To talk about the seventh 
derivative we would use the symbol $f^{(7)}(x)$.

\section{Some things from 21-116 - Integration}
Here is a nice integration problem: $\int_a^b x^2-x dx$.  And here is the 
solution:
$$
\begin{array}{rcl}
\int_a^b x^2-x dx & = & \left.\frac{x^3}{3}-\frac{x^2}{2}\right|^b_a \\
& = & \left(\frac{b^3}{3}-\frac{b^2}{2}\right)-\left(\frac{a^3}{3}-\frac{a^2}{2}\right) \\
& = & \frac{2b^3-3b^2}{6}-\frac{2a^3-3a^2}{6}.
\end{array}
$$

Anyone who has taken vector calculus has seen double and triple integrals and
path integrals.  \LaTeX { }has symbols for these as well:
$$
\iint \quad \iiint \quad \oint
$$
The command $\backslash$iint is preferred to $\backslash$int$\backslash$int, 
because the latter produces 
spacing that is too wide:
$$
\int\int
$$

\section{A Few Things About Differential Equations}
Actually, there is nothing special about differential equations as far as 
\LaTeX { }is concerned.  I wanted to use the idea of an initial value problem
to point out some things about spacing.

An initial value problem is a differential equation combined with an initial 
condition.
$$
\frac{dy}{dt}=f(t,y);y(y_0)=t_0.
$$
This is all well and good, but looks a bit cramped.  We can use the command
$\backslash$quad to insert a blank space:
$$
\frac{dy}{dt}=f(t,y) \quad;\quad y(y_0)=t_0.
$$
If this is not enough, use $\backslash$qquad.
$$
\frac{dy}{dt}=f(t,y) \qquad;\qquad y(y_0)=t_0.
$$
There are other commands for inserting other (smaller) spaces, but usually
this is good enough.

\section{Sequences and Series}

The main difficulty with sequences and series is just knowing the commands 
that will produce the appropriate symbols.  We can define a sequence
$$
a_n=\{3(\frac{2}{3})^n\}_{n=0}^\infty=\{3,2,\frac{4}{3},\frac{8}{9},\dots\}
$$

We can add all the terms of this sequence together to get an infinite series:
$$
a_0+a_1+a_2+\dots+a_n+\dots=\sum_{n=1}^\infty 3(\frac{2}{3})^n=\frac{3}{1-\frac{2}{3}}=9
$$

\section{Matrix Algebra}
Matrices are typeset by using an array command.  For instance, the rule for 
multiplying two $2\times2$ matrices together is given by
$$
\left[
\begin{array}{cc}
a & b \\
c & d
\end{array}
\right]
\left[
\begin{array}{cc}
e & f \\
g & h
\end{array}
\right]
=
\left[
\begin{array}{cc}
ae+bg & af+bh \\
ce+dg & cf+dh
\end{array}
\right]
$$

Now is also a good time to point out the difference between
$$
\left[
\begin{array}{cc}
a & b \\
c & d
\end{array}
\right]
\quad\mbox{ and }\quad
[
\begin{array}{cc}
a & b \\
c & d
\end{array}
].
$$
also between
$$
\left(\frac{3}{4}\right) \quad\mbox{ and }\quad (\frac{3}{4})
$$

\end{document}











