Solution (source code)

= Solution

At $x=1$, the <derivative> and <second derivative>[curvature] are $f'(1)=8$, $f''(1)=-8$, so the next iterate is $2$. At $x=2$, they are $f'(2)=4$, $f''(2)=4$, so the next iterate is $1$. Hence
$$
\boxed{1\longmapsto2\longmapsto1\longmapsto2\longmapsto\cdots.}
$$
The undamped <algorithm> does not converge to a <local minimum>[minimum]; it has an exact <two-cycle>. The implementation in (iii) detects this after returning to one and reports failure. This example illustrates why the local convergence result in (ii) does not justify global success.