Docsity

Newton's Method and Quadrature Rules: Exam II, Exams of Computer Science

Toggle sidebar
bg1
MAPL/CMSC 460
HOUR EXAM II December 6
1. Some machines do not have a reciprocal operation, i.e., they do not calcu-
late a−1directly. Instead they use a Newton routine to find a−1. For a given
a > 0, let
f(x) = a−1/x.
a) Write out the Newton iteration scheme for f(x) = 0. Verify that one
does not need the inverse operation even though fis defined in terms of 1/x.
b) If a > 0, what is the largest interval the starting value x0can be in to
ensure convergence?
c) How can you use the computed values xnto estimate error |xn−1/a|?
d) Let a= 5. Starting with x0= 1/3, compute x1, x2, x3.
2. Let f(x) be a function such that f(1) = f(0) = 0. Newton’s method is
applied to find these zeros and the iterates are displayed here. What is the
multiplicity of each root? Explain using the concepts of quadratic and linear
convergence.
2.03867725095765 -4.153670210771533e-04
1.62788244546213 -2.769305067474566e-04
1.33680736585863 -1.846288558537228e-04
1.14498693476347 -1.230896905052619e-04
1.03991501250167 -8.206147684636669e-05
1.00412157396385 -5.470839938082788e-05
1.00005013556604 -3.647259878618027e-05
1.00000000753921 -2.431521365587297e-05
-1.621020812729841e-05
1
pf2

Partial preview of the text

Download Newton's Method and Quadrature Rules: Exam II and more Exams Computer Science in PDF only on Docsity!

MAPL/CMSC 460

HOUR EXAM II December 6

  1. Some machines do not have a reciprocal operation, i.e., they do not calcu- late a−^1 directly. Instead they use a Newton routine to find a−^1. For a given a > 0, let f (x) = a − 1 /x. a) Write out the Newton iteration scheme for f (x) = 0. Verify that one does not need the inverse operation even though f is defined in terms of 1/x. b) If a > 0, what is the largest interval the starting value x 0 can be in to ensure convergence? c) How can you use the computed values xn to estimate error |xn − 1 /a|? d) Let a = 5. Starting with x 0 = 1/3, compute x 1 , x 2 , x 3.
  2. Let f (x) be a function such that f (1) = f (0) = 0. Newton’s method is applied to find these zeros and the iterates are displayed here. What is the multiplicity of each root? Explain using the concepts of quadratic and linear convergence.

2.03867725095765 -4.153670210771533e-

1.62788244546213 -2.769305067474566e-

1.33680736585863 -1.846288558537228e-

1.14498693476347 -1.230896905052619e-

1.03991501250167 -8.206147684636669e-

1.00412157396385 -5.470839938082788e-

1.00005013556604 -3.647259878618027e-

1.00000000753921 -2.431521365587297e-

-1.621020812729841e-

  1. If we use bisection, what precaution must be taken in finding the roots of f (x) = tan x − x = 0? What can go wrong?
  2. Let the simple quadrature rule on [− 1 , 1] be given by

Q(f ) = f (−

) + f (

a) Transform this rule to the general interval [a, b]. b) What is the compound rule that can be derived from this rule? c) Given that the simple rule has the error formula ∫ (^) b

a

f (x)dx = Q(f ) + R

where R ≈ C(b − a)^3 , what is the error for the compound rule? Explain.

  1. Let f (x) = |x − 1 |^1 /^2 sin x. a) If we are using an adaptive quadrature routine, like quad of MATLAB, to estimate

∫ (^2) 0 f^ (x)dx, where will the greatest number of function evaluations be needed? Why? b) How would you break up the integral, and then “soften” the singularity to make the evaluation of the integral more efficient and more accurate?