%% this script shows how to plot two polynomials p4(x) and p5(x)

x=linspace(-1,1,1000); % generate 1000 uniformly distributed points from -1 to 1;
p4=@(x) 8*ones(size(x))+x+4*x.^2+1/3*x.^3;
p5=@(x) 8*ones(size(x))+x+4*x.^2+1/3*x.^3+x.^4;

plot(x,p4(x));hold all
plot(x,p5(x));
legend('First 4 terms', 'First 5 terms')