% for exercise 9.5
set(0,                           ...
   'defaultaxesfontsize', 20,   ...
   'defaultaxeslinewidth', 1.2, ...
   'defaultlinelinewidth', 2.0, ...
   'defaultpatchlinewidth', 0.7); 

%parameter 
rlist = [2];
for j = 1:length(rlist)
        r = rlist(j);
        

u = [0.01:0.01:10];
v = u+r*u./(1+u);
y = -(log(u) + r*log(u./(1+u))+u);
figure(1)
plot(y,v,y,u,'linewidth',2)
hold on

xlabel('y','fontsize',20)
legend('v','u', 'fontsize',20)
axis([-10 10 0 10 ])
%set(gca,'Xtick',-10:2.5:10)
end
hold off
