Midterm 1, CS 257 Group C
March 1, 2005 Time: 9:45AM-10:45AM
Name:
.
NetID:
.
Signature: No book or notes 9 Questions, 9 pages: (125 points) All questions are 10 points, unless otherwise stated. 1. What does the MATLAB command eye(3)-ones(3) ret
CS 257
Numerical Methods - Homework 1
August 31, 2006
1. [1pt] Count the number of operations involved in evaluating a polynomial using nested multiplication. 2. [1pt] Why does the function f (x) = |x| not posses a Taylor series at x = 0? 3. [1pt]
Numerical Methods - Homework 2
CS257 September 6, 2006
All computer problems are worth 2 points. All remaing problems are worth 1 point. 2.2 14, 25, 38 2.2C: 4 (Skip the computation for extended precision. Use MATLABs single command to convert number
Numerical Methods - Homework 2
CS257 September 13, 2006
All computer problems are worth 2 points. All remaining problems are worth 1 point. 1. Solution 2.2 14: The exact sum of these four numbers is 0.31491. We will use this to calculate relative err
CS 257
Numerical Methods - Homework 8
November 10, 2006
1. [1pt] 6.2#1 (Compute by hand) Solution: The rst step is to change intervals using a linear transformation. Let x = t + 1. In this case
2 0
ex dx =
1
2
1
e(t+1) dt
2
Now we use the rs
CS 257
Numerical Methods - Homework 7
November 2, 2006
1. [1pt] 5.2 #7 Solution: We need to nd the smallest integer N such that the following relationship holds We can bound the left side as follows 1 1 h2 sin () h2 sin () 12 12 1 ( 0)h2 sin (
CS 257
Numerical Methods - Homework 5
September 29, 2006
1. [1pt] 7.3 #2 2. [2pt] 7.3c #5. Turn in your implementation of Tri(). You can construct the matrix in MATLAB with: A = full(spdiags([4*ones(100,1),-ones(100,1),-ones(100,1)],[0,-1,1],100,1
CS 257
Numerical Methods - Homework 1
August 31, 2006
1. [1pt] Count the number of operations involved in evaluating a polynomial using nested multiplication. Solution: From the pseudocode on page 8, it is clear that there are n multiplications an
CS 257/MATH 257
Numerical Methods - Homework 3
September 21, 2007
1. [1pt] Section 3.2 #15 Solution: The first iteration of Newton's method is: x1 = x0 - f (x0 ) f (x0 )
In this case x0 = 1, f (x0 ) = 1, and f (x0 ) = 3x2 - 1 = 2. Therefore x1 =
CS 257
Numerical Methods - Homework 5
October 3, 2006
1. [1pt] 7.3 #2 (a) Solution: 5(n 1) + 1 = 5n 4. The important part is that the number of operations is O(n). (b) Solution: 8(n 2) + 6 + 3(n 2) = 11n 16. 2. [2pt] 7.3c #5. Turn in your imp
CS 257
Numerical Methods - Homework 7
October 31, 2006
1. [1pt] 5.2 #7 2. [1pt] 5.2 #12 3. [1pt] 6.1 #1 4. [1pt] 6.1 #2 a,b 5. [1pt] Using the MATLAB les developed in lecture, produce a semilog plot of the # of function evaluations versus error (x
CS 257
Numerical Methods - Homework 3
September 17, 2006
1. [1pt] Section 3.2 #15 2. [1pt] Section 3.2 #28 (use MATLAB if you wish) 3. [1pt] Using the MATLAB implementation of Newtons method (see page 106) on the course webpage or one of your own,
CS 257
Numerical Methods - Homework 3
September 20, 2006
1. [1pt] Section 3.2 #15 Solution: The rst iteration of Newtons method is: x1 = x0 f (x0 ) f (x0 )
In this case x0 = 1, f (x0 ) = 1, and f (x0 ) = 3x2 1 = 2. Therefore x1 = 1/2. 0 2. [1pt