Mathematics Cheat Sheet For Population Biology: James Holland Jones
Mathematics Cheat Sheet For Population Biology: James Holland Jones
(x) = lim
h0
f(x + h) f(x)
h
.
2.1 Dierentiation Rules
It is useful to remember the following rules for dierentiation. Let f(x) and g(x) be two functions
2.1.1 Linearity
d
dx
(af(x) + bg(x)) = af
(x) + bg
(x)
for constants a and b.
2.1.2 Product rule
d
dx
(f(x)g(x)) = f
(x)g(x) + f(x)g
(x)
2.1.3 Chain rule
d
dx
g(f(x)) = g
(f(x))f
(x)
1
2.1.4 Quotient Rule
d
dx
f(x)
g(x)
=
f
(x)g(x) f(x)g
(x)
g(x)
2
2.1.5 Some Basic Derivatives
d
dx
x
a
= ax
a1
d
dx
1
x
a
=
a
x
a+1
d
dx
e
x
= e
x
d
dx
a
x
= a
x
log a
d
dx
log |x| =
1
x
2.1.6 Convexity and Concavity
It is very easy to get confused about the convexity and concavity of a function. The technical
mathematical denition is actually somewhat at odds with the colloquial usage. Let f(x) be a
twice dierentiable function in an interval I. Then:
f
k=0
f
(k)
(a)
k!
(x a)
k
where f
(k)
(a) denotes the kth derivative of f evaluated at a, and k! = k(k 1)(k 2) . . . (1).
For example, we can approximate e
r
at a = 0:
2
f(E[x])=f([A+B]/2)
f(x)
x
A
B E[x]=(A+B)/2
E[f(x)]=[f(A)+f(B)]/2
Figure 1: Illustration of Jensens Inequality.
e
r
1 + r +
r
2
2
+
r
3
6
. . .
Expanding log(1 + x) around a = 0 yields:
log(1 + x) x
x
2
2
+
x
3
3
. . .
2.3 Jacobian
For a system of equations, F(x) and G(), the Jacobian matrix is
J =
_
F/x F/
G/x G/
_
.
This is very important for the analysis of stability of interacting models such as those for
epidemics and predator-prey systems. The equilibrium of a system is stable if and only if the
real parts of all the eigenvalues of J are negative.
2.4 Integration
Linearity
_
[af(x) + bg(x)] dx = a
_
f(x)dx + b
_
g(x)dx
Integration by Parts
_
u v
dx = u v
_
v u
dx
3
Some Useful Facts About Integrals
_
f
(x)
f(x)
dx = log |f(x)|
_
x
a
dx =
x
a+1
a + 1
, a = 1
_
e
x
dx = e
x
_
dx
x
= log |x|
2.5 Denite Integrals
_
b
a
f(x)dx = [F(x)]
b
a
= F(b) F(a)
2.5.1 Expectation
For a continuous random variable X with probability density function f(x), the expected value,
or mean, is
IE(X) =
_
xf(x)dx
where the integral is taken over the set of all possible outcomes .
For example, the average age of mothers of newborns in a stable population:
A
B
=
_
ae
ra
l(a)m(a)da
Since (from the Euler-Lotka equation) the probability that a mother will be a years old in a
stable population is f(a) = e
ra
l(a)m(a).
Some Properties of Expectation
IE[aX] = aIE[X]
For two discrete random variables, X and Y ,
IE[X + Y ] = IE[X] + IE[Y ]
4
2.5.2 Variance
For a continuous random variable X with probability density function f(x) and expected value
, the variance is
\V(X) =
_
(x )
2
f(x)dx
A useful formula for calculating variances:
\V[X] = IE[X
2
] (IE[X])
2
2.6 Exponents and Logarithms
Properties of Exponentials
x
a
x
b
= x
a+b
x
a
x
b
= x
ab
x
a
= e
a log x
Complex Case
e
z
= e
a+bi
= e
a
e
bi
= e
a
(cos b + i sin b)
(x
a
)
b
= x
ab
x
a
=
1
x
a
The logarithm to the base e, where e is dened as
e = lim
n
_
1 +
1
n
_
n
Assume that log log
e
. Logarithms to other bases will be marked as such. For example:
log
10
, log
2
, etc.
This is an important for demography:
lim
n
_
1 +
r
n
_
n
= e
r
Properties of Logarithms
log x
a
= a log x
log ab = log a + log b
log
a
b
= log a log b
5
b
r
a
Imaginary
Real
(a,b) = a + bi
Figure 2: Argand diagram representing a complex number z = a + bi.
Complex Numbers We encounter complex numbers frequently when we calculate the eigen-
values of projection matrices, so it is useful to know something about them. Imaginary number:
i =
1. Complex number: z = a + bi, where a is the real part and b is a coecient on the
imaginary part.
It is useful to represent imaginary numbers in their polar form. Dene axes where the
abscissa represents the real part of a complex number and the ordinate represents the imaginary
part (these axes are known as an Argand diagram). This vector, a + bi can be represented by
the angle and the radius of the vector rooted at the origin to point (a, b). Using trigonometric
denitions, a = r sin and b = r cos , we see that
z = a + ib = r(cos + i sin ).
Believe it or not, this comes in handy when we interpret the transient dynamics of a popu-
lation.
Let z be a complex number with real part a and imaginary part b,
z = a + bi
Then the complex conjugate of z is
z = a bi
Non-real eigenvalues of demographic projection matrices come in conjugate pairs.
3 Linear Algebra
A matrix is a rectangular array of numbers
A =
_
a
11
a
12
a
21
a
22
_
A vector is simply a list of numbers
6
n(t) =
_
_
n
1
n
2
n
3
_
_
A scalar is a single number: = 1.05
We refer to individual matrix elements by indexing them by their row and column positions.
A matrix is typically named by a capital (bold) letter (e.g., A). An element of matrix A is
given by a lowercase a subscripted with its indices. These indices are subscripted following the
the lowercase letter, rst by row, then by column. For example, a
21
is the element of A which
is in the second row and rst column.
Matrix Multiplication
_
a
11
a
12
a
21
a
22
_ _
n
1
n
2
_
=
_
a
11
n
1
+ a
12
n
2
a
21
n
1
+ a
22
n
2
_
Multiply each row element-wise by the column
For Example,
_
2 3
4 5
_ _
6
7
_
=
_
(2 6) + (3 7)
(4 6) + (5 7)
_
=
_
33
59
_
Matrix Addition or Subtraction
_
a
11
a
12
a
21
a
22
_
+
_
b
11
b
12
b
21
b
22
_
=
_
a
11
+ b
11
a
12
+ b
12
a
21
+ b
21
a
22
+ b
22
_
_
1 2
3 4
_
+
_
5 6
7 8
_
=
_
6 8
10 12
_
Multiplying a Matrix by a Scalar
_
a
11
a
12
a
21
a
22
_
=
_
a
11
a
12
a
21
a
22
_
4
_
2 3
4 5
_
=
_
8 12
16 20
_
Systems of Equations Matrix notation was invented to make solving simultaneous equations
easier.
y
1
= ax
1
+ bx
2
y
2
= cx
1
+ dx
2
In matrix notation:
_
y
1
y
2
_
=
_
a b
c d
_ _
x
1
x
2
_
7
3.1 Eigenvalues and Eigenvectors
A scalar is an eigenvalue of a square matrix A and w = 0 is its associated eigenvector if
Aw = w.
Eigenvalues of A are calculated as the roots of the characteristic equation,
det(AI) = 0,
where I is the identity matrix, a square matrix with ones along the diagonal and zeros elsewhere.
For example, we can calculate the eigenvalues for the matrix,
A =
_
f
1
f
2
p
1
0
_
.
Solve the characteristic equation det(AI) = 0:
(AI) =
_
f
1
f
2
p
1
0
_
_
0
0
_
=
_
f
1
f
2
p
1
_
det(AI) = (f
1
) f
2
p
1
2
f
1
f
2
p
1
= 0
Use the quadratic equation to solve for :
f
1
_
f
2
1
4f
2
p
1
2f
1
Numerical Example Dene:
A =
_
1.5 2
0.5 0
_
(2)
det(AI) =
_
1.5 2
0.5
_
2
1.5 1 = 0
( 2)( + 0.5) = 0
The roots of this are = 2 and = 0.5. A k k matrix will have k eigenvalues. If a
matrix is non-negative, irreducible, and primitive, one of these eigenvalues is guaranteed to be
real, positive, and strictly greater than all the others.
8
Analytic Formula for Eigenvalues: The 2 2 Case
A =
_
a b
c d
_
The eigenvalues are:
=
T
2
_
(T/2)
2
D
where T = a + d is the trace and D = ad bc is the determinant of matrix A.
9