function Ek = intgauss(r,k)
%calcula a integral do cap 4 (agora nao eh mais necessario usar
%mathematica)
if k == 1
    Ek = 2*sqrt(pi/2)*erfc(r/sqrt(2));
elseif k == 2
    Ek = 2*pi*exp(-r^2/2);
elseif k == 3
    Ek = 4*pi*r*exp(-r^2/2) + 4*pi*sqrt(pi/2)*erfc(r/sqrt(2));
end