Docsity

2 Problems on Introduction to Scientific Computing - Assignment 3 | CSCI 407, Assignments of Computer Science

Toggle sidebar
bg1
HW 3, due Monday, Oct. 2
Please turn in your papers to me at the beginning of the class on Monday.
Solve problem 13(b) on page 164. Keep numbers in the divided difference table as fractions,
that is, do not change fractions to decimal numbers. Rewrite p(x) in nested form.
Solve problem 13 on page 178.
Solve problem 9(a) on page 192. Do not derive the given formula. Just use it to show that
for the error
E=f(3)(x)โˆ’1
2h3[f(x+ 2h)โˆ’f(xโˆ’2h)โˆ’2{f(x+h)โˆ’f(xโˆ’h)}],
we have |E| โ‰ค Chp. Find pand Cassuming that f(5) is continuous on an interval [a, b]
containing xโˆ’2hand x+ 2h. (Donโ€™t worry about the answer in the book.)
Computer problem. Solve problems 1 and 2 on page 179. Use double precision (double in
C++) and procedures Coef and Eval on pages 153 and 154. For each suggested value of x,
print in a horizontal line x,f(x), pn(x), |f(x)โˆ’pn(x)|using 6, 7 significant decimal digits
for each of those 4 numbers (you can use cout in C++). Turn in: code, results, discussion.

Partial preview of the text

Download 2 Problems on Introduction to Scientific Computing - Assignment 3 | CSCI 407 and more Assignments Computer Science in PDF only on Docsity!

HW 3, due Monday, Oct. 2

Please turn in your papers to me at the beginning of the class on Monday.

Solve problem 13(b) on page 164. Keep numbers in the divided difference table as fractions, that is, do not change fractions to decimal numbers. Rewrite p(x) in nested form.

Solve problem 13 on page 178.

Solve problem 9(a) on page 192. Do not derive the given formula. Just use it to show that for the error

E = f (3)(x) โˆ’

2 h^3

[f (x + 2h) โˆ’ f (x โˆ’ 2 h) โˆ’ 2 {f (x + h) โˆ’ f (x โˆ’ h)}],

we have |E| โ‰ค Chp. Find p and C assuming that f (5)^ is continuous on an interval [a, b] containing x โˆ’ 2 h and x + 2h. (Donโ€™t worry about the answer in the book.)

Computer problem. Solve problems 1 and 2 on page 179. Use double precision (double in C++) and procedures Coef and Eval on pages 153 and 154. For each suggested value of x, print in a horizontal line x, f (x), pn(x), |f (x) โˆ’ pn(x)| using 6, 7 significant decimal digits for each of those 4 numbers (you can use cout in C++). Turn in: code, results, discussion.