% This is the preamble. 
% Anything after a % is a comment that will not show up on my pdf! 

\documentclass[12pt]{amsart} %Change the default font size and document style. I usually use amsart or article. 

%These are the packages I might use. 

\usepackage{amsmath,amsfonts,amssymb} 
%\usepackage[top=.8in,bottom=.5in,left=1in,right=1in]{geometry}
\usepackage{geometry}                % See geometry.pdf to learn the layout options. There are lots.
\geometry{letterpaper}                   % ... or a4paper or a5paper or ... 
%\geometry{landscape}                % Activate for for rotated page geometry
\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{comment}
\usepackage{enumerate}
\usepackage{enumitem}
\usepackage{multicol}
%\setlength{\columnsep}{1cm}
%\usepackage{paralist}
\usepackage{tabto}
\usepackage{verbatim}

\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
\setlength{\parindent}{0mm}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}{Lemma}[section]
\newtheorem{prop}{Proposition}[section]

\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]
\numberwithin{equation}{section}
\newtheorem{remark}{Remark}
\newtheorem{claim}{Claim}
\newtheorem{exercise}{Exercise}
\newtheorem{example}{Example}
\newtheorem*{notation*}{Notation}


% I really like shortcuts. Here are some common ones I put in all my docs. 
\newcommand{\C}{{\mathbb C}}
\renewcommand{\P}{{\mathbb P}}
\newcommand{\R}{{\mathbb R}}
\newcommand{\Z}{{\mathbb Z}}
\newcommand{\K}{{\mathbb K}}
\newcommand{\N}{{\mathbb N}}
\newcommand{\Q}{{\mathbb Q}}
\newcommand{\J}{{\mathbb J}}
\newcommand{\I}{{\mathbb I}}

\newcommand{\sgn}{\text{sgn}}
\newcommand{\pv}{\text{p.v.}}
\newcommand{\U}{{\mathcal U}}
  
