Download Population Biology Math Cheat Sheet: Calculus, Taylor Series, Jacobian, Integration and more Exams Biology in PDF only on Docsity! Mathematics Cheat Sheet for Population Biology James Holland Jones, Department of Anthropological Sciences Stanford University January 9, 2007 1 Introduction If you fake it long enough, there comes a point where you aren’t faking it any more. Here are some tips to help you along the way... 2 Calculus Derivative The definition of a derivative is as follows. For some function f(x), f ′(x) = lim h→0 f(x + h)− f(x) h . 2.1 Differentiation Rules It is useful to remember the following rules for differentiation. 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 xa = axa−1 d dx 1 xa = − a xa+1 d dx ex = ex d dx ax = ax 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 definition is actually somewhat at odds with the colloquial usage. Let f(x) be a twice differentiable function in an interval I. Then: f ′′(x) ≥ 0 ⇒ f(x) convex (1) f ′′(x) ≤ 0 ⇒ f(x) concave If you think about a profit function as a function of time, a convex function would show increasing marginal returns, while a concave function would show decreasing marginal returns. This leads into an important theorem (particularly for stochastic demography), known as Jensen’s Inequality. For a convex function f(x), IE [f(X)] ≥ f(IE [X]). 2.2 Taylor Series T (x) = ∞∑ 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 er at a = 0: 2 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− µ)2f(x)dx A useful formula for calculating variances: \V[X] = IE[X2]− (IE[X])2 2.6 Exponents and Logarithms Properties of Exponentials xaxb = xa+b xa xb = xa−b xa = ea log x Complex Case ez = ea+bi = eaebi = ea(cos b + i sin b) (xa)b = xab x−a = 1 xa The logarithm to the base e, where e is defined as e = lim n→∞ ( 1 + 1 n )n Assume that log ≡ loge. Logarithms to other bases will be marked as such. For example: log10, log2, etc. This is an important for demography: lim n→∞ ( 1 + r n )n = er Properties of Logarithms log xa = 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 coefficient on the imaginary part. It is useful to represent imaginary numbers in their polar form. Define 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 definitions, 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 = [ a11 a12 a21 a22 ] A vector is simply a list of numbers 6 n(t) = n1 n2 n3 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, first by row, then by column. For example, a21 is the element of A which is in the second row and first column. Matrix Multiplication [ a11 a12 a21 a22 ] [ n1 n2 ] = [ a11n1 + a12n2 a21n1 + a22n2 ] 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[ a11 a12 a21 a22 ] + [ b11 b12 b21 b22 ] = [ a11 + b11 a12 + b12 a21 + b21 a22 + b22 ] [ 1 2 3 4 ] + [ 5 6 7 8 ] = [ 6 8 10 12 ] Multiplying a Matrix by a Scalar λ [ a11 a12 a21 a22 ] = [ λa11 λa12 λa21 λa22 ] 4 [ 2 3 4 5 ] = [ 8 12 16 20 ] Systems of Equations Matrix notation was invented to make solving simultaneous equations easier. y1 = ax1 + bx2 y2 = cx1 + dx2 In matrix notation: [ y1 y2 ] = [ a b c d ] [ x1 x2 ] 7