

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Jim Lambers Math 105A Summer Session I 2003- Homework Assignment 3 Hints
Each homework assignment from the textbook will be accompanied by a handout like this one, that contains hints about the exercises. As I receive questions on the assignment, this handout may be updated with additional information. When this occurs, this will be indicated on the Updates page of the site,
http://math.uci.edu/∼jlambers/math105a/updates.html
which you should be checking frequently.
x=[ 8.3 8.6 ]; y=[ 17.56592 18.50515 ];
and call your function with the arguments x and y. I’ve noticed that a lot of you write code that prompts the user for data, using the input function. That’s not necessary unless you’re writing an application that you expect someone else to use, which isn’t the case here.
h(2c 0 + c 1 ) = 3 f ′(x 0 ) −
h
(a 1 − a 0 ),
h(cn− 1 + 2cn) =
h (an − an− 1 ) − 3 f ′(xn),
where h is the spacing between the interpolation points x 0 , x 1 and x 2 , which are equally spaced in this problem. The third equation comes from the fact that for clamped splines and natural splines, the coefficients c 0 , c 1 ,... , cn satisfy the equations
h(cj + 4cj+1 + cj+2) =
h (aj+2 − 2 aj+1 + aj ), j = 0, 1 ,... , n − 2 ,
but since n = 2 in this problem, there is only one equation of this form. (b) To integrate each piece of the spline, you can use the powerform function posted on the site to convert the polynomial into power form, and then use polyint to compute its antiderivative and polyval to evaluate the antiderivative at the limits of integration. (c) The answer given in the back of the book is the bound for the error in the integral. (d) There is a typo in the answer in the back of the book. At the end of the answer, it should read: S(0.02) = 1.041139 and s(0.02) = 1.040811.
To determine the “most accurate” three-point formula, use the error terms. These terms can be found in the Lecture 11 Notes and in the text. How do these error terms differ, and how do these differences influence the size of the error? In part (a), there is a typo in one of the answers in the back of the book. The value of f ′(1.4) is − 32 .510850, not − 32 .150850.