LaTeX example

advertisement
LaTeX example
Using TeX allows you to create professional-quality documents with mathematical symbols without too much trouble. When you want to use text,
simply type. Starting a new line will give you a new paragraph, which is
automatically indented. If you don't want it indented, precede that line with
noindent with a backslash in front of it. Where TeX really shines though is
in math mode. If you want to use math mode inside a paragraph, use the $
to enter math mode and use $ again to exit. For example, the general form
0) = 0. Often, you will want to use math
of a rst order ODE is (
symbols on lines by themselves; do this with the square brackets [ and ]. For
instance the general solution of the ODE 0 + ( ) = ( ) is given by
f t; y; y
y
?P (t) + e?P (t)
y = Ce
p t y
Zt
t0
e
q t
P (s) q (s) ds
where ( ) is an antiderivative of ( ). In the previous line the ; is used to
add a little space.
You can also label equations so that it is easy to refer to them later. For
exmple, if j j 1,
P t
p t
x
<
1
1 =X
j =1+ +
1?
x
x
x
j =0
x
2
+
3
x
+
(1)
:
P
j
Then plugging = into equation (1), we get that 1
j (1 2) = 2. To
make sure that this referencing is done correctly, you will need to tex the
document twice.
You can also use tex to construct arrays or tables. For instance, consider
the initial value problem:
x
1
2
=0
0
=
( ) =
y
y t0
y
2
=
? (sin ) + 4
y
t
y0
In this example the rcl in braces appearing after the begin command sets
up an array with three columns, the rst right-justied, the second centered
and the third left-justied. The & is used to denote the end of one column
and the beginning of the next. When you reach the end of a row in the array
(other than the last one), type two backslashes. This will begin a new row.
1
Download