Iteration of functions: Finding zeros via iterations
Finding zeros via iteration of a function (programming assignment)
In this assignment we consider the polynomial \(x^3+3x-4\).
This polynomial has a unique root, which is \(x=1\), and can be rewritten as \(\bigl(x-1\bigr)\bigl(x^2+x+4\bigr)=\bigl(x-1\bigr)\bigl((x+\tfrac{1}{2})^2+3\!\tfrac{3}{4}\bigr)\).
The zero point of the polynomial can be approximated via iteration of a function. In this assignment we will experimentally study the convergence behaviour of several functions of which \(x=1\) is the fixed point.
Assignment
Write a computer program for function iteration and use the following functions: \[\begin{aligned} f_1(x) &=\frac{4-x^3}{3x}\\ \\
f_2(x) &= \frac{4-3x}{x^2}\\ \\ f_3(x) &= x^3+4x-4\\ \\ f_4(x) &= x-\frac{1}{6}(x^3+3x-4)\\ \\ f_5(x) &= \frac{2x^3+4}{3x^2+3}\end{aligned}\] Carry out experiments for each of these functions to approximate the zero point of \(x^3+3x-4\). Vary the tolerance and check how many iterations are needed (note: sometimes there is no convergence!).
Also experiment with a few different starting values \(x_0\). Along the way, write down any details you encounter (about convergence, speed of convergence, dependency on the starting value, etc.) and verify that the value of the derivative \(f_k'(1)\) is the predominant factor in all experiments.