fprintf ( 1, '\n' );
fprintf ( 1, 'jump_newton:\n' );
fprintf ( 1, '  Use Newton''s method to seek a root of the jump function.\n' );
%
%  Newton diverges for x = 6, but quickly converges for x = 7.
%
x = 7.0;
xtol = 0.0000001;
ftol = 0.0000001;
itmax = 50;

[ x, it ] = newton ( @(x)jump(x), @(x)jump_fp(x), x, xtol, ftol, itmax );

fprintf ( 1, '\n' );
fprintf ( 1, '  Number of steps = %d\n', it );
fprintf ( 1, '  f(%g) = %g\n', x, jump(x) );