\newcommand{\fl}[1]{\lfloor #1 \rfloor} 
\newcommand{\abs}[1]{\mid#1\mid} 
\newcommand{\vect}[1]{{\langle}#1{\rangle}}

% I made even shorter shortcuts for vectors when doing multivariable calc. 
\newcommand{\vv}{\vec{v}}
\newcommand{\vu}{\vec{u}}
\newcommand{\vr}{\vec{r}}
\newcommand{\va}{\vec{a}}
\newcommand{\vb}{\vec{b}}
\newcommand{\vc}{\vec{c}}
\newcommand{\vn}{\vec{n}}
\newcommand{\vi}{\vec{i}}
\newcommand{\vj}{\vec{j}}
\newcommand{\vk}{\vec{k}}


\pagestyle{empty} %This removes the numbers from my pages 

                                   
\begin{document} %You have to begin and end the document. 

\title{Introduction to LaTeX}
\author{Allison Tanguay}
\date{}

\maketitle % A lot of commands are pretty self-explanatory... 

\thispagestyle{empty} %This removes page numbers and headers/footers from a given page. 

\section{Format and Font} % Starts a new section. 

You can just start typing normally. 

\begin{center}
You can center something. 
\end{center}

You can use \textbf{bold}. 
You can use \emph{italics}. 
You can even \underline{underline}. 

This document uses a 12 point font size, but you can write {\small smaller} or {\Small smaller} or {\tiny smaller}. 

You can also write {\large larger} and {\Large larger} and {\LARGE larger} and {\Huge larger} \dots 

You can \underline{\textbf{\Large combine}} these styles \dots \\


\section{Horizontal Space}

Leaving more than one space between          words  does not change the output. \\

But you can create a little \; space \; like this.  \\
You can create a little more \qquad like this. \\
You can have as much \hspace{1in} space as you like.  \\

\newpage

\section{Vertical Space}

A new line in the source document does not change the output. 
A new line in the source document does not change the output. 
A new line in the source document does not change the output. 

Leaving a line blank starts a new paragraph. 

Double backslash starts a new line. \\
Double backslash starts a new line. 

You can use bigskip 

\bigskip

to skip a line. 

You can use vspace 

\vspace{1in}

to create as much space as you want between lines. 

You can start a new page like this. 

\newpage


\section{Lists}

Now I want to make a list. 

\begin{itemize}
    \item first thing on my list
    \begin{itemize}
        \item list within a list
        \item another thing on my sublist
    \end{itemize}
    \item second thing on my main list
\end{itemize}

Now I want to number my list. 

\begin{enumerate}
    \item yellow
    \begin{enumerate}
        \item flowers
        \begin{enumerate}
        \item sunflowers
        \item chamomile
        \item arnica 
        \end{enumerate}
        \item my highlighter
    \end{enumerate}
    \item blue
\end{enumerate}

I can specify my own labels on a list. 

\begin{enumerate}
\item[A.] is for Allison 
\item[B.] Ball 
\end{enumerate}

\newpage

\section{Math}

\subsection{Math environments} %Start a subsection of my section 

We can use dollar signs to write mathematical expressions $a+b<2$ in the middle of a line (inline). (If you ever want to type a dollar sign, do this \$.) Some expressions, like $\lim_{x\to1}f(x)$, don't always look so great when you write then inline. You can see if displaystyle, like $\displaystyle \lim_{x\to1}f(x)$, makes them look better. 

You can use double dollar signs to write equations centered on their own line. 
$$ x^2+y^2 \le 9$$
Backslash square brackets around an expression does the exact same thing. 
\[ x^2+y^2 \le 9\]
You can give an equation a number using the equation environment
\begin{equation}
    \int_a^b f(x) dx = \frac{5}{9}
\end{equation}
or use the * to take the number away if you change your mind. 
\begin{equation*}
    \int_a^b f(x) dx = \frac{5}{9}
\end{equation*}
You can label a numbered equation and refer back to it later. (Sometimes you have to typeset twice before the numbers will show up.)
\begin{equation} \label{euler}
    e^{i\pi} + 1 = 0
\end{equation}
Equation \eqref{euler} is Euler's equation. 

You can use the align environment for longer arguments. 
\begin{align} 
|x-y| &= |x-a+a-y| \\
&\le |x-a| + |a-y|
\end{align} 

Use align* to take all the numbering away. Use nonumber to remove the numbering from a single line. 
\begin{align} 
|x-y| &= |x-a+a-y| \nonumber \\
&\le |x-a| + |a-y|
\end{align} 

\subsection{Theorems, proofs, and stuff like that.} 

I can write a theorem. 

\begin{theorem}
Everything I say is true. 
\end{theorem}

\begin{proof}
This is true because I said so. 
\end{proof}

Ok, that's not really a proof. I'll change it to a claim. 

\begin{claim} Everything I say is true.
\end{claim} 

Ok, here is something that is true. 

\begin{notation*}
We write $\displaystyle \frac{dy}{dx} = f'(x)$. 
\end{notation*}

Notice the different ways these are labeled and look at how they are defined in the preamble. You can change these settings if you want. 

\subsection{More examples.} 

Here are some examples from other stuff I have written. I can cite them like this \cite{AJT}. My references appear at the end of the document. (Sometimes you have to typeset twice to get citations to work.) 

\begin{exercise}
 Let $\vec{u}= \begin{pmatrix} -1\\2 \end{pmatrix}$ and $\vec{v}= \begin{pmatrix} 1\\-1 \end{pmatrix}$. Find the projection $\text{proj}_{\vec{v}}\vec{u}$ of $\vec{u}$ onto $\vec{v}$. Draw each of these vectors in the same coordinate plane. 

\emph{Solution.} 
$$ \text{proj}_{\vec{v}}\vec{u}=\frac{\vv \cdot \vu}{|\vv|^2}\vv = \frac{-3}{2}\begin{pmatrix} 1\\-1 \end{pmatrix}=\begin{pmatrix} -3/2\\3/2 \end{pmatrix}$$
\end{exercise}

\begin{exercise}
Let $z=x+iy$ be a complex number (i.e. $z\in\C$) with $x,y \in \R$ and $i^2=-1$. Define the modulus $|z|$ and complex conjugate $\bar{z}$ of $z$, respectively, by 
\[ |z|=(x^2+y^2)^{1/2} \qquad \text{and} \qquad \bar{z}=x-iy\]
\begin{enumerate}
\item Show that $|\lambda z| = |\lambda| |z|$ if $\lambda \in \R$. \\
\emph{Solution.} 
\[ |\lambda z| = \sqrt{(\lambda x)^2 + (\lambda y)^2} = \sqrt{\lambda^2}\sqrt{x^2+y^2}= |\lambda||z| \]

\item Show that $|z_1z_2|=|z_1||z_2|$ if $z_1,z_2\in\C$. \\
\emph{Solution.} 
\begin{align*} |z_1z_2| &= |(x_1x_2-y_1y_2) + i(x_1y_2+x_2y_1)|\\
&= \sqrt{(x_1x_2-y_1y_2)^2 + (x_1y_2+x_2y_1)^2} \\
&= \sqrt{x_1^2x_2^2+ y_1^2y_2^2+ x_1^2y_2^2+x_2^2y_1^2} \\
&= \sqrt{(x_1^2+y_1^2)(x_2^2+ y_2^2)} =|z_1z_2|
\end{align*}

\item Show that $|z|^2=z\bar{z}$. \\
\emph{Solution.} 
\[ z\bar{z}=(x+iy)(x-iy)=x^2+y^2 = |z|^2\]

\end{enumerate}
\end{exercise} 

\begin{exercise}
For $z\in \C$ a complex number, define the exponential function 
\[ e^z = \sum_{n=0}^\infty \frac{z^n}{n!} \]
Show that this series converges absolutely for all $z$, i.e. show that $\displaystyle \sum_{n=0}^\infty \left|\frac{z^n}{n!} \right| $ converges. 

\emph{Solution.} We apply the ratio test to the series $\displaystyle \sum_{n=0}^\infty \frac{|z|^n}{n!}  $ 

\begin{align*} 
\lim_{n\to\infty} \frac{a_{n+1}}{a_n}=\lim_{n\to\infty} \frac{|z|^{n+1}}{(n+1)!} \frac{n!}{|z|^n} &= \lim_{n\to\infty} \frac{|z|}{n+1} = 0
\end{align*}
Thus, the series converges for all $z$. 
\end{exercise} 

\begin{exercise}
Suppose that $f(x)$ is periodic with period $2\pi$. Show that for any number $a$ we have 
\[ \int_{-\pi}^\pi f(x) \; dx = \int_{a-\pi}^{a+\pi} f(x) \; dx \]
\emph{Solution.} 
\begin{align*}
 \int_{-\pi}^\pi f(x) \; dx &= \int_{-\pi}^{a+\pi} f(x) \; dx + \int_{a+\pi}^{\pi} f(x)\;dx \\
 &= \int_{-\pi}^{a+\pi} f(x) \; dx + \int_{a-\pi}^{-\pi} f(u+2\pi)\;du\\
 &= \int_{-\pi}^{a+\pi} f(x) \; dx + \int_{a-\pi}^{-\pi} f(u)\;du\\
  &= \int_{a-\pi}^{a+\pi} f(x) \; dx  \\
 \end{align*}
 \end{exercise}

\begin{exercise}
Consider the steady-state heat equation (Laplace's equation) in the upper half-plane. 
\begin{equation*} 
\left\{
 \begin{array}{ll}
u_{xx}+u_{yy}=0 &-\infty<x<\infty, \; y>0\\
\\
  u(x,0)=f(x)  & x \in \R
 \end{array} \right.
\end{equation*}
 Use the Fourier transform to show that the {bounded} solution is $u(x,y)=(f*\mathcal{P}_y)(x)$, where $\mathcal{P}_y$ is the \emph{Poisson kernel for the upper half-plane}, $\displaystyle \mathcal{P}_y(x)=\frac{1}{\pi}\frac{y}{x^2+y^2}$.\\
 
\emph{Solution:} Taking the Fourier transform in $x$, we have 
\[ -\xi^2 \widehat{u}(\xi,y)+\frac{\partial^2 \widehat{u}}{\partial y^2}(\xi,y)=0\]
For fixed $\xi$, this is an ODE for $\widehat{u}(\xi,\cdot)$ and the solutions are 
\[ \widehat{u}(\xi,y)= A(\xi)e^{-|\xi|y} + B(\xi)e^{|\xi|y}\]
Since the second term is unbounded on the upper half-plane, we take $B(\xi)=0$. So $\widehat{u}(\xi,y)= A(\xi)e^{-|\xi|y}$. From the boundary condition we have $\widehat{u}(\xi,0)=\widehat{f}(\xi)$. Thus, $\widehat{u}(\xi,y)= \widehat{f}(\xi)e^{-|\xi|y}$. 

Now if $\widehat{p}_y(\xi)=e^{-|\xi|y}$, then $\widehat{u}(\xi,y)= \widehat{f}(\xi)\widehat{p}_y(\xi)$. And since $\widehat{f*p_y}(\xi)=\sqrt{2\pi}\widehat{f}(\xi)\widehat{p}_y(\xi)$, taking inverse Fourier transforms gives $u(x,y)=\frac{1}{\sqrt{2\pi}}(f*p_y)(x)$. 

Note that for $a>0$ the Fourier transform of $g(x)=e^{-a|x|}$ is $\widehat{g}(\xi)=\sqrt{\frac{2}{\pi}} \frac{a}{a^2+\xi^2}$, and $\check{g}(x)=\widehat{g}(-x)=\widehat{g}(x)$ since $\widehat{g}$ is even. Thus, we take $p_y(x)= \sqrt{\frac{2}{\pi}} \frac{y}{y^2+x^2}$ so that $\widehat{p}_y(\xi)=e^{-y|\xi|}$ as desired. 

Then 
\begin{align*} u(x,y)&=\frac{1}{\sqrt{2\pi}}(f*p_y)(x)\\
&=\frac{1}{\sqrt{2\pi}}\sqrt{\frac{2}{\pi}}\int_{-\infty}^\infty f(x-t) \frac{y}{y^2+t^2}\;dt\\
&=\frac{1}{{\pi}}\int_{-\infty}^\infty f(x-t) \frac{y}{y^2+t^2}\;dt \\
&= (f*\mathcal{P}_y)(x)
\end{align*}
where $\mathcal{P}_y = \frac{1}{\sqrt{2\pi}}p_y$. 

\end{exercise}


\begin{exercise}
Consider the linear system 
$$\displaystyle \begin{pmatrix} x'\\  y' \end{pmatrix} = \begin{pmatrix} 1 &1\\  -10& 3\end{pmatrix}  \begin{pmatrix} x\\  y \end{pmatrix}.$$

One eigenvalue of the matrix above is $\lambda=2+3i$ and a corresponding eigenvector is 
$v=\begin{pmatrix} 1-3i \\  10\end{pmatrix}$.   
Find two linearly independent real-valued solutions $Y_1$ and $Y_2$ of this system.  
\end{exercise}
\emph{Solution.} Left to the reader. 

\bigskip
\bigskip
\bigskip


This is getting pretty complicated\dots Take a break and enjoy this comic. \\

\begin{center}
\includegraphics[scale=.55]{chaos}\\
{\tiny Chaos,  https://xkcd.com/1399/}
\end{center}





\begin{thebibliography}{10}

\bibitem[1]{AJT}{\em Allison J. Tanguay},  Something that I wrote one time \dots 

\end{thebibliography}



\end{document}



I can write whatever I want after I end the document and it will never be seen!!!!!! 








