% To load into Matlab:  just type the name of this file, without the .m
% extension.

clf;

xmin= 0;
xmax= 6;
ymin= 0;
ymax= 4;
xtick=1;
ytick=1;

%% ----------------------------------------------------------------
hold on;

x=[xmin:0.01:xmax];
y=log(2+2*x+x.^2);
plot(x,y);

x=[xmin:0.01:xmax];
y=log(17)+8/17*(x-3);
plot(x,y);

x=[3];
y=log(17)+8/17*(x-3);
plot(x,y,'.', 'MarkerSize', 20);

%% ----------------------------------------------------------------
axis([xmin xmax ymin ymax]);
h1=line([xmin xmax], [0 0]);
set(h1, 'LineStyle', '--');
h2=line([0 0], [ymin ymax]);
set(h2, 'LineStyle', '--');
xlabel('x');
ylabel('f(x)');

set(gca, 'XTick', [xmin:xtick:xmax])
set(gca, 'YTick', [ymin:ytick:ymax])

set(gca, 'XGrid', 'on')
set(gca, 'YGrid', 'on')
%set(gca, 'XMinorGrid', 'on')
%set(gca, 'YMinorGrid', 'on')

set(gcf, 'PaperPositionMode', 'Manual');
set(gcf, 'PaperPosition', [0 0 4.0 2.0])
print -depsc e2_6
