2072U Computational Science I course outline, winter 2014
Instructor
Lennaert van Veen, oce: UA4042, email: lennaert.vanveen@uoit.ca, tel. 905-721-8668 ext. 3642.
Oce hours: Tuesday and Thursday 11:00-12:00. To arrange for consultation at dierent hours,
c
2072U
ASSIGNMENT 1, 2014
Iteration and recursion
Due: Friday, January 24th, 8:10. Hand in your assignment in at the lecture.
Write your answers out carefully and clearly. Upload the following Matlab
les to Blackboard:
iteration.m and recursion.m for Ques
2072U
Tutorial week 4, 2014
Error analysis
Construct a matrix V with the following elements:
Vij =
(1)i+j
, i, j = 1, . . . , N
i + 2j
and let r be the rst column vector of V .
For N = 2, . . . , 10, compute the condition number of V and solve
Vx=r
using
2072U
ASSIGNMENT 2, 2014
Linear systems and complexity
Due: Friday, February 7, 8:10. Hand in your assignment in at the lecture.
Write your answers out carefully and clearly. Upload the following Matlab
les to Blackboard:
banded matvec.m and two gures fo
2072U
ASSIGNMENT 2, 2014
Linear systems and complexity
Question 1
Consider the following matrices and vector:
1
2 4
2 0 4
4
1
A= 2
B = 2 4 1
2 1 3
2 10
3
10 marks
2
R = 3
1
C=
20
50 1
(a) Compute the decomposition P A = LU . Show the intermediary steps
2072U Computational Science I
winter 2014
Week
1
12
34
5
6
78
910
11
12
13
Topic
Introduction
Solving nonlinear equations in one variable
Solving systems of linear equations
Computational complexity
Revision & Midterm test
Interpolation and least squares
2072U Computational Science I
winter 2014
Week
1
12
34
5
6
78
910
11
12
13
Topic
Introduction
Solving nonlinear equations in one variable
Solving systems of linear equations
Computational complexity
Revision & Midterm test
Interpolation and least squares
2072U Computational Science I
winter 2012
Week
1
12
34
5
6
78
910
11
12
13
Topic
Introduction
Solving nonlinear equations in one variable
Solving systems of linear equations
Computational complexity
Revision & Midterm test
Interpolation and least squares
2072U Computational Science I
winter 2014
Week
1
12
34
5
6
78
910
11
12
13
Topic
Introduction
Solving nonlinear equations in one variable
Solving systems of linear equations
Computational complexity
Revision & Midterm test
Interpolation and least squares
2072U Computational Science I
winter 2012
Week
1
12
34
5
6
78
910
11
12
13
Topic
Introduction
Solving nonlinear equations in one variable
Solving systems of linear equations
Computational complexity
Revision & Midterm test
Interpolation and least squares
2072U Computational Science I
winter 2012
Week
1
12
34
5
6
78
910
11
12
13
Topic
Introduction
Solving nonlinear equations in one variable
Solving systems of linear equations
Computational complexity
Revision & Midterm test
Interpolation and least squares
2072U Computational Science I
winter 2014
Week
1
12
34
5
6
78
910
11
12
13
Topic
Introduction
Solving nonlinear equations in one variable
Solving systems of linear equations
Computational complexity
Revision & Midterm test
Interpolation and least squares
2072U
Tutorial week 7, 2014
Products of polynomials
In Matlab, polynomials are represented by vectors. The elements of the vector are the polynomial
coecients, listed in decreasing order see the help entry for polyval.
Dene a vector that represents the p
2072U
Tutorial week 6, 2014
The Vandermonde matrix
Suppose we want to nd a polynomial
Pn = a0 + a1 x + . . . + an xn
that ts the data points (xi , yi ) for i = 0, . . . , n.
For n = 3, write out the equations P (xi ) = yi for i = 0, 1, 2, 3. Convince you
2072U
ASSIGNMENT 3, 2014
Interpolation and more pseudocode
Due: Friday, February 28, 8:10. Hand in your assignment in at the lecture.
Write your answers out carefully and clearly. Upload the following Matlab
les to Blackboard:
a gure for Question 1;
pol
2072U
Tutorial 1, 2014
Iteration and bisection
In the rst lecture we saw the iterative method
x(k+1) = (x(k) ) =
a
1 (k )
x + (k)
2
x
We also saw that, starting from x(0) = 3 with a = 5, after ve iterations x(k+1) = x(k) up to at
least 15 digits.
Exercise
2072U
Tutorial week 3, 2014
On computing the determinant. . .
In this tutorial you will compare two methods for computing the determinant of a matrix. You
have probably learned what the determinant is following this algorithm:
Let A GL(n, n) (n > 1) be a
2072U
Tutorial week 5, 2014
Flop counting
Exercise A
Consider a banded matrix:
A GL(n, n) with Aij = 0 for j > i + b or i > j + b
We say that A has band width b. On each row it has at most 2b + 1 nonzero elements.
Write down a 4 4 matrix A with band widt
2072U Computational Science I
winter 2014
Week
1
12
34
5
6
78
910
11
12
13
Topic
Introduction
Solving nonlinear equations in one variable
Solving systems of linear equations
Computational complexity
Revision & Midterm test
Interpolation and least squares
2072U Computational Science I
winter 2012
Week
1
12
34
5
6
78
910
11
12
13
Topic
Introduction
Solving nonlinear equations in one variable
Solving systems of linear equations
Computational complexity
Revision & Midterm test
Interpolation and least squares
2072U Computational Science I
winter 2013
Week
1
12
34
5
6
78
910
11
12
13
Topic
Introduction
Solving nonlinear equations in one variable
Solving systems of linear equations
Computational complexity
Revision & Midterm test
Interpolation and least squares
2072U
Tutorial week 2, 2014
Newtons method and the secant method
Exercise A
Test the Newton iteration function that we wrote in lecture 3 on the equation
1
exp(x2 + x) x = a (with initial guess x0 = 1)
2
starting from a = 1 and increasing a by steps of 0.