Principles of Scientic Computing Nonlinear Equations and Optimization
David Bindel and Jonathan Goodman last revised March 6, 2006, printed March 6, 2009
1
1
Introduction
This chapter discusses two related computational problems. One is root nding, or sol

Principles of Scientic Computing Monte Carlo methods
David Bindel and Jonathan Goodman last revised April 20, 2006, printed April 16, 2009
1
Monte Carlo means using random numbers in scientic computing. More precisely1 , it means using random numbers as a

Principles of Scientic Computing Linear Algebra II, Algorithms
David Bindel and Jonathan Goodman last revised March 2, 2006, printed February 26, 2009
1
1
Introduction
This chapter discusses some of the algorithms of computational linear algebra. For rout

Bindel
Scientic Computing (G63.2043.001/G22.2112.001)
Homework 11
1. Using the technique described in Section 3.4, write a function g such
that for U Unif(0, 1), T = g (U ) has a Weibull distribution:
P cfw_T t = 1 exp t ,
t 0.
2. Suppose we take ten poin

Bindel
Scientic Computing (G63.2043.001/G22.2112.001)
Homework 10 example
When you use the ODE solvers in MATLAB and then write scripts to automatically produce the plots, you use several pieces of software tied neatly together by a common environment. Be

Bindel
Scientic Computing (G63.2043.001/G22.2112.001)
Homework 10
Recall the equation for a pendulum is
(t) + sin(t) = 0.
This equation can be converted into standard rst-order form, and Octave
and MATLAB both provide ODE integrators to solve systems in

Bindel
Scientic Computing (G63.2043.001/G22.2112.001)
Homework 9
1. (This problem is adapted from problem 3.4 of Ascher and Petzold).
The implicit midpoint rule satises
yn+1 = yn + hf
yn + yn+1
2
.
(a) Show that the midpoint rule is second-order (you may

Bindel
Scientic Computing (G63.2043.001/G22.2112.001)
Homework 8
1. Write a routine (in MATLAB or C+) to form the Newton divided differences and evaluate the interpolant and its derivatives. Your function
should take as input the interpolation nodes cfw_x

Bindel
Scientic Computing (G63.2043.001/G22.2112.001)
Homework 7
1. Write Newtons iteration formula for the equation f (x) = x2 a.
Show by a computational experiment that the formula is asymptotically quadratically convergent for a = 2 with a starting gue

Bindel
Scientic Computing (G63.2043.001/G22.2112.001)
Homework 6
1. Download the code from the web page: cholesky.cc, cholesky.h,
test cholesky.cc, time cholesky.cc, Makefile, and readme.txt.
Read readme.txt for instructions about how to compile your prog

Bindel
Scientic Computing (G63.2043.001/G22.2112.001)
Homework 5
1. The condition number for computing the action of a matrix A is
(A) =
=
=
A(x + x) Ax / Ax
(x + x) x / x
Ax / Ax
x / x
Ax / x
.
Ax / x
max
x=0, x=0
max
x=0, x=0
max
x=0, x=0
Show that for

Principles of Scientic Computing Dynamics and Dierential Equations
David Bindel and Jonathan Goodman last revised April 7, 2006, printed April 4, 2009
1
Many dynamical systems are modeled by rst order systems of dierential equations. An n component vector

Principles of Scientic Computing Approximating functions
David Bindel and Jonathan Goodman last revised April 1, 2006, printed March 27, 2009
1
Scientic computing often calls for representing or approximating a general function, f (x). That is, we seek a