Homework 3 Numerical Analysis (CMPS/MATH 305) · 4 QUESTION 8 (5 POINTS) Convert the equation x 2 5...

7
Homework 3 Numerical Analysis (CMPS/MATH 305) Hani Mehrpouyan This homework is due by Thursday May 2 nd 2013 QUESTION 1 (5 POINTS) Let the initial interval used in the bisection method have length b - a =3. Find the number of midpoints c n that must be calculated with the bisection method to obtain an approximate root within an error tolerance of 10 -9 . QUESTION 2 (5 POINTS) Let α be the smallest positive root of f (x)= l - x + sin x =0 Find an interval [a, b] containing α and for which the bisection method will converge to α. Then estimate the number of iterates needed to find α within an accuracy of 5 × 10 -8 .

Transcript of Homework 3 Numerical Analysis (CMPS/MATH 305) · 4 QUESTION 8 (5 POINTS) Convert the equation x 2 5...

Page 1: Homework 3 Numerical Analysis (CMPS/MATH 305) · 4 QUESTION 8 (5 POINTS) Convert the equation x 2 5 = 0 to the fixed-point problem x= x+c(x 5) g(x) with ca nonzero constant. Determine

Homework 3

Numerical Analysis (CMPS/MATH 305)

Hani Mehrpouyan

This homework is due by Thursday May 2nd 2013

QUESTION 1 (5 POINTS)

Let the initial interval used in the bisection method have length b− a = 3. Find the number of midpoints cn that

must be calculated with the bisection method to obtain an approximate root within an error tolerance of 10−9.

QUESTION 2 (5 POINTS)

Let α be the smallest positive root of

f(x) = l − x+ sinx = 0

Find an interval [a, b] containing α and for which the bisection method will converge to α. Then estimate the

number of iterates needed to find α within an accuracy of 5× 10−8.

Page 2: Homework 3 Numerical Analysis (CMPS/MATH 305) · 4 QUESTION 8 (5 POINTS) Convert the equation x 2 5 = 0 to the fixed-point problem x= x+c(x 5) g(x) with ca nonzero constant. Determine

1

QUESTION 3 (5 POINTS)

Imagine finding a root α satisfying 1 < α < 2. If you are using a binary computer with m binary digits in its

significand, what is the smallest error tolerance that makes sense in finding an approximation to α? If the original

interval [a, b] = [1, 2], how many interval halvings are needed to find an approximation c, to α with the maximum

accuracy possible for this computer?

QUESTION 4 (5 POINTS)

Give Newton’s method for finding m√a with a > 0 and m a positive integer.

Hint: Solve xm − a = 0.

QUESTION 5 (5 POINTS)

Consider applying Newton’s method to find the root α = 0 of sin(x) = 0. Find an interval [−r, r] for which the

Newton iterates will converge to α, for any choice of x0 in [−r, r]. Make r as large as possible.

Page 3: Homework 3 Numerical Analysis (CMPS/MATH 305) · 4 QUESTION 8 (5 POINTS) Convert the equation x 2 5 = 0 to the fixed-point problem x= x+c(x 5) g(x) with ca nonzero constant. Determine

2

Hint: Draw a graph of y = sin(x) and graphically interpret the placement of x0 and x1.

QUESTION 6 (5 POINTS)

Write

α− xn+l = (α− xn)(α− xn−l)−f ′′(ξn)2f ′(ζn)

as

α− xn+1 ≈M(α− xn)(α− xn−1)

where M is defined in the lectures. Then multiply both sides by M , obtaining

|M(a− xn+l) ≈ |M(a− xn)||M(a− xn−l)|

Let Bn = |M(a − xn)|, n ≥ 0. To have xn converge to α, we must have Bn converge to 0. The above formula

yields

Bn+1 ≈ BnBn−1

For simplicity, assume B0 = B1 = γ.

a) Compute approximate values of B2 , B3 , B4 , B5, B6, B7, in terms of γ.

b) If we write Bn = γqn , n ≥ 0, give a formula for qn+l in terms of qn−1 and qn. What are q0 and q1?

c) Experimentally, confirm that

qn ≈1√5rn+1 =

1√5(1.618)n+1

for larger values of n, say, n ≥ 4. The number r was used in the lectures. The numbers {qn} are called Fibonacci

numbers. The number r is called the golden mean (some authors define the golden mean to be r − 1).

Page 4: Homework 3 Numerical Analysis (CMPS/MATH 305) · 4 QUESTION 8 (5 POINTS) Convert the equation x 2 5 = 0 to the fixed-point problem x= x+c(x 5) g(x) with ca nonzero constant. Determine

3

d) Using (c), show that

Bn+1

Brn

is approximately constant. Find the constant. This result can be used to construct a proof of

limn→∞

|α− xn+1||α− xn|r

=

∣∣∣∣ f ′′(α)2f ′(α)

∣∣∣∣r−1 ≡ c

QUESTION 7(5 POINTS)

Show that for any constants c and d, |d| < 1, the equation x = c + d cos(x) ≡ g(x) has a unique solution α. In

addition, show that the iteration xn+1 = c+ d cos(xn) will converge to α. Bound the rate of convergence.

Page 5: Homework 3 Numerical Analysis (CMPS/MATH 305) · 4 QUESTION 8 (5 POINTS) Convert the equation x 2 5 = 0 to the fixed-point problem x= x+c(x 5) g(x) with ca nonzero constant. Determine

4

QUESTION 8 (5 POINTS)

Convert the equation x2 − 5 = 0 to the fixed-point problem x = x+ c(x2 − 5) ≡ g(x) with c a nonzero constant.

Determine the possible values of c to ensure convergence of xn+1 = xn + c(x2n − 5) to a =√5.

QUESTION 9 (5 POINTS)

What are the solutions α , if any, of the equation x =√1 + x? Does the iteration xn+1 =

√xn + 1 converge to

any of these solutions (assuming x0 is chosen sufficiently close to α)?

Page 6: Homework 3 Numerical Analysis (CMPS/MATH 305) · 4 QUESTION 8 (5 POINTS) Convert the equation x 2 5 = 0 to the fixed-point problem x= x+c(x 5) g(x) with ca nonzero constant. Determine

5

QUESTION 10 (5 POINTS)

Does the following iteration converge to the indicated α, provided x0 is chosen sufficiently close to α? If it does

converge, determine the convergence order.

xn+1 =15x2n − 24xn + 13

4xn, α = 1.

QUESTION 11 (5 POINTS)

Consider the problem of solving x/(1 + x) − 0.99 = 0, calling its root α. Then, let α(ε) be the solution of

x/(1 + x)− 0.99 + ε = 0.

a) Using

α(ε) ≈ α(0)− ε g(α(0))f ′(α(0))

, estimate α(ε)− α.

b) Calculate α(ε) directly, compute α(ε)− α, and compare with (a). Comment on your results.

Page 7: Homework 3 Numerical Analysis (CMPS/MATH 305) · 4 QUESTION 8 (5 POINTS) Convert the equation x 2 5 = 0 to the fixed-point problem x= x+c(x 5) g(x) with ca nonzero constant. Determine

6