COS 323, Fall 2010, Assignment 5 README.txt Name: NetID: General Questions ----------------- 1. Given a uniformly-discretized function, show how to compute a fourth-order-accurate central-difference approximation to the function's derivative, using the function's value at two neighbors in each direction. (Hint: use Richardson extrapolation.) [your answer here] 2. [Heath, exercise 11.1] Suppose you are given a general-purpose subroutine for solving initial value problems for systems of n first-order ODEs y' = f(t,y) and this is the only software tool you have available. For each type of problem in parts a, b, and c to follow, describe how you could use this routine to solve it. In each case, your answer should address the following points: 1. What is the function f for the ODE subproblem? 2. How would you obtain the necessary initial conditions? 3. What special properties, if any, would the ODE subproblem have that would affect the choice of ODE method? (a) Compute the definite integral of a function g(s) from a to b [your answer here] (b) Solve the two-point boundary value problem y'' = y^2 + t, with 0 <= t <= 1, and with boundary conditions y(0) = 0 and y(1) = 1. [your answer here] (c) Solve the heat equation u_t = c u_xx, for 0 <= x <= 1, t >= 0, with initial condition u(0,x)=g(x), 0 <= x <= 1, and boundary conditions u(t,0)=0 and u(t,1)=0, t >= 0. [your answer here] 3. [Heath, exercise 13.1] Consider the pseudorandom number generator x_k = (a * x_k-1) (mod 8192) with the seed x_0 = 1. What is the period of this generator if a=2? What is the period if a=125? What is the longest possible period for any a, using this scheme and this x_0? [your answer here] Programming assignment: Simulating Population Genetics ------------------------------------------------------ Describe your code, and answer the questions requested in the assignment description. [your answer here]