\documentclass[10pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}  % you need this package if you are inserting pictures
\usepackage{fancybox}  % you need this package if you use \shadowbox or \doublebox


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Create a header %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\renewcommand\headheight{20pt}
\renewcommand{\ps@myheadings}{%
    \renewcommand{\@oddhead}{  
    \scriptsize\hfil\parbox[b]{\textwidth}{\begin{center}
    Fall 2003 -- S. Tracogna \\
    \copyright 2003
    Arizona State University Department of Mathematics \& Statistics\end{center}}\hfil}
    \renewcommand{\@oddfoot}{}
    }
\makeatother
\pagestyle{myheadings}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\textheight 8.5in    % determines the height of the text in the page
\textwidth 6.5in     % determines the width of the text in the page

\hoffset= -1.5in    % determines the left margin 
\voffset= -1.0in    % gives the height of the top margin   

\begin{document}


%%%%%%%%%% The following latex commands create a box with text inside.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\fbox{\parbox{6.2in}{\textbf{MATxxx   \hspace*{1in}  Fall 2003 \hfill Stefania Tracogna } \vspace*{.3 in} \\ 
                  \centerline{\textbf{\large{\ovalbox{SOME} \shadowbox{LATEX} \doublebox{EXAMPLES}}}}                          \vspace*{.1in} \\
                  \vspace*{.2in}  \hspace*{3in} NAME \hrulefill}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vspace*{.3in} 

\underline{Instructions:} Show your work!


%%%%% two horizontal lines. Note the negative vspace to make the lines closer %%%%%%
\hrulefill
\vspace*{-0.09in} 

\hrulefill
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bigskip

\begin{enumerate}

\item  Example of a system, corresponding augmented matrix and determinant of the coefficient matrix

$\left\{ \begin{array}{ccc}
2 x + 3 y & = & -1\\
- x + 4 y & = &2 
\end{array} \right.$
\hspace*{1in}   %horizontal space in between the system and the matrix
$\left[ \begin{array}{rr|r}    
 2 & 3 & -1   \\ 
 -1 & 4 & 2
\end{array}\right] $
\hspace*{1in}
$\begin{vmatrix}
2 & 3 \\
-1 & 4 
\end{vmatrix}$

% Note how we inserted a vertical line in {cc|c}  (the c simply
% gives a central allignment to the elements of the array; other choices
% are l for left and r for right.
% if we substitute vmatrix with Vmatrix we get a matrix enclosed by || 
% if we use bmatrix we get a matrix enclosed by [
% if we use pmatrix we get a matrix enclosed by (


\vspace*{0.5in}   % this creates a vertical space


\item  Example of a \textit{simplex tableau}   
% Note that we put two arrays on top of each other, one for the
% variables and one for the actual tableau
% Note how we create a horizontal line in the matrix by using \hline

$\begin{array}{ccccccc} 
\;\; P & x_1 & x_2 &s_1 & s_2 & RHS 
\end{array}$ \\
$\left[ \begin{array}{cccccc|c}
0 & 1 & 2 & 1 & 0 && 2  \\ 
0 & 3 & 4 & 0 & 1 && 3\\
\hline
1 & -7 & -6 & 0 & 0 && 0
\end{array}\right] $

\vspace*{0.5in}   

\item Example of a \textbf {piecewise function}  
% Note the use of \mbox to insert text in a math equation

$f(x) = \left\{  \begin{array}{lcr}
1- 2 \sin x & \mbox{if} & x \le 0 \\
x^2    & \mbox{if} & x > 0 
\end{array} \right. $

\vspace*{0.5in}  



\item   EXAMPLE OF TABLE

The following table yields the numerical estimates of $y(0.5)$ using
$n = 4, 8, 16$ and $1000$ intervals, respectively:
\begin{table}[h]
\begin{center}
\begin{tabular}{|c||c|c|c|c|c|c|c|} \hline
n & 2 & 4 & 8 & 16 & 32 & 64 & 1000 \\\hline
estimate of $y(0.5)$ & 0.125 & 0.173 & 0.209 & 0.217 & 0.237 & & 0.246 \\\hline
\end{tabular}
\caption{This is table 1}
\end{center}
\end{table}

\item  Example of a \underline{labeled} equation

\begin{equation}\label{eq1}
A\mathbf{x}=\mathbf{b}
\end{equation}
Equation (\ref{eq1}) is ...


\newpage

\item  Inserting pictures

% picture on the left
This is a picture on the left\\
\includegraphics[height=1.5in]{figure1.eps}

% picture in the center
\begin{center} 
This is a picture in the center \\
\includegraphics[height=1.5in]{figure1.eps}
\end{center}

% picture on the right
\begin{flushright}
This is a picture on the right \\
\includegraphics[height=1.5in]{figure1.eps}
\end{flushright}



\item Example of two pictures in a row

% Note that we need minipage to put two or more pictures in a row.

\begin{minipage}[b]{.46\linewidth}
\begin{center}
\includegraphics[height=1.5in]{figure1.eps} \\
This is Figure A.
\end{center}
\end{minipage} 
\hfill
\begin{minipage}[b]{.46\linewidth}
\begin{center}
\includegraphics[height=1.5in]{figure1.eps} \\
This is Figure B.
\end{center}
\end{minipage}



\newpage
\item Example of a picture with some text on the side 


\begin{minipage}[h]{.46\linewidth}
This is an example of  a picture with some
text on the right and the picture to the left.
The length of each line of text is determined by
the linewidth above.
\end{minipage} 
\hfill
\begin{minipage}[h]{.46\linewidth}
\begin{center}
\includegraphics[height=1.5in]{figure1.eps} \\
This is Figure B.
\end{center}
\end{minipage}

\bigskip
\item Example of a picture with some \fbox{boxed} text on the side 
\vspace*{0.2in}


\begin{minipage}[h]{.46\linewidth}
\fbox{\parbox{3in}{Consider the picture on the left (Figure C) and answer the following questions
 \vspace*{.3 in} \\ 
a) How many relative maximum are there? 
\vspace*{.1in} \\ 
Answer: \hrulefill
  \vspace*{.1in} \\
b) How many relative minima are there?
                  \vspace*{.1in} \\
Answer: \hrulefill
\vspace*{.1in} \\ }}
\end{minipage} 
\hfill
\begin{minipage}[h]{.46\linewidth}
\begin{center}
\includegraphics[height=1.8in]{figure1.eps} \\
This is Figure C.
\end{center}
\end{minipage}

\bigskip
\item Example of 3 pictures in a row

\begin{minipage}[b]{.25\linewidth}
\centering\includegraphics[height=1.5in]{figure1.eps}
\end{minipage} 
\hfill
\begin{minipage}[b]{.25\linewidth}
\centering\includegraphics[height=1.5in]{figure1.eps}
\end{minipage}
\hfill
\begin{minipage}[b]{.25\linewidth}
\centering\includegraphics[height=1.5in]{figure1.eps}
\end{minipage}

\item Picture with caption

% Note that the caption will always include "Figure 1:" . Also, if we want to include the caption
% we need to include the float environment \begin{figure} but if you do that we don't have 
% total control on where the picture will be put on the page. If there is not enough space latex
% will put the picture "somewhere" in the next page.

\begin{figure}[ht]
\begin{center} 
\includegraphics[height=1.5in]{figure1.eps}
\end{center}
\caption{This is a centered figure with caption!}
\end{figure}

\newpage

\item Example of some Calculus formulas

\begin{itemize}

\item Vectors

\begin{enumerate}
\item[-] notations:
$\overrightarrow{AB}=\langle x_B-x_A,y_B-y_A\rangle$,
$\vec{a}=\langle a_1,a_2\rangle$
\item[-] length:
$|\overrightarrow{AB}|=\sqrt{(x_B-x_A)^2+(y_B-y_A)^2}$,
$|\vec{a}|=\sqrt{a_1^2+a_2^2}$
\item[-] Dot product: $\langle a_1,a_2\rangle
\cdot \langle b_1,b_2 \rangle = a_1 b_1 + a_2 b_2 $
\item[-] Perpendicular: $\vec{a} \perp \vec{b}$ if and only if $\vec{a}
\cdot \vec{b} = 0 $
\item[-] Cross product: $\langle a_1,a_2,a_3 \rangle \times
\langle b_1,b_2,b_3 \rangle = \begin{vmatrix} \vec{i}&\vec{j}&\vec{k}
\\ a_1& a_2& a_3 \\ b_1 & b_2& b_3 \end{vmatrix}$
\item[-] Parallel: $\vec{a} \parallel \vec{b}$ if and only if
$\vec{a} \times \vec{b} =\vec{0}$
\item[-] Vector function notation:
$\vec{r} :  \mathbb{R} \to \mathbb{R}^3$,  $\vec{r}(t)=\langle
r_1(t),r_2(t),r_3(t) \rangle$
\item[-] Limit: $\displaystyle \lim_{t \to a}\vec{r}(t)=
\langle \lim_{t \to a} r_1(t),\lim_{t \to a} r_2(t)\rangle $
\item[-] Derivative: $\displaystyle \vec{r}\;'(t)=
\lim_{h \to 0} \frac{\vec{r}(t+h)-\vec{r}(t)}{h}=\langle
r'_1(t),r'_2(t) \rangle$
\item[-] Fundamental Theorem: $\int_a^b \vec{r}(t)\; dt =
\vec{R}(b)-\vec{R}(a)$ where $\vec{R}\;'=\vec{r}$
\end{enumerate}


\item Directional derivative of $f:\mathbb{R}^2 \to \mathbb{R}$ in the direction
of the {\bf unit} vector $\vec{u}= \langle a,b \rangle$.

\begin{enumerate}
\item[-] Definition:
$D_{\vec{u}} f(x,y)=\frac{d}{dt}f(x,y)|_{t=0}$ where $x=x_0+ta$,
$y=y_0+ta$
\item[-] Formula: $D_{\vec{u}} f(x,y)=\nabla f(x,y)\cdot \vec{u}$

\end{enumerate}

\item Gradient vector
\begin{enumerate}
\item[-] Definition: $\nabla f(x,y)=\langle \frac{\partial}{\partial
x}f(x,y),\frac{\partial}{\partial y} f(x,y)\rangle$
\item[-] Maximum directional derivative: $D_{\vec{u}_{max}}f(x,y)=|\nabla
f(x,y)|$ when $\vec{u}_{max} = \frac{\nabla f(x,y)}{|\nabla f(x,y)|}$
\end{enumerate}

\item Double integral of $f:\mathbb{R}^2 \to \mathbb{R}$

\begin{enumerate}
\item[-] Definition:
$\displaystyle \iint _{[a,b]\times[c,d]} f(x,y) dA= \lim_{m,n \to \infty}
\sum_{i=0}^m \sum_{j=0}^n f(x_i,y_i) \triangle y \triangle x$
\item[-] Integral on a disjoint union: $\iint _{R_1\cup R_2} f(x,y)
dA=\iint_{R_1} f(x,y)\; dA + \iint_{R_2} f(x,y)\;  dA$
\end{enumerate}

\item Triple Integral of $f:\mathbb{R}^3 \to \mathbb{R}$
\begin{enumerate}
\item[-] Fubini's Theorem:$\iiint _{[a,b]\times[c,d]\times [m,n]} f(x,y,z) dV=
\int_a^b \int_c^d \int_m^n f(x,y,z)\; dz dy  dx = \ldots = \int_m^n
\int_c^d \int_a^b f(x,y,z)\;  dx   dy dz$
\item[-] Using projection on the $xy$ plane:
$\iint _{D} \int_{g_1(x,y)}^{g_2(x,y)} f(x,y,z)\; dz \; dA $ where $D$
is the projection and $g_1(x,y)$ and $g_2(x,y)$ are the lower and
upper bounds for $z$.
\item[-] Average value of $f$ on $B$: $\displaystyle \frac{1}{\mbox{Volume(B)}}\iiint_B
f(x,y,z)\; dV$
\end{enumerate}

\item Line integral of vector fields (If the curve is closed
the line integral is called {\bf circulation}):

\begin{enumerate}
\item[-] Notation: $\int_C \vec{F}\cdot d \vec{r} = \int_C \vec{F}
\cdot \vec{T} \; ds$, $\vec{T}$ is the unit tangent vector to the
curve C.
\item[-] Different notation: $\int_C P(x,y,z)\; dx + Q(x,y,z)\; dy +
R(x,y,z)\; dz$ where $\vec F = < P(x,y,z),Q(x,y,z),R(x,y,z) >$
\item[-] Evaluation: $\int_a^b \vec{F}(\vec{r}(t))\cdot
\vec{r}\;'(t) dt$
\item[-] Reversed path: $\int_{C_{rev}} \vec{F} \cdot d\vec{r} = -
\int_C \vec{F}\cdot d\vec{r}$
\item[-] Conservative: $\oint_C \vec{F}\cdot d \vec{r} = 0 $ for all simple
closed curve C.
\end{enumerate}

\item Rotation $\equiv $ curl

\begin{enumerate}
\item[-] Notation: curl $\vec{F}  = \nabla \times \vec{F}$
\item[-] Definition in 3D: $\begin{vmatrix} \vec{i}&\vec{j}&\vec{k}\\
\frac{\partial}{\partial x} & \frac{\partial}{\partial y}&
\frac{\partial}{\partial z}\\
P(x,y,z)&Q(x,y,z)& R(x,y,z)
\end{vmatrix}$
\end{enumerate}

\item Divergence

\begin{enumerate}
\item[-] Notation: div $\vec{F} = \nabla \cdot \vec{F}$
\item[-] Definition: $\frac{\partial}{\partial x} P(x,y,z)+
\frac{\partial}{\partial y} Q(x,y,z)+\frac{\partial}{\partial z}
R(x,y,z)$
\end{enumerate}

\item Surface integral of scalar field

\begin{enumerate}
\item[-] Evaluation: If the surface S is parametrized by $\vec r( u,v)$ with $u$ and $v$ in the
domain D, then:\\ $\iint_S f \; dS = \iint_D f(\vec{r}(u,v)) \; \vline \;
\vec{r}_u (u,v)\times \vec{r}_v (u,v)\; \vline \; dA$
\end{enumerate}

\item Surface (flux) integral of vector fields

\begin{enumerate}
\item[-]Notation: $\iint_S \vec{F} \cdot d \vec{S}$
\item[-] Alternative notation: $\iint_S \vec{F} \cdot \vec{n} \; dS$
where $\vec n$ is the normal vector to the oriented surface.
\item[-] Evaluation: $\pm \iint_R
\vec{F}(\vec{r}(u,v))\cdot(\vec{r}_u(u,v)\times \vec{r}_v
(u,v)) \; dA $  depending on the orientation.
\end{enumerate}

\item Stokes' theorem

\begin{enumerate}
\item[-] If $\vec{F}: \mathbb{R}^3 \to \mathbb{R}^3$ and $C$ is the
boundary of $S$ ($S$ is on the left of $C$) then $\oint_C
\vec{F} \cdot  d\vec{r} = \iint_S \nabla \times \vec{F} \cdot
d\vec{S}$
\end{enumerate}


\item Divergence theorem (Gauss' Theorem)

\begin{enumerate}
\item[-] If $\vec{F}: \mathbb{R}^3 \to \mathbb{R}^3$ and $S$ is the
boundary (outward orientation) of the solid $E$ then $\iint_S
\vec{F}\cdot d \vec{S} = \iiint _E \nabla \cdot \vec{F} \; dE$
\end{enumerate}

\end{itemize}

\end{enumerate}

\end{document} 