clear; clc; close all;
%MÉTODO DO PONTO FIXO (MPF)
f=@(x) exp(x)-2*x-1;
phi=@(x) log(2*x+1);
x=1;
E=1e-5;
Dr=E+1;
cont=0;

while abs(f(x))>E && cont<=100 && Dr>E
    cont=cont+1;
    xx=phi(x);
    Dr=abs(xx-x);
    x=xx;
end

raiz=x