Docsity

Math 151A Homework #2: Approximating Square Roots and Analyzing Convergence, Assignments of Mathematics

Toggle sidebar
bg1
Math 151A Homework #2 – due Wednesday 10/18, in class
Show all your work!
1. The square root of two, revisited.
Use Newton’s method and the secant method to approximate the value of √2 to within 10−4.
As usual, submit your code and a list of intermediate approximations.
a. Use Newton’s method with an initial guess p0= 1. How does this compare with
the bisection method (from last week’s homework), in terms of number of iterations
required?
b. Use Newton’s method with an initial guess p0= 0.0001. What happens to the number
of iterations required, and why?
c. Use the secant method with initial guesses p0= 1 and p1= 2. How does this compare
to the Newton’s method from part a?
2. Linear convergence. (problem 6b of section 2.4)
Show that the sequence defined by pn= 1/n2(for n≥1) converges linearly to p= 0. How
large must n be before we have |pn−p| ≤ 5×10−2?
3. Quadratic convergence. (problem 8, section 2.4)
Show that the sequence defined by pn= 10−2nconverges quadratically to 0.
4. Dealing with multiple zeros.
Consider the function f(x) = x3+ 4x2+ 8x.
a. Show that p= 0 is a simple zero of f(x).
b. Use Newton’s method to find the root to within 10−6, with initial guess p0= 1.
Now consider the similar function g(x) = x3+ 4x2.
c. Show that p= 0 is a zero of multiplicity 2 of g(x).
d. Use Newton’s method to find the root to within 10−6, with initial guess p0= 1.
e. Use the modified (multiple zero) Newton’s method to find the root to within 10−6, with
initial guess p0= 1.

Partial preview of the text

Download Math 151A Homework #2: Approximating Square Roots and Analyzing Convergence and more Assignments Mathematics in PDF only on Docsity!

Math 151A Homework #2 – due Wednesday 10/18, in class

Show all your work!

  1. The square root of two, revisited. Use Newton’s method and the secant method to approximate the value of

2 to within 10−^4. As usual, submit your code and a list of intermediate approximations.

a. Use Newton’s method with an initial guess p 0 = 1. How does this compare with the bisection method (from last week’s homework), in terms of number of iterations required? b. Use Newton’s method with an initial guess p 0 = 0.0001. What happens to the number of iterations required, and why? c. Use the secant method with initial guesses p 0 = 1 and p 1 = 2. How does this compare to the Newton’s method from part a?

  1. Linear convergence. (problem 6b of section 2.4) Show that the sequence defined by pn = 1/n^2 (for n ≥ 1) converges linearly to p = 0. How large must n be before we have |pn − p| ≤ 5 × 10 −^2?
  2. Quadratic convergence. (problem 8, section 2.4) Show that the sequence defined by pn = 10−^2 n converges quadratically to 0.
  3. Dealing with multiple zeros. Consider the function f (x) = x^3 + 4x^2 + 8x.

a. Show that p = 0 is a simple zero of f (x). b. Use Newton’s method to find the root to within 10−^6 , with initial guess p 0 = 1.

Now consider the similar function g(x) = x^3 + 4x^2.

c. Show that p = 0 is a zero of multiplicity 2 of g(x). d. Use Newton’s method to find the root to within 10−^6 , with initial guess p 0 = 1. e. Use the modified (multiple zero) Newton’s method to find the root to within 10−^6 , with initial guess p 0 = 1.