CS323: Numerical Analysis and Computing Homework #4

Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due

CS323: Numerical Analysis and Computing Homework #4

For all programming assignments, please turn in your code along with your solution. Submissions should be made on Sakai.

Problem 1

Consider the following procedure for solving the nonlinear equation f(x)=0�(�)=0:

  • Start with an initial guess x0�0.

  • For k=0,1,2,…�=0,1,2,… do the following:

    • Compute the value that standard Newton’s method would provide, and call it x^k+1�^�+1, i.e.,

      x^k+1=xk−f(xk)f′(xk)�^�+1=��−�(��)�′(��)
    • Compute the next approximation xk+1��+1 by averaging xk�� and x^k+1�^�+1, i.e.,

      xk+1=xk+x^k+12��+1=��+�^�+12
  1. Show that if this method converges, it will converge to a solution of f(x)=0�(�)=0.
  2. Show that this method converges under the same conditions as Newton’s method.
  3. Determine the order of convergence of this method.

Problem 2

For the equation

f(x)=x2−3x+2=0�(�)=�2−3�+2=0

each of the following functions yields an equivalent fixed-point problem:

g1(x)g2(x)g3(x)g4(x)====(x2+2)/33x−2−−−−−√3−2/x(x2−2)/(2x−3)�1(�)=(�2+2)/3�2(�)=3�−2�3(�)=3−2/��4(�)=(�2−2)/(2�−3)
  1. Analyze the convergence properties of each of the corresponding fixed-point iteration schemes for the root x=2�=2 by considering |g′i(2)||��′(2)|.
  2. Confirm your analysis by implementing each of the schemes and verifying its convergence (or lack thereof) and approximate convergence rate.

Problem 3

Implement the bisection, Newton, and secant methods for solving nonlinear equations in one dimension, and test your implementations by finding at least one root for each of the following equations. What termination criterion should you use? What convergence rate is achieved in each case?

  1. x3−2x−5=0�3−2�−5=0.
  2. e−x=x�−�=�.
  3. xsinx=1�sin⁡�=1.
  4. x3−3x2+3x−1=0�3−3�2+3�−1=0.

Problem 4

Suppose you are using the Secant method to find a root x⋆�⋆ of a nonlinear equation f(x)=0�(�)=0. Show that if at any iteration it happens to be the case that either xk=x⋆��=�⋆ or xk−1=x⋆��−1=�⋆ (but not both), then it will also be true that xk+1=x⋆��+1=�⋆.

发表评论

电子邮件地址不会被公开。 必填项已用*标注