function Xs = RegulaRoot_Schultz(Fun,a,b,ErrMax)
if( Fun(a)>0 || Fun(b)<0 )
    disp('ERROR not bounded properly')
    Xs = ('ERROR');
    return;
end
tol = ErrMax;
error = 100;
count = 0;
x = (a*Fun(b)-b*Fun(a))/(Fun(b)-Fun(a));
while((error > tol) && (count < 100))
    count = count + 1;
    value = Fun(x);
    if(value < 0)
        a = x;
    else
        b = x;
    end
    plot(x,value,'rx-')
    new_x = (a*Fun(b)-b*Fun(a))/(Fun(b)-Fun(a));
    error = abs((new_x-x)/x);
    x = new_x;
end
if count < 1000
    disp('Regula Falsi Method-')
    disp('Tolerance Reached')
    disp('Error:')
    disp(error)
    disp('Solution:')
    disp(x)
else
    disp('Timeout!!')
end
Xs = x;
return;
end