function I = RomberG(a,b,k)
for i=1:k
    nk = 2^(i-1); step = (b-a)/nk; xR=a:step:b; yR=f(xR);
    I(i,1)=Trapezoidal(xR,yR);
end
for j=2:k
    for l=1:k+1-j
        I(l,j) = (4^(j-1)*I(l+1,j-1)-I(l,j-1))/(4^(j-1)-1);
    end
end
    