COMPUTER PROBLEMS 1.2

1 (a) Define \(g(x)={(2x+2)}^{\frac{1}{3}}\), for example. Using the fpi.py code, the commands
def g(x): return  (2*x+2)**(1/3)
x=fpi(g,1/2,20)
yields the solution \(1.76929235\) to 8 correct decimal places.

1 (b) Define \(g(x)=\ln(7-x)\). Using fpi.py as in part (a) returns the solution \(1.67282170\) to 8 correct decimal places.

1 (c) Define \(g(x)=\ln(4-\sin x)\). Using fpi.py as in part (a) returns the solution \(1.12998050\) to 8 correct decimal places.


3 (a) Iterate \(g(x)=(x+3/x)/2\) with starting guess \(1\). After 4 steps of FPI, the results is \(1.73205081\) to 8 correct places.

3 (b) Iterate \(g(x)=(x+5/x)/2\) with starting guess \(1\). After 5 steps of FPI, the results is \(2.23606798\) to 8 correct places.


5 Iterating \(g(x)=\cos^2x\) with initial guess \(x_0=1\) results in \(0.641714\) to six correct places after \(350\) steps. Checking \(|g'(0.641714)|\approx0.96\) verifies that FPI is locally convergent by Theorem 1.6.
7 (a) Almost all numbers between \(0\) and \(1\).

7 (b) Almost all numbers between \(1\) and \(2\).

7 (c) Any number greater than \(3\) or less than \(-1\) will work.