\documentclass{amsart}
\begin{document}
%Please read each comment before typesetting.
An inline equation may differ from a display equation, for example the inline equation $\frac{x}{2} + 3 = 5$ appears different than the display form,
\[
\frac{x}{2} + 3 = 5.
\]
You can force an inline equation to be formated in display style, using the same example, $\displaystyle \frac{x}{2} + 3 = 5$ is still inline, but now it looks more like a display style equation. Make sure you can tell the difference.
Some inline equations look exactly like display equations. For example, the inline form of $2x+3=5$ is the same as the display version
\[
2x+3=5
\]
Be careful!
%Now let's look at some simple building blocks.
Here's the format for a fraction:
\[
\frac{a}{b}.
\]
Here's the format for a square root:
\[
\sqrt{x}.
\]
Here's the format for the $n^{\rm{th}}$ root:
\[
\sqrt[n]{x}.
\]
Here's the format for a variety of common functions:
\[
\sin x, \quad \cos x, \quad \tan x, \quad \ln x, \quad \arcsin x, \quad \sinh x.
\]
Now let's use the above building blocks to construct the quadratic formula. That is, given $ax^2 + bx + c = 0$, where $a \neq 0$,
\[
x = \frac{-b \pm \sqrt{b^2 - 4 a c}}{2a}.
\]
Okay, I'm using some commands that you've haven't seen, but I think you can figure them out.
Now, let's look at the format for limits.
\[
\lim_{x \to a} f(x)
\]
Okay, let's build a more complicated limit.
\[
\lim_{h \to 0} \frac{f(x+h) - f(x)}{h}
\]
One subtle point is that the letter x looks different than the scalar $x$, and the symbol $\times$ for multiplication is entirely different. Hard to tell in most people's handwriting, but it makes a hell of a difference when your typesetting. Yes, it's subtle, but it's an important difference that many beginners\footnote{Hate to generalize, but this egregious misunderstanding is most often evident in Microsoft Word documents.} fail to appreciate.
%The use of grouping symbols, and other troubles
Above we used parentheses without trouble, but what if we want
\[
f( \frac{x}{2} )?
\]
Wow, that looks really bad. To fix this, and in general I advise this use instead
\[
f \left( \frac{x}{2} \right).
\]
It looks way better. Let's now build an even more complicated function.
\[
f \left( x \right) = \left[ \sqrt[5]{\frac{x^2+2x-3}{x^3-3x^2+5x-9}} - \left( \frac{x}{1+x^2}\right)^5 \right]^{\frac{2}{3}}
\]
Okay, it's complicated, but we're still using simple building blocks. One really important point is how the grouping symbols are properly proportion.
Now let's do a binomial coefficient.
\[
\binom{9}{3} = \frac{9!}{3! 6!} = 42
\]
You may recall that these coefficients are often written as
\[
_nC_r = \binom{n}{r} = \frac{n!}{r! \left( n - r \right)!}.
\]
Please make special note at how I got the $n$ and $r$ to be subscripted. Mistakes can easily happen if you're not careful, for example
\[
_15C_11 = \binom{15}{11} = \frac{15!}{11! \left( 15 - 11 \right)!}
\]
looks really bad. So let's correct it
\[
_{15}C_{11} = \binom{15}{11} = \frac{15!}{11! \left( 15 - 11 \right)!}.
\]
Now let's do a sum
\[
\sum_{n=1}^{10} n = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 = 55.
\]
It's pretty obvious. A more complicated version
\[
\sum_{n=0}^{\infty} \frac{5^n}{n!} = 1 + 5 + \frac{25}{2} + \frac{125}{6} + \dots + \frac{5^{100}}{100!} + \dots = e^5.
\]
Please note the simplicity of the building blocks. Yes, things can get difficult, and even the most ardent expert needs to consult \LaTeX{} documentation when they get stuck. For the most part, you'll become familiar with a lot of \LaTeX{} code, but on those occasions that you get stuck you may want to check around for utilities that will allow you to point-and-click your way. A good example is MathType, which will allow you to copy \LaTeX{} code directly from their graphical interface.\footnote{I'm pretty sure that MathType offers a free version for \LaTeX{} users. Yet one more reason to use \LaTeX!} For example, matrices can be tough to create, so here's a cut-and-paste example code:
\[
\left[
\begin{matrix}
1 & 2 & 3 \\
6 & 5 & 4 \\
9 & 8 & 7
\end{matrix}
\right].
\]
Again, don't fret about the details! However, take a careful look at the matrix and I think you'll easily get the idea of how to modify it. More importantly you'll almost never have to lift your hands from the keyboard to type mathematics. And on those rare occasions that you don't know a command, I'd say it's perfectly okay to use software to help!
%tweaking
Here's another example, with and without tweaks.
\[
\int_0^{\pi} \cos x dx = \left. \sin x \right]_0^{\pi} = \sin \pi - \sin 0 = 0
\]
I really don't like the way \LaTeX{} does this, so take a look at my tweak.
\[
\int_0^{\pi} \cos x \, \text{d} x = \left. \sin x \right]_0^{\pi} = \sin \pi - \sin 0 = 0
\]
Yes, I inserted a space and I changed the $d$ to a d. Most people don't bother to do this though. Anyway, tweaks are rarely done, and once you start typesetting math you'll become accustomed to doing things your way. It will take time, so please be patient and experiment. Yes, soon you'll be pleasantly surprised by how easy it is to type mathematics. And if your a Word/MathType users you will quickly abandon that painfully annoying software.
%alignment, numbering and labels
\LaTeX{} is not only really nice for typing mathematics, but for referencing it.
\begin{align}
1 &= \sin^2 x + \cos^2 x \label{E:PythTrig}\\
\sin 2x &= 2 \sin x \cos x \label{E:SineDoub}\\
\cos 2x &= \cos^2 x - \sin^2 x \label{E:CosineDoub}
\end{align}
Note the \emph{labels} next to these equations---now I can easily refer to any of these equations, for example I can refer to the sine of a double angle~(\ref{E:SineDoub}) very easily now. Or if I were on a different page I may refer to equation~(\ref{E:PythTrig}) on page~\pageref{E:PythTrig}. Again, if things change the references will update automatically.\footnote{\textbf{Note}: Typeset twice when you're updating references---\LaTeX{} needs a second pass to make sure the referencing is on target.}
Now let's move on to a modified version of the example on page 30 of our textbook.
\begin{align}
h \left( x \right) &= \int \left[ \frac{f \left( x \right) + g \left( x \right) }{1 + f^2 \left( x \right)} + \frac{1 + f \left( x \right) g \left( x \right)}{\sqrt{1 - \sin x}} \right] \, \text{d} x\\
&= \int \frac{1+ f \left( x \right) }{1 + g \left( x \right)} \, \text{d} x - 2 \arctan \left( x - 2 \right) \, \text{d} x \notag
\end{align}
%moving on
Sometimes you'll want to type text in your display~(\ref{E:EulerEq}) equations. For example
\begin{equation}
e^{i\pi}+1=0, \text{ where $i=\sqrt{-1}$.}\label{E:EulerEq}
\end{equation}
Yes, I am using a different form of the display equation environment. To automatically insert the parentheses in the reference~\eqref{E:EulerEq} istead! Yea, it's subtle, so I'd suggest using one or the other.
Again, you need to \emph{read}, and possible \emph{re-read} \textbf{Chapter 3} to make sense of this all. The book says a lot! However I think you're ready to move on to just one more simple example.
%useful allignments
\begin{align*}
a \left(b+c\right) &= ab + ac &&\text{Distributive Property of Multiplication}\\
a + b &= b + c &&\text{Commutative Property of Addition}\\
a + \left( b + c \right) &= \left( a + b \right) + c &&\text{Associative Property of Addition}
\end{align*}
Note how the text is being aligned, also note that these equations are not being numbered. Do you see why?
\end{document}