0% found this document useful (0 votes)
255 views3 pages

Homework 01

Uploaded by

nothenric
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
255 views3 pages

Homework 01

Uploaded by

nothenric
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

UC Berkeley Math W128A: Homework 1

Prof. Per-Olof Persson (persson@[Link])

MATLAB usage classification: PEN (pen and paper only), CALC (use as calculator), CODE (run codes).

0. Please assign yourself a self grade on this homework (0, 1, or 2) based off the guidelines in the syllabus.
1. (1.1-1c, CALC) Show that the following equation has at least one solution in the given intervals:

2x cos(2x) − (x − 2)2 = 0, [2, 3] and [3, 4].

2. (1.1-5a, PEN) Find max0≤x≤1 |f (x)| when f (x) = (2 − ex + 2x)/3.


3. (1.1-16, CALC) Use the error term of a Taylor polynomial to estimate the error involved in using
sin x ≈ x to approximate sin 1◦ .

4. (1.1-19, CALC) Let f (x) = ex and x0 = 0. Find the nth Taylor polynomial Pn (x) for f (x) about x0 .
Find a value of n necessary for Pn (x) to approximate f (x) to within 10−6 on [0, 0.5].

5. (1.1-22, PEN) Use the Intermediate Value Theorem and Rolle’s theorem to show that the graph of
f (x) = x3 + 2x + k crosses the x-axis exactly once, regardless of the value of the constant k.

6. (1.1-29b, PEN) Suppose that f is continuous on [a, b], that x1 and x2 are in [a, b], and that c1 and c2
are positive constants. Show that a number ξ exists between x1 and x2 with

c1 f (x1 ) + c2 f (x2 )
f (ξ) = .
c1 + c2

7. (1.2-1a/2d, CALC) Compute the absolute error and relative error in approximations of p by p∗ :
1a. p = π, p∗ = 22/7

2d. p = 9!, p∗ = 18π(9/e)9

8. (1.2-5c, CALC) Perform the following computation (i) exactly, (ii) using three-digit chopping arith-
metic, and (iii) using three-digit rounding arithmetic. (iv) Compute the relative errors in parts (ii)
and (iii).  
1 3 3
− +
3 11 20

9. (1.2-11, CALC) The first three nonzero terms of the Maclaurin series for the arctangent function are
x − (1/3)x3 + (1/5)x5 . Compute the absolute error and relative error in the following approximations
of π using the polynomial in place of the arctangent:
a.     
1 1
4 arctan + arctan
2 3
b.    
1 1
16 arctan − 4 arctan
5 239

10. (1.2-14, CALC) Let


ex − e−x
f (x) =
x
a. Find limx→0 (ex − e−x ) /x.
b. Use three-digit rounding arithmetic to evaluate f (0.1).

This content is protected and may not be shared, uploaded, or distributed. Page 1/ 3
c. Replace each exponential function with its third Maclaurin polynomial, simplify, and repeat part
(b).
d. The actual value is f (0.1) = 2.003335000. Find the relative error for the values obtained in parts
(b) and (c).

11. (1.2-19/20cd, CALC, use Wolfram Alpha for exact decimal numbers) Use the 64-bit long real format
to find the decimal equivalent of the following floating-point machine numbers. Find the next largest
and smallest machine numbers in decimal form for these numbers.

c. 0 01111111111 0101001100000000000000000000000000000000000000000000
d. 0 01111111111 0101001100000000000000000000000000000000000000000001
P10 1
1/i2 first by + 14 +

12. (1.3-1a, CODE) Use three-digit chopping arithmetic to compute the sum i=1 1
1 1 1
··· + 100 and then by 100 + 81 + · · · + 11 . Which method is more accurate, and why?

13. (1.3-6, PEN) Find the rates of convergence of the following sequences as n → ∞
a. limn→∞ sin n1 = 0
b. limn→∞ sin n12 = 0
2
c. limn→∞ sin n1 = 0
d. limn→∞ [ln(n + 1) − ln(n)] = 0

14. (1.3-7, PEN) Find the rates of convergence of the following functions as h → 0
a. limh→0 sinh h = 1
b. limh→0 1−cosh
h
=0
sin h−h cos h
c. limh→0 h =0
1−eh
d. limh→0 h = −1

15. (1.3-11, PEN) The sequence {Fn } described by F0 = 1, F1 = 1, and Fn+2 = Fn + Fn+1 , if n ≥ 0, is
called a Fibonacci sequence. Its terms occur naturally in many botanical species, particularly those
√ the sequence {xn } , where
with petals or scales arranged in the form of a logarithmic spiral. Consider
xn = Fn+1 /Fn Assuming that limn→∞ xn = x exists, show that x = (1 + 5)/2. This number is called
the golden ratio.

16. (2.1-1, CALC) Use the Bisection method to find p3 for f (x) = x − cos x on [0,1].
17. (2.1-12, CODE) Let f (x) = (x + 2)(x + 1)2 x(x − 1)3 (x − 2). To which zero of f does the Bisection
method converge when applied on the following intervals?
a. [−1.5, 2.5]
b. [−0.5, 2.4]
c. [−0.5, 3]
d. [−3, −0.5]

18. (2.1-17, CALC) Use Theorem 2.1 to find a bound for the number of iterations needed to achieve an
approximation with accuracy 10−4 to the solution of x3 − x − 1 = 0 lying in the interval [1, 2]. Find an
approximation to the root with this degree of accuracy.

19. (2.2-5bd, CODE) The following methods are proposed to compute 211/3 . Rank them in order, based
on their apparent speed of convergence, assuming p0 = 1.
p3 −21
b. pn = pn−1 − n−1
3p2
 1/2 n−1
21
d. pn = pn−1

This content is protected and may not be shared, uploaded, or distributed. Page 2/ 3
20. (2.2-13abf, CALC to find interval and number of iterations, CODE to compute the approximations)
For each of the following equations, determine an interval [a, b] on which fixed-point iteration will
converge. Estimate the number of iterations necessary to obtain approximations accurate to within
10−5 , and perform the calculations.
x 2
a. x = 2−e 3+x
b. x = x52 + 2
f. x = 0.5(sin x + cos x)

This content is protected and may not be shared, uploaded, or distributed. Page 3/ 3

You might also like