CPSC 303, Term 2, 2015, Assignment #1
Due Wednesday, January 21, in class
Posted on Saturday, January 10
Solution will be posted on Friday, January 23 (one delay allowed)
0. Please read carefully the
CPSC 303, 2014/2015, Assignment #6 Solution
1. Below, see a program that does the job. Notice that we need to use here 2 2 matrices, and
in the case of the implicit methods (backward Euler and implici
CPSC 303, 2014/2015, Assignment #3 Solution
1. (a) Here is the code for this question. In the code we are using Matlabs standard builtin
functions for spline and piecewise Hermite. Bonus marks were gi
CPSC 303, 2014/2015, Assignment #1 Solution
1. (a) We have f (x) = ln(1 + x), f (x) =
1
1+x , f
1
(x) = (1+x)2 , f (x) =
Therefore f (0) = 0, f (0) = 1, f (0) = 1 and f (0) =
ln(1 + x) = x
1
2
1
,. .
CPSC 303
Midetrm Exam 1
CPSC 303, 2014/2015: SOLUTIONS TO MIDTERM EXAM 1
Question 1.
1 pt
(5 points)
(a) Circle the correct answer; no need to justify.
In modern oating point systems, the relative err
CPSC 303, Term 2, 2014/2015, Practice Questions for Midterm 1
1. Determine whether the following statements are true or false.
(a) Relative errors are often more meaningful than absolute errors, in
pa
CPSC 303, Term 2, 2014/2015, Solution of Practice Questions for Midterm 1
1. (a) True
(b) False (integral evaluation example in lecture)
(c) False (numerical dierentiation example in lecture)
(d) True
The following essay appeared in the November, 1992 issue of SIAM News and the March, 1993 issue of the Bulletin of the Institute for Mathematics and Applications.]
THE DEFINITION OF NUMERICAL ANALYSI
CPSC 303
Term 2, 2014-2015
Instructor: Chen Greif
UBC Computer Science
http:/www.cs.ubc.ca/greif/cs303/
Chapter 1: Numerical Algorithms
Slides for the book
A First Course in Numerical Methods (publish
CPSC 303
Term 2, 2014-2015
Instructor: Chen Greif
UBC Computer Science
http:/www.cs.ubc.ca/greif/cs303/
Chapter 2: Roundoff Errors
Slides for the book
A First Course in Numerical Methods (published by
CPSC 303, Term 2, 2014/2015, Solutions of Practice Questions
1. (a) F (cancellation errors and other bad things may happen)
(b) T (Horners method has linear complexity, which means that doubling the d
CPSC 303, Term 2, 2014/2015, Practice Questions for the Final Exam
Note: Please do not read too much into what is covered by these practice
questions and what is not covered. The purpose of these prac
CPSC 303, 2014/2015, Bonus Assignment Solution
1. (a) We make use of the trigonometric identities given on p. 385. First, observe that because
of their periodicity
sin(kx)dx = 0
all k integer
cos(kx)d
Numerical Approximation and Discretization
CPSC 303, Term 2, Winter 20162017
Copyright 2017 by Jessica Bosch
Notes reused and adapted from Ian M. Mitchell
Numerical Linear Algebra Review
Notation:
Ma
CPSC 303, Term 2, Winter 20162017
2017 by Jessica Bosch
Numerical Approximation and Discretization
Assignment 2 Polynomial Interpolation
Due 1 Feb 2017, beginning of class
Reminder: When submitting y
CPSC 303, Term 2, Winter 20162017
2017 by Jessica Bosch
Numerical Approximation and Discretization
Assignment 1 Numerical Algorithms & Errors
Due 25 Jan 2017, beginning of class
Reminder: When submit
CPSC 303, Term 2, Winter 20162017
2017 by Jessica Bosch
Numerical Approximation and Discretization
Assignment 0 Review
Due 18 Jan 2017, beginning of class
Reminders:
1. When submitting your hard copy
CPSC 303, Term 2, Winter 20162017
2017 by Jessica Bosch
Numerical Approximation and Discretization
Assignment 0 Review
Due 18 Jan 2017, beginning of class
Reminders:
1. When submitting your hard copy
CPSC 303, Term 2, Winter 20162017
2017 by Jessica Bosch
Numerical Approximation and Discretization
Assignment 1 Numerical Algorithms & Errors
Due 25 Jan 2017, beginning of class
Reminder: When submit
UBC CPSC 303, Term 2, Winter 20162017
SAMPLE MIDTERM EXAM
No reproduction or distribution without express written permission.
February 2nd, 2017
Instructor: Jessica Bosch
TIME: 50 minutes
Name:
Signat
CPSC 303, 2014/2015, Assignment #2 Solution
1. (a) The Vandermonde matrix and the
1
1
A=
1
1
right hand side vector are
1 1 1
1
1
0 0 0
; y = .
2
1 1 1
2 4 8
0
We thus solve the
linear system Ac =
CPSC 303, 2014/2015, Assignment #5 Solution
1. (a)
i. Here is a script that generates the plot; see also Figure 1. The computed max-norm
is 0.0943.
t=l i n s p a c e ( 0 , 1 , 1 0 0 ) ;
e=exp ( 1 ) ;
CPSC 303
Term 2, 2014-2015
Instructor: Chen Greif
UBC Computer Science
http:/www.cs.ubc.ca/greif/cs303/
Chapter 10: Polynomial Interpolation
Slides for the book
A First Course in Numerical Methods (pu