You are on page 1of 6

Activity 6

Equations in LATEX
Floilyn T. Verzosa

1 Basic Equation
Mathematical expressions can be easily inserted in LaTeX. An example is
the addition of variables which is represented by
x+y =z (1)
where:
x = first addend;
y = second addend; and
z = sum of the variables.
Variable names must be, as much as possible, one letter only with subscript(s)
or superscript(s). In a document, a variable name should have only one
quantity being represented. In succeeding discussions this can be mentioned
as in(1).
The definition of variables can also be in sentence form. An example is
the multiplication of variables, which is represented by
uv =w
where u, v, and w represent the multiplicand, multiplier, and product of
the variables, respectively. In some cases, the definition will come first. For
example, quantity a is to be divided by another quantity b. Its quotient, c,
can be computed by the expression
a
c= . (2)
b

1
Table 1: LATEXcommands for inserting Greek letters in equation mode.
\alpha \theta o o \tau
\beta \vartheta \pi \upsilon
\gamma \iota $ \varpi \phi
\delta \kappa \rho \varphi
 \epsilon \lambda % \varrho \chi
\varepsilon \mu \sigma \psi
\zeta \nu \varsigma \omega
\eta \xi
\Gamma \Lambda \Sigma \Psi
\Delta \Xi \Upsilon \Omega
\Theta \Pi \Phi

2 Greek Letters
Greek letters can also be easily inserted in mathematical equations. The
document LaTeX Sysmbols.pdf can be used as a reference for the appropriate
commands. These are also summarized in this document, as shown in Table
1. When two or more letters appear side by side, make sure to put a space
after each command to avoid errors.

3 Super-and Subscripts
Given a function value and its derivatives at point d, the function value at
t can be estimated by the Taylor series of Taylors formula, defined by the
equation

0 f 00 (d) 2 f
(3)
(d) 3 f (n) (d)
f (t) = f (d)+f (d)(td)+ (td) + (td) +. . . + (td)n +Rn .
2! 3! n!
(3)
The remainder Rn is defined by
Z t
(t r)n (n+1)
Rn = f dt (4)
d n!
where r [d, t].

2
Maclaurin series is a Taylor series whose center is zero. For a given radian
angle, , its exponential, sine, and cosine are given as:
1 2 1 3
e = 1 + + + + ...
2! 3!
1 n 1
+ + n+1 e
n! (n + 1)
n
X 1 k
= + Rn , (5)
k=0
k!

1 3 1 5
sin = + + ...
3! 5!
(1)n 2n+1 (1)n + 1
+ + cos2n+1
(2n + 1)! (2n + 3)!
n
X (1)k 2k+1
= + Rn (), and (6)
k=0
(2k + 1)!

1 2 1 4
cos = 1 + + ...
2! 4!
n
(1) 2n (1)n+1 2n+2
+ + cos
(2n)! (2n + 2)!
n
X (1) 2k
= + Rn (), (7)
k=0
(2k)!

respectively. In the same manner, the dummy variable is defined by [0,].


The symbol can be used to suppress all equation numbers. The next
equations will show the differences between using eqnarray and align.
An example of eqnarray is

1 = m20 + m02 ,
2 = (m20 m02 )2 + 4m211 .

On the other hand, an example of align* is

1 = m20 + m02 ,
2 = (m20 m02 )2 + 4m211 .

3
4 Matrices and Arrays
Matrices can be generated by the following environments:
1. matrix
1 2 3
4 5 6
7 8 9
2. pmatrix
1 2 3
4 5 6
7 8 9
3. bmatrix
1 2 3
4 5 6
7 8 9
4. Bmatrix
1 2 3
4 5 6
7 8 9

5. vmatrix
1 2 3

4 5 6

7 8 9

6. Vmatrix
1 2 3

4 5 6

7 8 9

Array is the math-mode version of the tabular environment. Examples


are the following:
1 2 3
4 5 6
7 8 9
1 2 3
4 5 6
7 8 9

4
1 2 3
4 5 6
7 8 9
1 2 3
4 5 6
7 8 9
1 2 3
4 5 6
7 8 9
1 2 3
4 5 6
7 8 9

5 Other Commands
The cost consists of tank material and welding costs. Therefore, the objec-
tive function can be formulated as minimizing

C = cm m + cw lw (8)
where C = cost ($), m = mass (kg), lw = weld length (m), and cm and cw =
cost factors for mass ($/kg) and weld length ($/m), respectively. The mass
can be calculated as the volume of material times its density. the volume of
the material used to create the side walls can be computed as
" 2  2 #
D D
Vcylinder = L +t .
2 2

Each circular end plate is


 2
D
Vplate = +t t.
2
Thus, the mass is computed by
( " 2  2 #  2 )
D D D
m = L +t + 2 +t t (9)
2 2 2

5
where = density(kg/m3 ). The weld length for attaching each plate is equal
to the cylinders inside and outside circumference. For the two plates, the
total weld length would be
   
D D
lw = 2 2 + t + 2
2 2
= 4(D + t). (10)

Given the values of D and L, (8) through (10)provide a means to compute


cost. Also, recognize that when (9) and (10) are substitute into (8), the
resulting objective function is nonlinear in the unknowns.
The hypothesis space W for linear classifier R3 . Each single point x
defines a plane in R3 and thus incurs a grand circle {w W| hx,wi = 0} in
the hypothesis space.
Let 1y and 1sign(f (x)) denote the 2 1 indicator vectors of the true class
and the classification made by f F at x X . Then we have a cost matrix
classification lost lc by


c12 , y = +1 and f (x) < 0
def
lc (f (x), y) = 10y C1sign(f (x)) = c21 , y = 1 and f (x) > 0
0, otherwise.

For regression estimation it is desirable to have the opposite true, i.e.,


incurred costs result if |f(x)| is very large instead of small. This requirement
is formally captured by the -insensitive loss defined by

0, if |t f (x)|
l (f (x), t) = (11)
|t f (x)| , if |t f (x)| > .

Then, for all such probability measures Px ,


Pn  Z x
i=1 Xi 1 t2
x R : lim Pxn x = exp( ) dt,
n n 2 2

that is, the distribution function of the normalized sum of identically and in-
dependently distributed random variables approaches, pointwise, the normal
distribution function with increasing sample size n.

You might also like