%Metodo de Taylor 2 com extrapolacao de Richardson

function x = Taylor2_Richardson(t0,tf,h,x0,F,F1)

    x1 = Taylor2(t0,tf,h,x0,F,F1);
    x2 = Taylor2(t0,tf,h/2,x0,F,F1);
    for i=1:length(x1)
% Richardson: x(t_n)=(2^p x_{2n}(h/2)- x_n(h))/(2^p-1) + O(h^{p+1})
      x(i) = (4*x2(2*i-1)-x1(i))/3;
    end
end