clear all
clf
kstart=1;kend=5;
disp(['k values are in interval  ',num2str([kstart kend])]);
for k=kstart:.2:kend,
clf
t=linspace(1.01,3);
gt=t.^2-(1/k).*log(t-1);
xs= (1/2)+(1/2)*sqrt( (k+2)/k);
gs= xs^2-(1/k)*log(xs-1);
disp(['the product (1/k)(1/g(xs)) is  ',num2str((1/k)/(xs-1))]);
plot(t,gt)
title(['log barrier:  k is ',...
              num2str(k),';  [xs B_k(xs)] are ',num2str([xs gs])  ])
hold on
plot(xs, gs, 'xr');
legend('log barrier function ','minimum point of l_2 function')
pause
hold off
end
