% define functions and derivatives
f  = @(x) (x+1)*(x-1);
f1 = % define dervative of f as function handle;
x_exact_f = 1;

% Define function g
% and derivative of g as function handles
% define exact root of g as function handle

% initial values for Newton and secant method
x0 = 2; x1 = 1.9;
% tolerance for stopping criterion
tol = 1e-6;

% iterates for Newton and secant method for f
x_newton_f = myNewton(f,f1,x0,tol);
x_secant_f = % call secant method
% absolute errors for newton and secant method for f
error_newton_f = %calculate absolute error for newton
error_newton_f = % calculate absolute error for secant method

% iterates for Newton and secant method for g


% absolute errors for newton and secant method for g



% semilogarithmic plots of all errors
figure(1)
semilogy(error_newton_f,'-o');