Chapter 2
Math examples

 2.1 Delimiters
 2.2 Spacing
 2.3 Arrays
 2.4 Equation arrays
 2.5 Functions
 2.6 Accents
 2.7 Command definition
 2.8 Theorems et al.

These examples were copied from www.maths.adelaide.edu.au/. Math was converted to mathml, Mathjax is used to render it in browsers without mathml support.

2.1 Delimiters

See how the delimiters are of reasonable size in these examples

a + b 1 b a + b = a,

|xy| x + y 2 ,

even when there is no matching delimiter

abud2v dx2dx = udv dxab abdu dx dv dxdx.

2.2 Spacing

Differentials often need a bit of help with their spacing as in

xy2dxdy = 1 6x2y3,

whereas vector problems often lead to statements such as

u = y x2 + y2,v = x x2 + y2,andw = 0.

2.3 Arrays

Arrays of mathematics are typeset using one of the matrix environments as in

1 x 0 0 1 1 1 y 1 = 1 + xy y 1 .

Case statements use cases:

|x| = x, if x 0,x, if  x < 0.

Many arrays have lots of dots all over the place as in

2 1 0 0 0 1 2 1 0 0 0 1 2 1 0 0 0 1 2 1 0 0 0 1 2

2.4 Equation arrays

In the flow of a fluid film we may report

uα = 𝜖2κ xxx y 1 2y2 , (2.1) v = 𝜖3κ xxxy, (2.2) p = 𝜖κxx. (2.3)

Alternatively, the curl of a vector field (u,v,w) may be written with only one equation number:

ω1 = w y v z, ω2 = u z w x, (2.4) ω3 = v x u y.

Whereas a derivation may look like

(p q) (p ¬q) = p (q ¬q)by distributive law = p Tby excluded middle = pby identity

2.5 Functions

Observe that trigonometric and other elementary functions are typeset properly, even to the extent of providing a thin space if followed by a single letter argument:

exp(i𝜃) = cos𝜃 + isin𝜃,sinh(logx) = 1 2 x 1 x.

With sub- and super-scripts placed properly on more complicated functions,

limqf(x)q = maxx|f(x)|,

and large operators, such as integrals and

ex = n=0xn n! where n! = i=1ni, Uα¯ = αUα.

In inline mathematics the scripts are correctly placed to the side in order to conserve vertical space, as in 1(1 x) = n=0xn.

2.6 Accents

Mathematical accents are performed by a short command with one argument, such as

f̃(ω) = 1 2πf(x)eiωxdx,

or

ω̇ = r ×I.

2.7 Command definition

The Airy function, Ai(x), may be incorrectly defined as this integral

Ai(x) =exp(s3 + isx)ds.

This vector identity serves nicely to illustrate two of the new commands:

×q = i w y v z + j u z w x + k v x u y.

2.8 Theorems et al.

Definition 1 (right-angled triangles) A right-angled triangle is a triangle whose sides of length a, b and c, in some permutation of order, satisfies a2 + b2 = c2.

Lemma 2 The triangle with sides of length 3, 4 and 5 is right-angled.

This lemma follows from the Definition 1 as 32 + 42 = 9 + 16 = 25 = 52.

Theorem 3 (Pythagorean triplets) Triangles with sides of length a = p2 q2, b = 2pq and c = p2 + q2 are right-angled triangles.

Prove this Theorem 3 by the algebra a2 + b2 = (p2 q2)2 + (2pq)2 = p4 2p2q2 + q4 + 4p2q2 = p4 + 2p2q2 + q4 = (p2 + q2)2 = c2.