function [x]=Elastic2Sec3(k,dx,Ef)
  E=0;
  x=0;
while E<=Ef
    x=x+dx;
    E=E+k*x*dx;
  end
end