Numerical Methods 1: Randomness, Roots & Extrema
"Numerical methods" are algorithms — recipes, if you will — for solving mathematical problems via numerical calculations on a computer. There is a vast vast VAST literature on such things, and this course will barely scratch the surface. That, however, should be enough to give you a sense of how the game is played, and to empower you to track down the methods you need when you do.
Our first set of numerical methods focus on generating random-ish numbers (important for many kinds of simulations), and two things you might want to do to an equation: solve it (i.e., "find its root(s)"), and find its extrema (maxima and/or minima). For some equations, this is easily done with analytic methods (paper and pencil rearranging of symbols). For others, analytic methods fail, and numerical methods are the only way to go. In between, we get cases that could in principle be solved analytically, given enough time and a big enough whiteboard, but why bother when a computer can do it quickly and easily?
-
Randomness: Recipes for generating effectively-random numbers, making random choices, randomizing the order of things, and such.
-
Finding Roots of Equations: Three different algorithms for "finding the roots of an equation", each with its own advantages and disadvantages.
-
Finding Extrema: A recipe for finding maxima or minima of a one-dimensional function, and another for finding extrema of 2D, 3D, and higher-dimensional functions.