SUNY Geneseo Department of Mathematics
Wednesday, November 5
Math 230 01
Fall 2014
Prof. Doug Baldwin
function newton( f, x )
εs = ...some small number ...
εa = ... some large number ...
% x is current estimate
% x1 next estimate
while |εa| > εs
x1 = x - f(x) / f′(x)
εa = 100 | (x1 - x)/x1 |
x = x1
return x1
function derivative( f, x )
h = ... some small value ...
return ( f(x+h) - f(x-h) ) / (2h)
If
statements