%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%% LaTeX Example File #2 %%%%%%
%%%%%% Modified 24-Aug-2012  %%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% The use of a "%" at the beginning of a line denotes a comment

%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Document settings %%%
%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[12pt]{article}
%This tells Latex the font size to use and what type of document
%we are making.  For us, article is what we will use.

%Packages contain extra information that is contained in Latex proper.

\usepackage{amsfonts} %Loads Special Fonts used in Math mode
\usepackage{amssymb}  %Loads Special Symbols used in Math mode
\usepackage{amsthm}   %Allows use of Theorem environment
\usepackage{amsmath}  %More fun stuff used in Math mode

%Make nice margins

\setlength{\oddsidemargin}{-0.1in} \setlength{\textwidth}{6.5in}
\setlength{\topmargin}{-.75in} \setlength{\textheight}{9.75in}

%%%%%%%%%%%%%%%%%%%%%%%%%
%%%   Document Text   %%%
%%%%%%%%%%%%%%%%%%%%%%%%%

\linespread{1.1} %Put some extra space between the lines.

\begin{document}


% This will be the standard header to put on all of your homework, so you
% only need to change it to your section number, Homework number, and your name

\noindent {\sc Math 290 Section 003 \hfill Example \LaTeX~File 2 }

\bigskip

% When reading this, notice the following:
% - every { is followed by a }
% - every \begin{...} is followed by a \end{...}
% - every $ is followed by a $
% - every \[ is followed by a \]

\textbf{Problem 1}: Define $A_n = \{x \in \mathbb{R}: \frac{-1}{n}
\leq x \leq \frac{1}{n}\}$.  Find $\bigcap_{n =1}^\infty A_n$ and
$\bigcup_{n =1}^\infty A_n$.
% A "$" signals that you are writing an equation in mathmode.  A second "$"
% signals that your equation is finished.
% In the equation $\bigcap_{n =1}^\infty A_n$, the "^" signifies that "\infty"
% will be a superscript and the "_" signifies that "n" is a subscript.

\medskip

\textbf{Solution}:  For an element $x$ to belong to the set
$\bigcap_{n =1}^\infty A_n$, it is necessary that $x$ belongs to all
the sets $A_1,~A_2,~A_3, \dots$.
% math mode gets rid of extraneous space in equations.  We use the "~"
% to signify that we want a regular space.
That is, for all integers $n \geq 1$, we must have $\frac{-1}{n}
\leq x \leq \frac{1}{n}$.  Since
$\lim_{n\rightarrow\infty}\frac{-1}{n} = 0 =
\lim_{n\rightarrow\infty}\frac{1}{n}$, it follows that $x = 0$. That
is,
\[\bigcap_{n =1}^\infty A_n = \{0\}.\]
% A "\[" says that you are writing an equation in mathmode and that you
% want it to be on its own line and centered.  A "\]" ends this.

For an element $x$ to belong to the set $\bigcup_{n =1}^\infty A_n$,
it is necessary that $x$ belongs to the set $A_n$ for some $n \geq
1$. Given positive integers $m$ and $n$, the inequality $\frac{1}{n}
\leq \frac{1}{m}$ holds if and only if $m \leq n$.  Therefore, it
follows that $A_1 \supseteq A_2 \supseteq A_3 \supseteq \cdots$.
Thus,
\[\bigcup_{n =1}^\infty A_n = A_1 = \{x \in \mathbb{R} : -1
\leq x \leq 1\}.\]

\bigskip

\textbf{Problem 2}:  Derive the quadratic formula.  That is, given
the quadratic equation \[f(x) = ax^2 + bx + c,\] with $a\neq 0$,
show that the roots of $f(x)$ are $x = \frac{-b +
\sqrt{b^2-4ac}}{2a}$ and $x = \frac{-b - \sqrt{b^2-4ac}}{2a}$.

\medskip

\textbf{Solution}: In order to find the roots of the quadratic $ax^2
+ bx + c = 0$, we will use the method of completing the square as
follows.
% The command "\begin{eqnarray}" starts an equation array.  You can see in
% the pdf file what this is... It is a bunch of equations linked by an "=" sign.
% An "&" signifies that that location is where you want a column.
% You can have at most 2 &'s in each line.
% See what happens when you remove the "*".....
\begin{eqnarray*}%Try to do this quickly in equation editor...
ax^2 + bx + c  &=& 0 \\
x^2 + \frac{b}{a} x  &=& -\frac{c}{a}\\
x^2 + \frac{b}{a} x  + \left(\frac{b}{2a}\right)^2 &=& -\frac{c}{a}+ \left(\frac{b}{2a}\right)^2\\
\left(x + \frac{b}{2a}\right)^2 &=& \frac{b^2 - 4ac}{4a^2}\\
x + \frac{b}{2a} &=& \pm\sqrt{\frac{b^2 - 4ac}{4a^2}}\\
x &=& -\frac{b}{2a}\pm\sqrt{\frac{b^2 - 4ac}{4a^2}}\\
  &=& \frac{-b \pm\sqrt{b^2 - 4ac}}{2a}
\end{eqnarray*}
Thus, the roots of $f(x)$ are \[x = \frac{-b \pm\sqrt{b^2 -
4ac}}{2a}.\]


\bigskip


\end{document}
