Docsity

Homework 1 | Numerical Analysis - Spring 2009 | MATH 128A, Assignments of Mathematical Methods for Numerical Analysis and Optimization

Toggle sidebar
bg1
UCB Math 128A, Spring 2009: Homework 1
Due January 28
Section 1.1
1. Show that the following equations have at least one solution in the given intervals.
c. 2xcos(2x)−(x−2)2= 0,[2,3] and [3,4]
4. Find maxa≤x≤b|f(x)|for the following functions and intervals.
a. f(x) = (2 −ex+ 2x)/3,[0,1]
5. Use the Intermediate Value Theorem and Rolle’s Theorem to show that the graph of f(x) =
x3+ 2x+kcrosses the x-axis exactly once, regardless of the value of the constant k.
14. Use the error term of a Taylor polynomial to estimate the error involved in using sinx≈x
to approximate sin 1◦.
19. Let f(x) = exand x0= 0. Find the nth Taylor polynomial Pn(x) for f(x) about x0. Find a
value of nnecessary for Pn(x) to approximate f(x) to within 10−6on [0,0.5].
26. Suppose f∈C[a, b], that x1and x2are in [a, b], and that c1and c2are positive constants.
Show that a number ξexists between x1and x2with
f(ξ) = c1f(x1) + c2f(x2)
c1+c2
Section 1.2
1. Compute the absolute error and relative error in approximations of pby p∗.
a. p=π, p∗= 22/7
h. p= 9!, p∗=√18π(9/e)9
4. Perform the following computations (i) exactly, (ii) using three-digit chopping arithmetic,
and (iii) using three-digit rounding arithmetic. (iv) Compute the relative errors in parts (ii)
and (iii).
c. 1
3−3
11 +3
20
9. 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 approxi-
mations of πusing the polynomial in place of the arctangent:
a. 4arctan 1
2+ arctan 1
3
b. 16arctan 1
5−4arctan 1
239
pf2

Partial preview of the text

Download Homework 1 | Numerical Analysis - Spring 2009 | MATH 128A and more Assignments Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

UCB Math 128A, Spring 2009: Homework 1

Due January 28

Section 1.

  1. Show that the following equations have at least one solution in the given intervals.

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

  1. Find maxa≤x≤b |f (x)| for the following functions and intervals.

a. f (x) = (2 − ex^ + 2x)/ 3 , [0, 1]

  1. Use the Intermediate Value Theorem and Rolle’s Theorem to show that the graph of f (x) = x^3 + 2x + k crosses the x-axis exactly once, regardless of the value of the constant k.
  2. Use the error term of a Taylor polynomial to estimate the error involved in using sin x ≈ x to approximate sin 1◦.
  3. Let f (x) = ex^ and x 0 = 0. Find the nth Taylor polynomial Pn(x) for f (x) about x 0. Find a value of n necessary for Pn(x) to approximate f (x) to within 10−^6 on [0, 0 .5].
  4. Suppose f ∈ C[a, b], that x 1 and x 2 are in [a, b], and that c 1 and c 2 are positive constants. Show that a number ξ exists between x 1 and x 2 with

f (ξ) = c 1 f (x 1 ) + c 2 f (x 2 ) c 1 + c 2

Section 1.

  1. Compute the absolute error and relative error in approximations of p by p∗.

a. p = π, p∗^ = 22/ 7 h. p = 9!, p∗^ =

18 π(9/e)^9

  1. Perform the following computations (i) exactly, (ii) using three-digit chopping arithmetic, and (iii) using three-digit rounding arithmetic. (iv) Compute the relative errors in parts (ii) and (iii).

c.

3 −^

3 11

  1. The first three nonzero terms of the Maclaurin series for the arctangent function are x − (1/3)x^3 + (1/5)x^5. Compute the absolute error and relative error in the following approxi- mations of π using the polynomial in place of the arctangent:

a. 4

[

arctan

2

  • arctan

3

)]

b. 16arctan

5

− 4arctan

239

  1. Let

f (x) = ex^ − e−x x

a. Find limx→ 0 (ex^ − e−x)/x. b. Use three-digit rounding arithmetic to evaluate f (0.1). c. Replace each exponential function with its third Maclaurin polynomial, 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).

  1. Use the 64-bit long real format to find the decimal equivalent of the following floating-point machine numbers.

c. 0 01111111111 01010011000000000000000000 00000000000000000000000000 d. 0 01111111111 01010011000000000000000000 00000000000000000000000001

  1. Find the next largest and smallest machine numbers in decimal form for the numbers given in Exercise 15.