



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 1
This assignment is due in class on Thursday, July 8. The exercises are from the textbook, Nu- merical Analysis, 7th Edition, by Burden and Faires. Note: These exercises have been modified to indicate tasks that must be performed using MATLAB. For other exercises, you may use MATLAB if you wish. For all exercises, you must show your work to receive full credit. For exercises involving MAT- LAB, you must submit your code and your output.
(a) Use P 2 (0.5) to approximate f (0.5). Find an upper bound on the error |f (0.5) − P 2 (0.5)| using the error formula, and compare it to the actual error. (b) Find a bound for the error |f (x) − P 2 (x)| in using P 2 (x) to approximate f (x) on the interval [0, 1]. (c) Approximate
0 f^ (x)^ dx^ using^
0 P^2 (x)^ dx. (d) Find an upper bound for the error in (c) by finding an upper bound for
0 |R^2 (x)|^ dx, and compare the bound to the actual error.
(a) Show that if f satisfies a Lipschitz condition with Lipschitz constant L on an interval [a, b], then f ∈ C[a, b], where C[a, b] is the space of functions that are continuous on [a, b]. (b) Show that if f has a derivative that is bounded on [a, b] by L, then f satisfies a Lipschitz condition with Lipschitz constant L on [a, b]. (c) Give an example of a function that is continuous on a closed interval but does not satisfy a Lipschitz condition on the interval. Hint: what can be said about the derivative of such a function?
(a) 150 (b) 900 (c) 1500 (d) 90
(a) 133 + 0. 921 (b) 133 − 0. 499 (c) (121 − 0 .327) − 119 (d) (121 − 119) − 0. 327 (e)
(^1314) − (^67) 2 e− 5. 4 (f) − 10 π + 6e − 623 (g)
9
7
(h) π−^
(^227) 1 17
(a) 4
arctan
2
3
(b) 16 arctan
5
− 4 arctan
239
Implement this algorithm using MATLAB and solve the following linear systems.
(a)
(b)
013 x − 6. 099 y = 14. 22 − 18. 11 x + 112. 2 y = − 0. 1376
The binomial coefficient (^) ( m k
m! k!(m − k)! describes the number of ways of choosing a subset of k objects from a set of m elements.
(a) Suppose decimal machine numbers are of the form
± 0 .d 1 d 2 d 3 d 4 × 10 n, 1 ≤ d 1 ≤ 9 , 0 ≤ di ≤ 9 , i = 2, 3 , 4 , |n| ≤ 15.
What is the largest value of m for which the binomial coefficient
m k
can be computed for all k by the definition without causing overflow?
(b) Show that
m k
can also be computed by
( m k
( (^) m k
) (^ m − 1 k − 1
m − k + 1 1
(c) What is the largest value of m for which the binomial coefficient
m 3
can be computed by the formula in part (b) without causing overflow? (d) Use the equation in part (b) and four-digit chopping arithmetic to compute the number of possible 5-card hands in a 52-card deck. Compute the actual and relative errors.
i=1(1/i
(^2) ) first by 1 1 +^
1 4 + · · · + 1001 and then by 1001 + 811 + · · · + 11. Which method is more accurate, and why?
(b) Write an algorithm to sum the finite series
i=1(1/i (^2) ) in reverse order. Implement your algorithm using MATLAB and run it with N = 10.
arctan x = lim n→∞ Pn(x) = lim n→∞
∑^ n
i=
(−1)i+^ x^2 i−^1 2 i − 1
(a) Use the fact that tan π/4 = 1 to determine the number n of terms of the series that need to be summed to ensure that | 4 Pn(1) − π| < 10 −^3. (b) The C++ programming language requires the value of π to be within 10−^10. How many terms of the series would we need to sum to obtain this degree of accuracy?
(b) Make a table listing 1/n, 1/n^2 , 1/n^3 , and 1/n^4 for n = 5, 10 , 100, and 1000, and discuss the varying rates of convergence of these sequences as n becomes large.
F 1 (x) = L 1 + O(xα) and F 2 (x) = L 2 + O(xβ^ ).
Let c 1 and c 2 be nonzero constants, and define
F (x) = c 1 F 1 (x) + c 2 F 2 (x) and G(x) = F 1 (c 1 x) + F 2 (c 2 x).
Show that if γ = min{α, β}, then as x approaches zero, (a) F (x) = c 1 L 1 + c 2 L 2 + O(xγ^ ) (b) G(x) = L 1 + L 2 + O(xγ^ )