% QUICKYNEWTON does a couple of Newton's method examples
%              using the toys used by Bueler in class 9 Oct

% show more digits, but don't use excessive space on the screen
format long
format compact

% quicky for Newton on   x = tan(x)
f = @(x) x - tan(x)
df = @(x) 1 - (sec(x))^2
x = 4.5, for k=1:10, x = x - f(x)/df(x), end 

% quicky for Newton on   sin(x) = 0  (simpler style)
x = 3, for k=1:10, x = x - sin(x)/cos(x), end

