% graphically demonstrates the squeeze theorem % section 2.3 problem #32 % % f(x) <= g(x) <= h(x) % and as x->0, f(x)->0 and h(x)->0 % % using the squeeze theorem we get that % as x->0 g(x)->0 % x=-1:0.015:1; f=-sqrt(x.^3+x.^2); g=sqrt(x.^3+x.^2).*sin(pi./x); h=sqrt(x.^3+x.^2); plot(x,f,x,g,x,h) legend('f(x)=-sqrt(x^3+x^2)','g(x)=sqrt(x^3+x^2)*sin(pi/x)','h(x)=sqrt(x^3+x^2)')