Math 320

Numerical Analysis

(Updated )

General Information

News

Spring 2014 - This course is over.

Take home quizzes:

Review questions:

Stuff

  • MATLAB is available on the department Linux cluster, turing.slu.edu. Here's how to use it:
    1. Install the nomachine client on your computer
    2. Get an account on turing.slu.edu from Dr. Clair
    3. Run nomachine, and create a new connection. Protocol is SSH, host is turing.slu.edu, and you should use your system login password with no proxy. Once connected, you'll want a KDE desktop.
    4. MATLAB (Octave, too) is available on the KDE menu (lower left)/Applications/Science & Math
  • Some free alternatives to Matlab (try them, let me know if they're working for you):
  • IEEE 754 floating point conversion applet.
  • Cubic Spline applet, Parametric spline curve applets, a wooden spline for boat design.
  • Approximations

Matlab Programs

biroot.m
Compute the square root of x ≥ 1 by the bisection algorithm.
eulergamma.m
Compute Euler's gamma by 1 + 1/2 + 1/3 + ... + 1/n - log(n)
wbisect.m
wbisect(x) uses bisection to compute the Lambert W function W(x) which solves W*exp(W)=x
cobweb.m
Generate a cobweb plot for the orbit xn+1=f(xn).
newton.m
newton(f,df,guess) computes a root of f using Newton's method
secant.m
secant(f,x0,x1) computes a root of f using the secant method
aitken.m
aitken(x) applies Aitken's Δ2 process to x, returning a vector with two fewer entries than x
polyinterp.m
polyinterp(x,y,u) computes v(j) = P(u(j)) where P is the polynomial of degree d = length(x)-1 with P(x(i)) = y(i).
This uses Lagrange polynomials.
newtoninterp.m
newtoninterp(x,y,u) computes v(j) = P(u(j)) where P is the polynomial of degree d = length(x)-1 with P(x(i)) = y(i).
This uses Newton's divided difference method.
horner.m
horner(a,x) evaluates a(1) + a(2) * x + a(3) * x.^2 + .. + a(n) * x^(n-1), using Horner's method.
led_data.m
led_data() returns a list of voltage and current data for some real LEDs.
harmonicpoly.m
harmonicpoly(n,x) computes the interpolating polynomial with nodes 1,2,..,n and values 1/1, 1/2,...,1/n.
Uses the nested form of the polynomial 1 - (1/2)(x-1)[ 1 - (1/3)(x-2) [ ... 1 - (1/n-1)(x-(n-1))]...]
quadgui.m
quadgui(f,a,b) shows the steps in approximating the integral of f(x) from a to b by adaptive extrapolated Simpson's quadrature.
quadgui(f,a,b,tol) uses the given tolerance instead of 1.e-4.
dirfield.m
dirfield(f, t1:dt:t2, y1:dy:y2) plots the direction field for the first order ODE y' = f(t,y), using t-values from t1 to t2 with spacing of dt, and y-values from y1 to t2 with spacing of dy
euler.m
euler(f,tspan,y0,n) applies Euler's method to solve y' = f(y,t), y(a) = y0, on the interval a <= t <= b with n steps.
midpoint.m
Apply the midpoint method to solve y’ = f(y,t), y(a) = y0, on the interval tspan(1) <= t <= tspan(2) with n steps.
rungekutta4.m
Apply the RK4 method to solve y’ = f(y,t), y(a) = y0, on the interval tspan(1) <= t <= tspan(2) with n steps.
euleradapt.m
Apply adaptive Eulers's method to solve y' = f(y,t), y(a) = y0, on the interval tspan(1) <= t <= tspan(2). This uses Euler's method to step, and the modified Euler's method to compute an error bound and adapt the step size.

Homework Assignments

  1. Due Friday, 1/24: 1.2 #1a, 1h, 9a, 15; 1.3 # 3,4; Problems on a handout.
  2. Due Monday, 2/3: 2.1 # 7, 15; 2.2 # 1,2,8,11a,16,17,19; Problems on a handout.
  3. Due Friday, 2/14: 2.3 #1, 3, 5b, 7b, 13, 23; 2.4 #7, 8, 9; 2.5 # 1c, 17; Problems on a handout.
  4. Due Monday, 3/3: Ch 2.6 #12; Ch 3.1 # 1a, 5a, 7a, 14, 17; Problems on a handout.
  5. Due Wednesday, 3/19: Ch 3.3 # 1*, 3*, 7a, 10, 11, 16, 17; Ch 3.5 # 3a, 13. Problems A,B,C,D,E and two Matlab problems on a handout
  6. Due Monday, 3/31: Ch 4.1 #5a, 7a; Ch 4.2 #11; Ch 4.3 # 1df, 3df, 5df, 7df; Problems on a handout.
  7. Due Friday, 4/11: Ch 4.3 #15; Ch 4.4 #1ae,3ae,11,26b; Ch 4.5 # 1b; Problems on a handout.
  8. Due Friday, 4/25: Ch 4.6 #1a,6a; Ch 5.1 #3a, 4abd; Ch 5.2 # 1bc, 3bc, 12; Problems on a handout.
  9. Due Friday, 5/2: Ch 5.4 #3a, 15a, 23a, 28; Problems on a handout.