CSC 349A PRACTICE MIDTERM EXAM
There are 5 questions of equal value. Time allowed 75 minutes. Question 1. (a) (12 marks) Compute the Taylor polynomial of degree 3 for the function f(x) = (1 + x)3/2 expanded about x0=0. (b) (8 marks) Use the error term in
COMPUTER SCIENCE 349A
SAMPLE EXAM QUESTIONS WITH SOLUTIONS
PARTS 3, 5, 6 , 7
PART 3.
3.1
Suppose that a computer program, using the Gaussian elimination algorithm, is to
be written to accurately solve a system of linear equations Ax = b , where A is an
ar
Taylor's Theorem:
f x f
n
f x0
f x0 x x0
n
'
f ' x0 x x0 2! x n x x0 1 !
2
.
Solution: f(x) = [x - (x-1)] x (x + (x-1) / (x - (x-1)= 1 / (x + (x-1) Let f(x) = [(sin(x) - ex) + 1] / x2, x 0, x in radians. To 4 significant digits, the exact value of f(0.123
%
$
"
8 d
#
e
$
"
Y
%
$ d
) 1
S q
S
S
S ' e
e q 1
S ' 1 q
S 1 ' q 1
S q q q 1
0
1 q
S q
S q 0
1 q
S
S q
e
S
S q '
S
T ) & # w P A 4 ( V 4 ( 4
S ) 4 h f V f V h x 4 y 2 6
d 2
U 5 6 4 h x P A 4 ( V 4 ( 4
T
S
w
w
"
8
$
"
8
v
W
$
"
Y
u
#
"
a
COMPUTER SCIENCE 349A
SAMPLE EXAM QUESTIONS WITH SOLUTIONS
PARTS 1, 2
PART 1.
1.1
(a) Define the term ill-conditioned problem.
(b) Give an example of a polynomial that has ill-conditioned zeros.
1.2
Consider evaluation of
f ( x) =
1
,
1 tanh( x)
where tan
Name: _ Please Print Instructor: Dr. F. Roberts
Perm. Reg. No. _
UNIVERSITY OF VICTORIA PRACTICE FINAL EXAMINATION COMPUTER SCIENCE 349A
Question 1 2 3 4 5 6 7 8 9 10 Total Instructions : This is a 3 hour, closed-book examination. No calculators or notes
COMPUTER SCIENCE 349A SAMPLE EXAM QUESTIONS WITH SOLUTIONS CHAPTER 1.
1.1 (a) Define the term "ill-conditioned problem". (b) Give an example of a polynomial that has ill-conditioned zeros. 1.2 Consider evaluation of f ( x) = 1 , 1 - tanh( x) where tanh( x
However, if evaluated in floating-point arithmetic, these expressions may give very
different results due to subtractive cancellation.
In thefollowing, no justification for your answers is required. Just specify either
ACCURATE or INACCURATE as your answe
COMPUTER SCIENCE 349A
SAMPLE FINAL EXAM QUESTIONS WITH SOLUTIONS
1.
(a) For what values of the real variable x , where x > 1 , is the following
expression subject to subtractive cancellation that will produce a very inaccurate result
(in terms of relative