Math 471
Fall 2009
Homework 8
due: Mon Dec 14
chapter 5, polynomial approximation and interpolation
1. page 351, problem 9
Note: This problem asks you to derive an error bound for linear polynomial interpolation,
|f (x) p1 (x)|
1
max |f (x)|h2 , where h
Homework 10
Math 471, Fall 2007 Assigned: Friday, November 16, 2007 Due: Monday, December 3, 2007 Include a cover page Clearly label all plots using title, xlabel, ylabel, legend Use the subplot command to compare multiple plots Include printouts
Homework 6 Solutions
Math 471, Fall 2006 Assigned: Friday, October 20, 2006 Due: Friday, October 27, 2006 Include a cover page Clearly label all plots using title, xlabel, ylabel, legend Use the subplot command to compare multiple plots Include p
Chapter 3
Numerical linear algebra
Review of linear algebra
We consider the following system of linear equations which has n unknowns
x1 , . . . , xn .
a11 x1 + a12 x2 + + a1n xn = b1
a21 x1 + a22 x2 + + a2n xn = b2
.
.
.
an1 x1 + an2 x2 + + ann xn =
Math 471 - Introduction to Numerical Methods - Winter 2015
Assignment # 3.
Due: Thursday, February 6, 2015.
1. Elementary Matrices
Let B be a 4 4 matrix to which we apply the following operations.
Double column 1,
halve row 3,
add row 3 to row 1,
inte
Math 471 - Introduction to Numerical Methods - Winter 2015
Assignment # 2.
Due: Thursday, January 29, 2015.
1. Peculiar behavior.
a) Compute 10n (10n 1) for n = 1, 2, , 30. What answer do you expect?
What answer do you get? Explain your observations.
b) C
Math 471 - Introduction to Numerical Methods - Winter 2015
Assignment # 1.
Due: Thursday, January 22, 2015.
1. Do the following calculations by hand.
(a) Convert to base 10: (1100101.001)2
(b) Convert to base 2: (2006)10
2. The oating point representation
An Introduction to
Monte Carlo Simulations
Notes by
Mattias Jonsson
Version of October 4, 2006
Math 472, Fall 2006
Numerical Methods with Financial Applications
2
Contents
1. Introduction
2. Computing areas, volumes and integrals
2.1. Examples
2.1.1. Exam
Math 471
Fall 2009
Homework 7
due: Mon Dec 7
chapter 5, polynomial approximation and interpolation
1. a) Find the Taylor series for f (x) = sin x about x = 0.
b) Using Matlab, plot the Taylor polynomials pn (x) of degree n = 1, 3, 5, 7 on the same plot
on
Math 471
Fall 2009
Homework 6
due: Wed Nov 25
chapter 4, computing eigenvalues
2 1
and recall that in class we computed the e-values 1 , 2 and corre1
2
sponding orthonormal e-vectors q1 , q2 of A. Now consider the linear system Ax = b, where
0
T
T
b=
. Co
Math 471
Fall 2009
Homework 5
due: Fri Nov 13
1. Find the eigenvalues and eigenvectors of the following matrices. Do this by hand, but you
may check your answers using Matlab.
2 1
0
0 1
20
02
2 1
a)
b)
2 1 e)
c)
d) 1
1
0
01
10
1
2
0 1
2
section 3.7, speci
Math 471
Fall 2009
Homework 4
due: Fri Oct 30
section 3.5, LU factorization
1. Let A be a 3 3 matrix. Suppose we apply LU factorization with partial pivoting and
obtain E2 P2 E1 P1 A = U , where U is upper triangular and
1
00
1
0
0
010
100
E1 = m21 1 0 ,
Math 471
Fall 2009
Homework 3
due: Wed Oct 21
chapter 3, linear algebra
1. Which of the following matrices are invertible? Justify your
10
01
1
1
1 1
(a)
(b)
(c)
(d) 1 3
10
1 1
1
1
03
answer.
2
1
3
2. page 159, problem 13 (electric circuit, solve by Gauss
Math 471
Fall 2009
Homework 2
due: Mon Oct 5
When numerical answers are required, you may use Matlab or a calculator, unless other
instructions are given.
1. The forward and backward nite-dierence operators are dened by
f (x + h) f (x)
f (x) f (x h)
D+ f
Chapter 7
Time-dependent differential equations
Eulers method
First-order ordinary differential equations (ODE) are written as
dx = f (x), t > 0,
dt
x(0) = x0 .
If x(t) is the position of a particle moving on the x-axis at time t, then dx/dt is
the veloc
Chapter 5
Interpolation
Polynomial approximation
Let us consider an integral of a given function f (x). We want to approximate f (x)
by a polynomial pn (x) of degree n:
b
b
f (x)dx
a
a
pn (x)dx.
One way to nd such an approximation is to use the Taylor se
Math 471
Review Sheet for Final Exam
Fall 2009
The nal exam will cover the entire course. You may use two sheets of notes (e.g. two sides
of one page, i.e. a total of 187 in2 = 2 8.5 in 11 in). You may use a non-programmable
calculator to do arithmetic, b
Chapter 1
Finite precision arithmetic
Floating point representation
Let us consider
2013.9 = 2 103 + 0 102 + 1 101 + 3 100 + 9 101 = (2013.9)10 .
In general, a real number x is expressed as
x = (dn dn1 d1 d0 .d1 d2 )
= dn n + dn1 n1 + + d1 1 + d0 0 + d1 1
Chapter 2
Rootnding
Given a function f (x), a root is number r satisfying f (r) = 0. For example, for
a
f (x) = x2 3, the roots are r = 3. We want to nd the roots of a general function
f (x) using a computer.
The bisection method
Suppose we nd an interval
Chapter 4
Eigenvalues and eigenvectors
Rayleigh quotient
We begin with the following theorem1 .
Theorem 1. If A is a real symmetric matrix, then the eigenvalues i are real and we
can take the eigenvectors qi so that they form an orthonormal basis, i.e., q
Supplement for Lecture 4 (Wed, 9/11)
The bisection method
Let us nd a root of f (x) = x2 3. We note that f (1) = 2 and f (2) = 1. Indeed,
there is a root r = 3 = 1.73205 . . . on the interval [1, 2].
n
0
1
2
3
4
an
1
1.5
1.5
1.625
1.6875
bn
2
2
1.75
1.75
Supplement for Lecture 2 (Fri, 9/6)
For f (x) = ex , let us compute f (1). The exact value is f (1) = e = 2.71828 . . . .
h
0.1
0.05
0.025
0.0125
| f (x) D+ f |
0.1406
0.0691
0.0343
0.0171
D+ f
2.8588
2.7874
2.7525
2.7353
| f (x) D+ f |/h
1.4056
1.3821
1.
Math 472
Numerical Methods with Financial Applications
Fall 2007
Course description
This is a survey of the basic numerical methods that are used to solve scientic problems,
especially ones arising in actuarial and nancial applications.
The emphasis is ev
Supplement for Lecture 20 (Mon, 10/21)
Let us solve the following 2D boundary value problem with the Jacobi method.
(x, y) (0, 1) (0, 1),
xx + yy = 0,
(x, 1) = 1,
(x, 0) = (0, y) = (1, y) = 0.
In the calculation the zero vector was chosen for the initia
1. Thurs 1/9
1
2-point BVP
y 00 + d(x)y = f (x) , 0 x 1 , y(0) = , y(1) =
nite-dierence scheme
h=
1
, xi = ih , i = 0, 1, . . . , n + 1 : mesh points
n+1
yi = y(xi ) , di = d(xi ) , fi = f (xi )
yi+1 yi
yi yi 1
, D yi =
h
h
yi yi
D+ D yi = D+ (D yi ) = D+
An Introduction to
Monte Carlo Simulations
Notes by
Mattias Jonsson
Version of October 4, 2006
Math 472, Fall 2006
Numerical Methods with Financial Applications
2
Contents
1. Introduction
2. Computing areas, volumes and integrals
2.1. Examples
2.1.1. Exam
Supplement for Lecture 14 (Fri, 10/4)
1 % y = r , y ( 0 ) = a l p h a , y ( 1 ) = b e t a
2 clear ; clf ;
3 alpha =0;
4 beta =1;
5 n =3;
6 h =1/( n +1);
7 x exact =0:0.0025:1;
8 y e x a c t =25/ pi 2 s i n ( pi x e x a c t )+ x e x a c t ;
9 for i =1: n
1