Tutorial 3
Tutorial 3
Tutorial 3
1. TUTORIAL PROBLEMS
1. Let g(x) have a fixed point p that satisfies g ′ (p) = g ′′ (p) = 0. Assume
that the fixed point iteration scheme with the initial value p0 converges to p.
Prove that the convergence is at least of order 3.
3. Consider the iteration scheme for computing c1/3 (with c > 0):
(
pn+1 = αpn + βcp−2 2 −5
n + γc pn , n ≥ 0,
given p0 sufficiently close to c1/3 .
1
2. PROGRAMMING
def fixedpoint(p0,N,epsilon):
i=1
while i<=N:
p = g(p0)
if abs(p-p0)<epsilon:
fp=p
return fp
else:
p0=p
i=i+1
print("The method failed after",N,"iterations")
The iteration scheme for this function is the Newton’s method to solve
Run the programme with the following initial values p0: 0.02, 0.021, 0.93,
0.94, 1.13, 1.14, 1.475, 1.476 and note the result. This shows you how the
result depends sensitively on the initial value p0.
Task 2. Modify the code so that we will stop when |f (p)| < ε instead.
You will need to define also the function f . This shows that solving the
equation f (x) = 0 is equivalent to finding fixed points for function g above.