function fig2_3

a=-1.5; b=2.5;
nx=100;
x=linspace(a,b,nx);
for ix=1:nx
    y(ix)=f(x(ix));
    if y(ix)<0
        ik=ix;
    end
end

clf
% get(gcf)
set(gcf,'Position', [25 1115 658 230])
subaxis(1,1,1,1,'MT',0.01,'MB',0.18,'MR',-0.02,'ML',0.03,'P',0.04)
co = [0 0 1;
    0 0.5 0;
    1 0 0;
    0 0.75 0.75;
    0.75 0 0.75;
    0.75 0.75 0;
    0.25 0.25 0.25];
set(groot,'defaultAxesColorOrder',co)

plot(x,y,'b','lineWidth',1.4)
hold on
plot([a b],[0 0],'-k','LineWidth',0.5)
box on
grid on
axis([a b -2.5 4])
set(gca,'ytick',[-2 0 2 4])
xlabel('x-axis')
ylabel('f(x)')
set(gca,'FontSize',16,'FontWeight','bold')

%exportgraphics(gca,'/Users/mark/Desktop/cubic.eps')

function g=f(x)
g=(x-0.1)*(x-2.1)*(x+1.1);




















