Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Applying Newton's Method to Find Reciprocals and Fixed Points in Numerical Analysis - Prof, Assignments of Mathematical Methods for Numerical Analysis and Optimization

Solutions to problem 1 and 3 from writing assignment 03 of the che/cosc/math 4340-01 numerical analysis course. It explains how to find the reciprocal of a number using newton's method without division or exponentiation and derives an algorithm for it. Additionally, it discusses the number of steps required to obtain the root with accuracy 10−8 when applying newton's method to find the square root of 1. Furthermore, it explains how to find a fixed point of a function using newton's method.

Typology: Assignments

Pre 2010

Uploaded on 08/19/2009

koofers-user-gmv
koofers-user-gmv 🇺🇸

10 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CHE/COSC/MATH 4340-01 Numerical Analysis
Solution of Writing Assignment 03
Due Date: Tuesday, 02/12/09
Problem 1.
To compute reciprocals without division, we can solve x = 1/R by finding a zero of the function f(x) =
x1R. Derive a short algorithm to find 1/Rby applying Newton’s method applied to f(x). Do not use
division or exponentiation in your algorithm. For positive R, what initial iterates are suitable?
Answer: Notice that f0(x) = x2. Newton’s method for this function reads
xn+1=xnx1
nR
x2
n
=xn+x2
n(x1
nR)
=2xnRx2
n.
Thus the Newton’s method is simplified as xn+1=xn(2Rxn).
Now suppose Ris a positive number.
Notice that if we choose x0=0, then next iterate will be 0, and this keeps going. So we cannot
choose x0=0.
If we choose an initial iterate that is a negative number, the expression in parenthesis will be
positive, and as a result the next iterate will be negative, and by the same token, we will create a
sequence of negative numbers. So negative initial iterate is not an option.
If we choose a positive number x0that makes Rx0>2, then the term in parenthesis will be negative,
which would in turn result in a negative number for the next iterate. Thus we may not choose x0
that makes Rx0>2.
Our only option then is to choose x0>0 and 2Rx0>0. This would result in 0<x0<2/R. Note:
the inequality is strict, i.e., x06=0 and x06=2/R.
1
pf3
pf4

Partial preview of the text

Download Applying Newton's Method to Find Reciprocals and Fixed Points in Numerical Analysis - Prof and more Assignments Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

CHE/COSC/MATH 4340-01 Numerical Analysis

Solution of Writing Assignment 03 Due Date: Tuesday, 02/12/

Problem 1.

To compute reciprocals without division, we can solve x = 1/R by finding a zero of the function f (x) = x^1 − R. Derive a short algorithm to find 1/R by applying Newton’s method applied to f (x). Do not use division or exponentiation in your algorithm. For positive R, what initial iterates are suitable?

Answer: Notice that f ′(x) = −x−^2. Newton’s method for this function reads

xn+ 1 = xn − x

− n 1 − R −x− n^2 = xn + x^2 n(x− n 1 − R) = 2 xn − Rx n^2.

Thus the Newton’s method is simplified as xn+ 1 = xn( 2 − Rxn). Now suppose R is a positive number.

  • Notice that if we choose x 0 = 0, then next iterate will be 0, and this keeps going. So we cannot choose x 0 = 0.
  • If we choose an initial iterate that is a negative number, the expression in parenthesis will be positive, and as a result the next iterate will be negative, and by the same token, we will create a sequence of negative numbers. So negative initial iterate is not an option.
  • If we choose a positive number x 0 that makes Rx 0 > 2, then the term in parenthesis will be negative, which would in turn result in a negative number for the next iterate. Thus we may not choose x 0 that makes Rx 0 > 2.
  • Our only option then is to choose x 0 > 0 and 2 − Rx 0 > 0. This would result in 0 < x 0 < 2 /R. Note: the inequality is strict, i.e., x 0 6 = 0 and x 0 6 = 2 /R.

Problem 3.

If Newton’s method is used with f (x) = x^2 − 1 and x 0 = 1010 , how many steps are required to obtain the root with accuracy 10−^8? Answer: Newton’s method applied to this f reads

xn+ 1 = xn − x

(^2) n − 1 2 xn^ =^

x^2 n + 1 2 xn^.

We know that there are r = −1 and r = 1 are zeros of f (x) that are simple, so we may expect that if the iterates are close enough to the neighborhood of one of the zero, then Newton method will exhibit a quadratic convergence, namely |en+ 1 | ≤ C|en|^2 ,

where C = 12 f^

′′(r) f ′(r). Suppose now that x 0 = 1010. Since this is a positive number, we may expect that Newton’s method will converge to r = 1. However, initially it will not exhibit a quadratic convergence because x 0 is clearly much far away from r = 1. In particular, writing en = xn − 1, we have

en+ 1 = x

(^2) n + 1 2 xn^ −^1 =^

x^2 n + 1 − 2 xn 2 xn^ =

(xn − 1 )^2 2 xn^ =^

e^2 n 2 xn^.

At the initial stage when the iterates are still very large, we know that en ≈ xn and thus,

|en+ 1 | = |en|

2 2 |xn| ≤

|en| 2 ,^ (0.1)

i.e., we only have a first order convergence. The question is how close xn should be when it will gain quadratic convergence. We think that xn is close enough already if |en| < 1. Thus before |en| < 1, we should expect the method to have first order convergence. By induction argument we see that (0.1) yields

|en| < |e 20 n|.

Setting this inequality to be less than 2, yields

|e 0 | 2 n^ <^1 ,

which gives 1010 < 2 n.

Problem 4.

If we attempt to find a fixed point of F(x) by using Newton’s method, what iteration formula would you get? Answer: A number x is a fixed point of F if x = F(x). Now choose G(x) = x − F(x). Then finding a fixed point of F is equivalent to finding a zero of G. Notice that G′(x) = 1 − F′(x). Application of Newton’s method gives xn+ 1 = xn − x 1 n −^ − F^ F′((xxnn)) = xn^ −^ xnF

′(xn) − xn + F(xn) 1 − F′(xn) = F(xn)^ −^ xnF

′(xn) 1 − F′(xn)